Make base mount points shared#98
Make base mount points shared#98Zyqsempai wants to merge 2 commits intorootless-containers:masterfrom
Conversation
|
@AkihiroSuda Did you mean something like this? |
|
Sorry, I was talking about the rootfs. e.g.
|
|
@AkihiroSuda Ok, let's summarize a little bit:
|
993eea1 to
9967590
Compare
|
@AkihiroSuda PTAL |
AkihiroSuda
left a comment
There was a problem hiding this comment.
Unfortunately, doesn't seem working
|
@AkihiroSuda Yep, looks like, but I don't see where can be the problem. this what I see inside the rootlesskit shell, everything is shared. again root is shared, do you have any ideas? |
|
This seems to work for your PR: diff --git a/pkg/parent/parent.go b/pkg/parent/parent.go
index 6e7e61b..287032f 100644
--- a/pkg/parent/parent.go
+++ b/pkg/parent/parent.go
@@ -84,9 +84,8 @@ func Parent(opt Opt) error {
}
cmd := exec.Command("/proc/self/exe", os.Args[1:]...)
cmd.SysProcAttr = &syscall.SysProcAttr{
- Pdeathsig: syscall.SIGKILL,
- Cloneflags: syscall.CLONE_NEWUSER,
- Unshareflags: syscall.CLONE_NEWNS,
+ Pdeathsig: syscall.SIGKILL,
+ Cloneflags: syscall.CLONE_NEWUSER | syscall.CLONE_NEWNS,
}
if opt.NetworkDriver != nil {
cmd.SysProcAttr.Unshareflags |= syscall.CLONE_NEWNET |
Signed-off-by: Boris Popovschi <[email protected]>
|
@Zyqsempai Do you want to update this, or shall I carry? |
Signed-off-by: Boris Popovschi <[email protected]>
9967590 to
831eade
Compare
|
@AkihiroSuda I tried your suggestion, but it looks like it's still not working, but from the opposite side, now it's always shared, and it's impossible to make it private. |
|
I will carry |
copy-up still doesn't work: ``` $ rootlesskit --propagation=rshared --copy-up=/run echo test [rootlesskit:child ] error: failed to move mount point from /tmp/rootlesskit-b668352932 to /run/.ro159097011: invalid argument [rootlesskit:parent] error: child exited: exit status 1 ``` Signed-off-by: Akihiro Suda <[email protected]>
|
carried in #109 |
Signed-off-by: Akihiro Suda <[email protected]>
Signed-off-by: Akihiro Suda <[email protected]>
Signed-off-by: Akihiro Suda <[email protected]>
Signed-off-by: Akihiro Suda <[email protected]>
Signed-off-by: Akihiro Suda <[email protected]>
Fixes #97
Made base mount point shared.
Signed-off-by: Boris Popovschi [email protected]