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

pre-install: pre-install: Remove nydus-snapshotter config #280

Conversation

fidencio
Copy link
Member

We've been leaving the nydus-snapshotter config behind because we were
trying to remove it from a path that was changed from the first
iteration of the nydus-snapshotter addition, but ended up not being
noticed during review.

While here, let's also make sure to entirely remove
/opt/confidential-containers/share, as nydus-snapshotter is the only
bit of code using that.

Fixes: #278

While here let's also pre-remove ctr cleanup of nydus snapshotters

This has proven to be useless as it is, as ctr doesn't have access to
the /var/run/{containerd,containerd-nydus} to actually be able to
perform any operation.

We could, obviously, expose those to the operator, but I'm very much
against adding even more host mounts to the operator, unless this is
strictly needed, and right now I don't think it is (and I'm fine to be
proven wrong in the future ;-)).

@fidencio
Copy link
Member Author

/test

Copy link
Member

@fitzthum fitzthum left a comment

Choose a reason for hiding this comment

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

LGTM. We might want to run the tests twice here because this is a change to the uninstall stuff.

Also, @ryansavino looks like we need some cleanup on the SEV/SNP node.

Copy link
Member

@wainersm wainersm left a comment

Choose a reason for hiding this comment

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

@fidencio lgtm

@fidencio fidencio force-pushed the topic/remove-leftover-config-on-post-uninstall branch from f29c2ac to f73b1de Compare October 31, 2023 17:55
@fidencio
Copy link
Member Author

/test

@fidencio fidencio force-pushed the topic/remove-leftover-config-on-post-uninstall branch from f73b1de to db75f8e Compare October 31, 2023 19:24
@fidencio fidencio requested review from fitzthum and wainersm October 31, 2023 19:25
for i in `ctr -n k8s.io snapshot --snapshotter nydus list | grep -v KEY | cut -d' ' -f1`; do
ctr -n k8s.io snapshot --snapshotter nydus rm $i || true
for i in `host_ctr -n k8s.io snapshot --snapshotter nydus list | grep -v KEY | cut -d' ' -f1`; do
host_ctr -n k8s.io snapshot --snapshotter nydus rm $i || true
Copy link
Member

Choose a reason for hiding this comment

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

@fidencio I was about to ask you if there is a situation where ctr is not installed, but this || true will handle any error.

Copy link
Member

@wainersm wainersm left a comment

Choose a reason for hiding this comment

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

very clever way of solving it @fidencio !

Copy link
Member

@fitzthum fitzthum left a comment

Choose a reason for hiding this comment

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

LGTM

@fidencio
Copy link
Member Author

/test

We've been leaving the nydus-snapshotter config behind because we were
trying to remove it from a path that was changed from the first
iteration of the nydus-snapshotter addition, but ended up not being
noticed during review.

While here, let's also make sure to entirely remove
`/opt/confidential-containers/share`, as nydus-snapshotter is the only
bit of code using that.

Fixes: confidential-containers#278

Signed-off-by: Fabiano Fidêncio <[email protected]>
Otherwise ctr will not find nydus as one of its available napshotters.

Signed-off-by: Fabiano Fidêncio <[email protected]>
Let's take the same approach taken to use systemd and use ctr directly
from the host, which helps us to avoid actually mounting /run/ content
into our daemonset.

Signed-off-by: Fabiano Fidêncio <[email protected]>
@fidencio fidencio force-pushed the topic/remove-leftover-config-on-post-uninstall branch from db75f8e to 4c8d276 Compare October 31, 2023 19:42
@fidencio
Copy link
Member Author

/test

@fidencio
Copy link
Member Author

fidencio commented Nov 1, 2023

I'm going ahead and merging this one, as the changes will most likely help with the AMD / Intel CIs.

@fidencio fidencio merged commit aa0ff73 into confidential-containers:main Nov 1, 2023
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.

Artefacts are being left behind after uninstall
3 participants