tailscale/tailscale · error

error clearing previous state from Secret: %w

Error message

error clearing previous state from Secret: %w

What it means

Error "error clearing previous state from Secret: %w" thrown in tailscale/tailscale.

Source

Thrown at cmd/containerboot/main.go:382

	if isOneStepConfig(cfg) {
		tailscaledConfigAuthkey = authkey.AuthKeyFromConfig(cfg.TailscaledConfigFilePath)
	}

	var kc *kubeClient
	if cfg.KubeSecret != "" {
		kc, err = newKubeClient(cfg.Root, cfg.KubeSecret)
		if err != nil {
			return fmt.Errorf("error initializing kube client: %w", err)
		}
		if err := cfg.setupKube(bootCtx, kc); err != nil {
			return fmt.Errorf("error setting up for running on Kubernetes: %w", err)
		}
		// Clear out any state from previous runs of containerboot. Check
		// hasKubeStateStore because although we know we're in kube, that
		// doesn't guarantee the state store is properly configured.
		if hasKubeStateStore(cfg) {
			if err := kc.resetContainerbootState(bootCtx, cfg.PodUID, tailscaledConfigAuthkey); err != nil {
				return fmt.Errorf("error clearing previous state from Secret: %w", err)
			}
		}
	}

	client, daemonProcess, err := startTailscaled(bootCtx, cfg)
	if err != nil {
		return fmt.Errorf("failed to bring up tailscale: %w", err)
	}
	killTailscaled := func() {
		// The default termination grace period for a Pod is 30s. We wait 25s at
		// most so that we still reserve some of that budget for tailscaled
		// to receive and react to a SIGTERM before the SIGKILL that k8s
		// will send at the end of the grace period.
		ctx, cancel := context.WithTimeout(context.Background(), 25*time.Second)
		defer cancel()

		// we are shutting down, we always want to unadvertise here
		if err := services.EnsureServicesNotAdvertised(ctx, client, log.Printf); err != nil {

View on GitHub (pinned to cfe32b8be6)

When it happens

Trigger: Thrown at cmd/containerboot/main.go:382 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of tailscale/tailscale@cfe32b8be6 (2026-08-15). Data as JSON: /api/errors/e766725499b5587f. Report an issue: GitHub.