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

Recursive propagation flags should be legal to use #543

Merged
merged 1 commit into from
Dec 19, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Recursive propagation flags should be legal to use
Current root propagation code does not allow rslave, rshared, runbindable and rprivate.
These are all legal proagations and should be allowed.

Also added the "bad" propagation flag to the error to make diagnosis easier.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
  • Loading branch information
rhatdan committed Dec 15, 2017
commit 9bcbe8305740adfe190fb3d0e7caf7a2ed3a68a6
6 changes: 5 additions & 1 deletion generate/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -891,11 +891,15 @@ func (g *Generator) SetLinuxRootPropagation(rp string) error {
switch rp {
case "":
case "private":
case "rprivate":
case "slave":
case "rslave":
case "shared":
case "rshared":
case "unbindable":
case "runbindable":
default:
return fmt.Errorf("rootfs-propagation must be empty or one of private|slave|shared|unbindable")
return fmt.Errorf("rootfs-propagation %q must be empty or one of (r)private|(r)slave|(r)shared|(r)unbindable", rp)
}
g.initSpecLinux()
g.spec.Linux.RootfsPropagation = rp
Expand Down