Skip to content

Conversation

@mheon
Copy link
Member

@mheon mheon commented Jun 13, 2019

We made changes earlier that empty storage options when setting storage driver explicitly. Unfortunately, this breaks rootless cleanup commands, as they lose the fuse-overlayfs mount program path.

Fix this by passing along the storage options to the cleanup process.

Also, fix --syslog, which was broken a while ago (probably when we broke up main to add main_remote).

Fixes #3326

We made changes earlier that empty storage options when setting
storage driver explicitly. Unfortunately, this breaks rootless
cleanup commands, as they lose the fuse-overlayfs mount program
path.

Fix this by passing along the storage options to the cleanup
process.

Also, fix --syslog, which was broken a while ago (probably when
we broke up main to add main_remote).

Fixes containers#3326

Signed-off-by: Matthew Heon <mheon@redhat.com>
@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mheon

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XS labels Jun 13, 2019
@mheon
Copy link
Member Author

mheon commented Jun 13, 2019

@edsantiago PTAL. Can't promise this does anything about #3325 but I confirmed it fixes 3326.

@edsantiago
Copy link
Member

Good news / bad news. You've fixed the problems when running as nonroot; but those problems (both 3325 and 3326) are now present when run as root. (via sudo, at least)

@edsantiago
Copy link
Member

More news: the (root) hang on podman logs -f happens only when mountopt = "nodev,metacopy=on". Without metacopy, both the container and the logs process exit fine. Have a nice day :-(

@mheon
Copy link
Member Author

mheon commented Jun 13, 2019

So... metacopy is breaking cleanup processes, somehow. That's rather confusing.

@mheon
Copy link
Member Author

mheon commented Jun 13, 2019

bin/podman[29233]: time="2019-06-13T17:38:35-04:00" level=error msg="could not get runtime: overlay: Unknown option metacopy"

@mheon
Copy link
Member Author

mheon commented Jun 13, 2019

This is rather confusing because I'm pretty sure metacopy is overlay-specific?

@edsantiago
Copy link
Member

I can't reproduce that error message. I've tried using all manner of combinations of driver and mountopt in storage.conf.

Tomorrow is another day, and maybe the bits will behave better then.

@mheon
Copy link
Member Author

mheon commented Jun 13, 2019

@edsantiago podman run -d -t --log-level=debug --syslog fedora sleep 60; podman stop --timeout=0 --latest and check syslog - you'll see that error out of the podman cleanup process

@giuseppe
Copy link
Member

LGTM

@giuseppe
Copy link
Member

I confirm this fixes #3325

@edsantiago
Copy link
Member

@giuseppe please try it as root, with driver = "overlay" and mountopt = "nodev,metacopy=on"

@giuseppe
Copy link
Member

nodev,metacopy=on should not be converted to --storage-opt nodev --storage-opt metacopy=on but to --storage-opt $DRIVER.mountopt=nodev,metacopy=on. The issue now is that cobra splits the option in $DRIVER.mountopt=nodev and metacopy=on which is also not correct

@giuseppe
Copy link
Member

with the following patch it seems to work for me:

diff --git a/cmd/podman/main_local.go b/cmd/podman/main_local.go
index b4f21bd0..132f35ab 100644
--- a/cmd/podman/main_local.go
+++ b/cmd/podman/main_local.go
@@ -48,7 +48,7 @@ func init() {
        rootCmd.PersistentFlags().StringVar(&MainGlobalOpts.Runtime, "runtime", "", "Path to the OCI-compatible binary used to run containers, default is /usr/bin/runc")
        // -s is depracated due to conflict with -s on subcommands
        rootCmd.PersistentFlags().StringVar(&MainGlobalOpts.StorageDriver, "storage-driver", "", "Select which storage driver is used to manage storage of images and containers (default is overlay)")
-       rootCmd.PersistentFlags().StringSliceVar(&MainGlobalOpts.StorageOpts, "storage-opt", []string{}, "Used to pass an option to the storage driver")
+       rootCmd.PersistentFlags().StringArrayVar(&MainGlobalOpts.StorageOpts, "storage-opt", []string{}, "Used to pass an option to the storage driver")
        rootCmd.PersistentFlags().BoolVar(&MainGlobalOpts.Syslog, "syslog", false, "Output logging information to syslog as well as the console")
 
        rootCmd.PersistentFlags().StringVar(&MainGlobalOpts.TmpDir, "tmpdir", "", "Path to the tmp directory")

StringSliceVar was distorting options. StringArrayVar seems to
not mangle them, so use that instead.

Thanks to Giuseppe for finding this one.

Signed-off-by: Matthew Heon <mheon@redhat.com>
@mheon
Copy link
Member Author

mheon commented Jun 14, 2019

Repushed with your patch @giuseppe - thanks

@mheon
Copy link
Member Author

mheon commented Jun 14, 2019

podman-in-podman seems like it might be failing consistently on the runlabel global options test...

Going to try again. If we get another failure I'll fix it.

@mheon
Copy link
Member Author

mheon commented Jun 14, 2019

Alright, I got a theory. Pushed a commit. Let's see...

@mheon
Copy link
Member Author

mheon commented Jun 14, 2019

Alright, that wasn't it...

@mheon
Copy link
Member Author

mheon commented Jun 14, 2019

Alright, I have no idea what's going on with the test failure here. No clues in the logs and I can't reproduce...

Probably going to just skip (for podman in podman only, if possible)

This is failing 100% on CI. No time to debug why properly before
we need to cut a release, but is probably related to the change
from a slice to an array.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
We need to cut a release. We can investigate further next week.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
@mheon
Copy link
Member Author

mheon commented Jun 14, 2019

@haircommander @rhatdan @jwhonce Can I get a /lgtm and /hold on this one, so we can merge and start the release?

@jwhonce
Copy link
Member

jwhonce commented Jun 14, 2019

/hold
/lgtm

@openshift-ci-robot openshift-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm Indicates that a PR is ready to be merged. labels Jun 14, 2019
@mheon
Copy link
Member Author

mheon commented Jun 14, 2019

It's ready. Finally.
/hold cancel

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 14, 2019
@openshift-merge-robot openshift-merge-robot merged commit 90e3c90 into containers:master Jun 14, 2019
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 26, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

podman inspect on stopped container: inconsistent status

6 participants