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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

service: support --mount type=bind,bind-nonrecursive #38788

Open
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
5 participants
@AkihiroSuda
Copy link
Member

commented Feb 23, 2019

Signed-off-by: Akihiro Suda suda.akihiro@lab.ntt.co.jp

- What I did

Support docker service create --mount type=bind,bind-nonrecursive

- How I did it

Updated daemon/cluster

- How to verify it

$ docker service create --mount type=bind,src=/,dst=/foo,ro,bind-nonrecursive nginx:alpine
$ docker exec -it frosty_boyd.1.5ci8zh74r3uns8nzp7h6jsloa sh
/ # ls /foo/mnt/other-mounts

- Description for the changelog
service: support --mount type=bind,bind-nonrecursive

- A picture of a cute animal (not mandatory but encouraged)
馃惂

service: support --mount type=bind,bind-nonrecursive
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>

@AkihiroSuda AkihiroSuda force-pushed the AkihiroSuda:bind-nonrecursive-swarm branch from 17a1587 to 9e81db6 Feb 23, 2019

// Negative value corresponds to the empty ("") propagation.
// Note that zero-value stands for rprivate, which differs from the empty ("") propagation.
// See daemon/{oci_linux.go,volumes_linux.go} .
Propagation: -1,

This comment has been minimized.

Copy link
@AkihiroSuda

AkihiroSuda Feb 23, 2019

Author Member

I tried to use nil *int32 instead, but gogoproto.nullable = true doesn't seems to work here

This comment has been minimized.

Copy link
@thaJeztah

thaJeztah Mar 12, 2019

Member

Is that a bug?

This comment has been minimized.

Copy link
@cpuguy83

cpuguy83 Mar 14, 2019

Contributor

While technically true that "" is not the same as "rprivate", I think tht was the intention of the API. Default to rprivate mounts.
I guess this limits what the implementation can do?

This comment has been minimized.

Copy link
@AkihiroSuda

AkihiroSuda Mar 19, 2019

Author Member

Defaulting to rprivate is likely to break compatibility

if cm.Spec.BindOptions != nil && cm.Spec.BindOptions.Propagation != "" {

return m.BindOptions.Propagation == "", nil

This comment has been minimized.

Copy link
@AkihiroSuda

AkihiroSuda Mar 19, 2019

Author Member

Is that a bug?

Not sure, probably this is expected behavior for enum

This comment has been minimized.

Copy link
@cpuguy83

cpuguy83 Mar 22, 2019

Contributor

Default should already be rprivate.

@codecov

This comment has been minimized.

Copy link

commented Feb 24, 2019

Codecov Report

鉂楋笍 No coverage uploaded for pull request base (master@dd94555). Click here to learn what that means.
The diff coverage is 0%.

@@            Coverage Diff            @@
##             master   #38788   +/-   ##
=========================================
  Coverage          ?   36.43%           
=========================================
  Files             ?      613           
  Lines             ?    45854           
  Branches          ?        0           
=========================================
  Hits              ?    16707           
  Misses            ?    26854           
  Partials          ?     2293
@AkihiroSuda

This comment has been minimized.

Copy link
Member Author

commented Mar 10, 2019

@cpuguy83 PTAL?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can鈥檛 perform that action at this time.