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

Add builtin directory on run if non-existent #1127

Conversation

TomSweeneyRedHat
Copy link
Member

Signed-off-by: TomSweeneyRedHat [email protected]

I think this will most likely replace #1125, but don't want to close that quite yet.

If an image has a builtin volume attached to it like:

            "Volumes": {
                "/var/lib/registry": {}
            },

Create the directory if it doesn't exist and fails the first stat, then attempt to continue processing.

I've one slight concern with this change. To replicate it prior to this change:

registry=$(buildah from registry:2)
buildah --debug run $registry -- htpasswd -Bbn testuser testpassword > /root/auth/htpasswd   # failed
buildah --debug run $registry -- htpasswd -Bbn testuser testpassword > /root/auth/htpasswd   # completed

After this change both runs work. However my concern is what's created on the host. After the first buildah run I see:

# find /var/lib/containers/storage -name registry
/var/lib/containers/storage/overlay/1fe8be720d6e3a8540dc649be8542b5304c46a88d5dcfac49729b3e8c267b4ac/diff/bin/registry
/var/lib/containers/storage/overlay/a4c34f0c87b2563d2835c48bffe2b940fea9719850c003c314e487e6af44da53/diff/etc/docker/registry
/var/lib/containers/storage/overlay/241c7d778023cd436c1148c16af2c039c8ae9f27d79bf66ee8dc6386848c6dea/diff/var/lib/registry

But I was thinking I should see something under

/var/lib/containers/storage/overlay/241c7d778023cd436c1148c16af2c039c8ae9f27d79bf66ee8dc6386848c6dea/merged

too, but I'm not. Am I overexpecting @nalind ?

Otherwise with this change I'm seeing the /var/lib/registry directory in the container as I'd expect.

@TomSweeneyRedHat
Copy link
Member Author

Addresses #1121 and I didn't see @nalind's #1126 until I posted this, may retract this one.

@rh-atomic-bot
Copy link
Collaborator

☔ The latest upstream changes (presumably 87cb532) made this pull request unmergeable. Please resolve the merge conflicts.

@rhatdan rhatdan closed this Oct 25, 2018
@TomSweeneyRedHat TomSweeneyRedHat deleted the dev/tsweeney/builtin2 branch November 7, 2018 14:35
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants