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

No bootstrap_history created when bootstrapping from local image #935

Closed
bbbxyz opened this issue Aug 3, 2022 · 4 comments · Fixed by #936
Closed

No bootstrap_history created when bootstrapping from local image #935

bbbxyz opened this issue Aug 3, 2022 · 4 comments · Fixed by #936
Labels
bug Something isn't working

Comments

@bbbxyz
Copy link

bbbxyz commented Aug 3, 2022

Version of Singularity
singularity-ce version 3.9.1+6-g38b50cbc5-bionic

Describe the bug
Previous container definition files are not copied to /.singularity.d/bootstrap_history when using a localimage bootstrap

To Reproduce
Building a no-op container on top of a local image shows that there is no /.singularity.d/bootstrap_history in the built container.
Running:

singularity pull jammy.sif library://library/default/ubuntu:jammy 
echo -e "Bootstrap: localimage\nFrom: jammy.sif" > test.def
singularity build --fakeroot test.sif test.def
singularity exec test.sif ls /.singularity.d/bootstrap_history

I get:
/usr/bin/ls: cannot access '/.singularity.d/bootstrap_history': No such file or directory

Expected behavior
IIUC, the recipe of the bootstrapped container jammy.sif should be in /.singularity.d/bootstrap_history according to https://docs.sylabs.io/guides/3.9/user-guide/appendix.html#id11

OS / Linux Distribution
NAME="Ubuntu"
VERSION="18.04.5 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.5 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic

Installation Method
Installed through apt: singularity-ce/now 3.9.1+6-g38b50cbc5-bionic amd64 [installed,local]

@bbbxyz bbbxyz added the bug Something isn't working label Aug 3, 2022
@dtrudg
Copy link
Member

dtrudg commented Aug 3, 2022

Confirmed. This has been reported by @vsoch a long time ago, pre-SingularityCE fork at:

apptainer/singularity#4134

The code is intentionally written (per the comment) to only trigger on a build that is explicitly an update. However, it should always occur, per the docs.

// if update, check for existing definition and move it to bootstrap history

We should be able to correct this easily.

dtrudg added a commit to dtrudg/singularity that referenced this issue Aug 3, 2022
In Singularity 2.x the bootstrap_history directory was always
populated with any existing definition file, when an existing image
was used as the source for a build.

It appears that in 3.x this was gated behind a conditional, limiting
it to builds that are explicitly `--update` only. This does not
reflect the documentation or 2.x, so remove this conditional.

Fixes sylabs#935
dtrudg added a commit to dtrudg/singularity that referenced this issue Aug 3, 2022
In Singularity 2.x the bootstrap_history directory was always
populated with any existing definition file, when an existing image
was used as the source for a build.

It appears that in 3.x this was gated behind a conditional, limiting
it to builds that are explicitly `--update` only. This does not
reflect the documentation or 2.x, so remove this conditional.

Fixes sylabs#935
dtrudg added a commit to dtrudg/singularity that referenced this issue Aug 3, 2022
In Singularity 2.x the bootstrap_history directory was always
populated with any existing definition file, when an existing image
was used as the source for a build.

It appears that in 3.x this was gated behind a conditional, limiting
it to builds that are explicitly `--update` only. This does not
reflect the documentation or 2.x, so remove this conditional.

Fixes sylabs#935
@vsoch
Copy link
Contributor

vsoch commented Aug 3, 2022

yay!

@bbbxyz
Copy link
Author

bbbxyz commented Aug 3, 2022

Awesome, thanks for the speedy response!

dtrudg added a commit to dtrudg/singularity that referenced this issue Aug 3, 2022
In Singularity 2.x the bootstrap_history directory was always
populated with any existing definition file, when an existing image
was used as the source for a build.

It appears that in 3.x this was gated behind a conditional, limiting
it to builds that are explicitly `--update` only. This does not
reflect the documentation or 2.x, so remove this conditional.

Fixes sylabs#935
dtrudg added a commit to dtrudg/singularity that referenced this issue Aug 5, 2022
In Singularity 2.x the bootstrap_history directory was always
populated with any existing definition file, when an existing image
was used as the source for a build.

It appears that in 3.x this was gated behind a conditional, limiting
it to builds that are explicitly `--update` only. This does not
reflect the documentation or 2.x, so remove this conditional.

Fixes sylabs#935
@vsoch
Copy link
Contributor

vsoch commented Aug 5, 2022

Thank you!

edytuk pushed a commit to vzokay/apptainer that referenced this issue Aug 8, 2022
In Singularity 2.x the bootstrap_history directory was always
populated with any existing definition file, when an existing image
was used as the source for a build.

It appears that in 3.x this was gated behind a conditional, limiting
it to builds that are explicitly `--update` only. This does not
reflect the documentation or 2.x, so remove this conditional.

Fixes sylabs/singularity#935

Signed-off-by: Edita Kizinevic <edita.kizinevic@cern.ch>
edytuk pushed a commit to vzokay/apptainer that referenced this issue Aug 10, 2022
In Singularity 2.x the bootstrap_history directory was always
populated with any existing definition file, when an existing image
was used as the source for a build.

It appears that in 3.x this was gated behind a conditional, limiting
it to builds that are explicitly `--update` only. This does not
reflect the documentation or 2.x, so remove this conditional.

Fixes sylabs/singularity#935

Signed-off-by: Edita Kizinevic <edita.kizinevic@cern.ch>
edytuk pushed a commit to vzokay/apptainer that referenced this issue Aug 10, 2022
In Singularity 2.x the bootstrap_history directory was always
populated with any existing definition file, when an existing image
was used as the source for a build.

It appears that in 3.x this was gated behind a conditional, limiting
it to builds that are explicitly `--update` only. This does not
reflect the documentation or 2.x, so remove this conditional.

Fixes sylabs/singularity#935

Signed-off-by: Edita Kizinevic <edita.kizinevic@cern.ch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants