We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
If there's any stray UNIX domain sockets in the project directory, Spread fails to pack the project.
To reproduce this issue, create a socket (you can Ctrl+C the command as soon as it's started, we just want the side effect of creating a socket):
nc -lkU foo.sock
With this in place, trying to run spread fails (example project has a LXD backend, but this issue is most likely independent of backend):
spread
spread -vv lxd
The error message:
2024-02-05 15:15:39 Error packing project content for delivery: cannot pack project tree: tar: foo.sock: socket ignored
As a workaround, we currently run find . -type s -delete before running spread to remove any UNIX domain sockets.
find . -type s -delete
GNU tar supports configurable warning messages using --warning= with:
--warning=
file‐ignored "%s: Unknown file type; file ignored" "%s: socket ignored" "%s: door ignored"
The file-ignored warning ignores:
file-ignored
unknown_file_error()
src/create.c
It seems like one could add --warning=no-file-ignored to work around this issue:
--warning=no-file-ignored
diff --git a/spread/runner.go b/spread/runner.go index c84ff63..ebf4b00 100644 --- a/spread/runner.go +++ b/spread/runner.go @@ -277,7 +277,7 @@ func (r *Runner) prepareContent() (err error) { return fmt.Errorf("cannot remove temporary content file: %v", err) } - args := []string{"c", "--exclude=.spread-reuse.*"} + args := []string{"c", "--exclude=.spread-reuse.*", "--warning=no-file-ignored"} if r.project.Repack == "" { args[0] = "cz" }
In my local tests, this fixed the issue and lets spread pack the local tree, ignoring any UNIX domain sockets.
The text was updated successfully, but these errors were encountered:
fix: runner: ignore unknown file types and sockets (fixes canonical#176)
88a1f26
@thp-canonical you could use the exclude config in spread.yaml to exclude any unwanted files (if their pattern is knowm), please check https://github.com/snapcore/spread/blob/master/README.md#including.
Sorry, something went wrong.
@thp-canonical you could use the exclude config in spread.yaml to exclude any unwanted files (if their pattern is know), please check https://github.com/snapcore/spread/blob/master/README.md#including.
cc @paul-rodriguez would that work for you?
No branches or pull requests
If there's any stray UNIX domain sockets in the project directory, Spread fails to pack the project.
To reproduce this issue, create a socket (you can Ctrl+C the command as soon as it's started, we just want the side effect of creating a socket):
With this in place, trying to run
spread
fails (example project has a LXD backend, but this issue is most likely independent of backend):The error message:
As a workaround, we currently run
find . -type s -delete
before runningspread
to remove any UNIX domain sockets.GNU tar supports configurable warning messages using
--warning=
with:The
file-ignored
warning ignores:unknown_file_error()
insrc/create.c
in tar's source)It seems like one could add
--warning=no-file-ignored
to work around this issue:In my local tests, this fixed the issue and lets
spread
pack the local tree, ignoring any UNIX domain sockets.The text was updated successfully, but these errors were encountered: