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

uenv image add fails when referencing internal store.squashfs #15

Open
finkandreas opened this issue Nov 1, 2024 · 1 comment
Open

Comments

@finkandreas
Copy link
Contributor

finkandreas commented Nov 1, 2024

I tried the following:

uenv image add wombat/v2:test@eiger%zen2 $SCRATCH/my_store.squashfs
uenv image add wombat/v2:1234@eiger%zen2 $(uenv image inspect --format '{sqfs}' wombat/v2:test@eiger%zen2

This command takes some time and then fails with the exception:

[warning] a uenv with the same sha c76fad212c777cc7ba90ce8d1efade79b76bd7afaf1696aaf4e560c0750b2ec7 is already in the repo
terminate called after throwing an instance of 'std::filesystem::__cxx11::filesystem_error'
  what():  filesystem error: cannot get file time: No such file or directory [.uenv-images-ci-eiger-tds/images/c76fad212c777cc7ba90ce8d1efade79b76bd7afaf1696aaf4e560c0750b2ec7/store.squashfs]
Aborted
@bcumming
Copy link
Member

bcumming commented Nov 7, 2024

  • each uenv is stored in a path named after its hash
  • we remove this path before adding so that partial updates from previous aborted or erroneous updates are removed
  • in this case we remove the image that we are supposed to be adding

The fix is to check whether an image with the same sha256 exists, and make the "delete-then-copy" a noop if it does, while still updating the label in the database if needed.

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

No branches or pull requests

2 participants