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

print which directories are being deleted #195

Merged
merged 2 commits into from
Sep 30, 2022

Conversation

changweige
Copy link
Member

This is very helpful when debug and trace how
nydus-snapshotter is releasing resources.

Signed-off-by: Changwei Ge gechangwei@bytedance.com

@@ -822,6 +822,8 @@ func (o *snapshotter) cleanupSnapshotDirectory(ctx context.Context, dir string)
log.G(ctx).WithError(err).WithField("dir", dir).Error("failed to unmount")
}

log.L.Infof("Delete snapshot directory %s", dir)

if err := os.RemoveAll(dir); err != nil {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Move after here and say Deleted snapshot directory %s?

@@ -400,6 +400,9 @@ func (m *Manager) CleanUpDaemonResources(d *daemon.Daemon) {
if d.IsMultipleDaemon() {
resource = append(resource, d.SocketDir)
}

log.L.Infof("deleting resources %v", resource)

for _, dir := range resource {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Move after here and say Deleted resources %v?

Otherwise, it skips checking nydusd's socket's existence.

Signed-off-by: Changwei Ge <gechangwei@bytedance.com>
This is very helpful when debug and trace how
nydus-snapshotter is releasing resources.

Signed-off-by: Changwei Ge <gechangwei@bytedance.com>
@changweige changweige merged commit cd604c1 into containerd:main Sep 30, 2022
@changweige changweige deleted the print-deleting-dirs branch October 10, 2022 07:46
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.

2 participants