Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'zarf destroy' unable to do anything if 'zarf init' doesn't complete #371

Closed
YrrepNoj opened this issue Mar 8, 2022 · 0 comments · Fixed by #374
Closed

'zarf destroy' unable to do anything if 'zarf init' doesn't complete #371

YrrepNoj opened this issue Mar 8, 2022 · 0 comments · Fixed by #374
Assignees

Comments

@YrrepNoj
Copy link
Contributor

YrrepNoj commented Mar 8, 2022

Environment

Device and OS: Ubuntu 18.04
App version: v0.15.0
Kubernetes distro being used: None natively, using k3s that Zarf brings with it

Steps to reproduce

  1. zarf init --components=k3s --confirm
    • Process crashes or is manually halted before initialization is completed
  2. zarf destroy --confirm
  3. What ever the issue preventing the initialization is addressed externally
  4. zarf init --components=k3s --confirm

Expected result

Step '2' destroys the started up k3s cluster and step '4' stands up a new k3s cluster.

Actual Result

If step '1' was stopped before the zarf state was saved into the registry, then nothing actually happens during the zarf destroy --confirm. This means a k3s cluster is still running on the host and when you try to zarf init again you get an unclear error message about not being able connect to the k8s cluster while still not saving anything to the zarf-state secret so you're not stuck in this loop.

The only way out of this loop is to manually remove the k3s cluster through /usr/sbin/zarf-clean-k3s.sh or some other k3s cleanup script.

Visual Proof (screenshots, videos, text, etc)

Severity/Priority

Additional Context

@RothAndrew RothAndrew moved this to New Requests in Zarf Project Board Mar 8, 2022
@YrrepNoj YrrepNoj changed the title Zarf Destroy' 'zarf destroy' unable to do anything if 'zarf init' doesn't complete Mar 8, 2022
@YrrepNoj YrrepNoj self-assigned this Mar 8, 2022
@YrrepNoj YrrepNoj moved this from New Requests to Doing Now in Zarf Project Board Mar 8, 2022
@YrrepNoj YrrepNoj moved this from Doing Now to Under Review in Zarf Project Board Mar 10, 2022
Repository owner moved this from Under Review to Done in Zarf Project Board Mar 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant