Skip to content

olf infra destroy reads another mode's stale kubeconfig and does not say which #1282

Closed

Description

@malon64

Summary

The source-tree olf and the installed olf keep different state roots for the same kind cluster:

  • the source tree uses <repo>/.tmp/;
  • the installed olf uses ~/.openlakeforge/state/local/.

A teardown run in the mode that did not deploy the stack reads a stale kubeconfig. It refuses, and does not say which state it read.

Found while verifying v0.7-beta on kind, with main at 6427659.

What happens

  • The stack was deployed with the installed olf (uv tool install of the wheels, from the project directory). Its kubeconfig is ~/.openlakeforge/state/local/kubeconfig.yaml, with the API server on 127.0.0.1:43175.

  • <repo>/.tmp/kubeconfigs/local.yaml was left by an earlier source-tree deploy of a cluster with the same name, openlakeforge-local. It pointed at 127.0.0.1:34243.

  • uv run --project tools/olf --locked olf infra destroy from the repo root, the command in CLAUDE.md, failed:

    ERROR: Kubernetes context 'kind-openlakeforge-local' is not reachable. The platform must be destroyed before the local foundation is destroyed.
    

    The cluster was up. Running the installed olf infra destroy from the project directory destroyed it.

DeploymentContext.local (tools/olf/olf/common/deployment/context.py) picks <work_root>/kubeconfigs/<scope>.yaml or <state_root>/kubeconfig.yaml, depending on whether a state root is set.

Proposed

  • The "not reachable" error names the kubeconfig and the state root it read.
  • When the kind cluster of that name exists but answers on another port, say so ("this state belongs to another deployment of openlakeforge-local"), or refresh the kubeconfig from kind get kubeconfig.

Activity

  1. added
    priority: P2
    track: operability
    on Nov 18, 2026
  2. added a commit that references this issue on Nov 24, 2026
    dfdf270
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: P2track: operabilitytype: fix

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions