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

overlord: save fails with sockets in folder #9941

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions overlord/snapshotstate/backend/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,7 @@ func addDirToZip(ctx context.Context, snapshot *client.Snapshot, w *zip.Writer,
"--create",
"--sparse", "--gzip",
"--format", "gnu",
"--warning", "no-file-ignored",
Copy link
Collaborator

Choose a reason for hiding this comment

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

I wonder if we should silently ignore the files instead of logging which were ignored.

Also, from my silly attempts with sockets in a directory, tar the same command line (but without no-file-ignored), does not exit with non-0. Then I proceeded to create sockets and fifos in $SNAP_DATA and $SNAP_COMMON of hello-world, and snap save worked. I think there may have been more errors logged by tar, but they were not included in the error output of the task.

Copy link
Author

Choose a reason for hiding this comment

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

You are right, the sockets ignored was hiding the actual cause of the error

tar: ./171/.datalayer/frontend/2069: socket ignored
tar: ./171/.datalayer/backend/2070: socket ignored
tar: ./171/package-run/rexroth-automationcore/package-www-fileserver.sock: socket ignored
tar: ./171: file changed as we read it
1

We found the cause on our side for this. But it would be helpful to have the "real" error cause in the log of the snap change.

"--directory", parent,
}

Expand Down