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

TestManager: Ensure no resources are in the cluster before deleting the namespace #770

Merged
merged 2 commits into from
Feb 10, 2023

Conversation

ecpullen
Copy link
Contributor

@ecpullen ecpullen commented Feb 9, 2023

Issue number:

N/A

Description of changes:

Author: ecpullen <[email protected]>
Date:   Thu Feb 9 18:06:32 2023 +0000

    cli: Print underlying errors with anyhow

Show the underlying error when a command fails.

Author: ecpullen <[email protected]>
Date:   Thu Feb 9 17:57:00 2023 +0000

    TestManager: Ensure no resources for uninstall
    
    If a resource is present in the cluster while the namespace is being
    deleted, there is a chance the resource deletion fails and puts the
    cluster in a bad state. To prevent that, all resources must be deleted
    before the namespace is deleted.

Testing done:

cli install followed by cli uninstall

With resources:

$ cli uninstall
Unable to uninstall testsys from the cluster. (Some artifacts may be left behind)

Caused by:
    Some resources are still in the cluster

After the resources are cleaned up:

$ cli uninstall
testsys components were successfully uninstalled.

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

Copy link
Contributor

@stmcginnis stmcginnis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. One minor thing pointed out, but I think it's fine as is.

model/src/test_manager/error.rs Outdated Show resolved Hide resolved
If a resource is present in the cluster while the namespace is being
deleted, there is a chance the resource deletion failes and puts the
cluster in a bad state. To prevent that, all resources must be deleted
before the namespace is deleted.
@ecpullen ecpullen force-pushed the no-resource-for-uninstall branch from 944fab7 to 52ad4f8 Compare February 9, 2023 18:13
@ecpullen ecpullen requested a review from etungsten February 9, 2023 18:14
@ecpullen ecpullen merged commit 0202d1b into bottlerocket-os:develop Feb 10, 2023
@ecpullen ecpullen deleted the no-resource-for-uninstall branch February 10, 2023 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants