-
Notifications
You must be signed in to change notification settings - Fork 18.6k
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
Change defaults for mount writable and volume copying #24053
Conversation
509b884
to
a72ab39
Compare
ping @stevvooe @tiborvass |
Doesn't this make the API less consistent with the |
I actually agree with @vdemeester, IMO we should have the same defaults on the client and API. Sending an "empty" request through the API should pick the defaults we decide on. If we think "RW" is the right default for volumes, the API should use that as a default. |
@vdemeester @thaJeztah We can change it, but it is an API change during the RC period. I've been advocating this change, but there seems to be push back. |
Changing after GA will be even harder, I think...
|
To ensure that the zero-value reflects the defaults for mounts, change the `Writable` to `ReadOnly`. Adds a breaking api change to address a point of confusion. If this PR is not merged by the 1.12 release, this can never be merged, so just close and move on. Related to moby/moby#24053. Signed-off-by: Stephen J Day <stephen.day@docker.com>
@thaJeztah @cpuguy83 @aaronlehmann I've submitted docker/engine-api#298. If we decide this is what we want, as this has come up a few times, merge that and I'll take care of the deltas. |
This is fine, the big thing is going to be changing it in swarmkit. |
To ensure that the zero-value reflects the defaults for mounts, change the `Writable` to `ReadOnly`. Adds a breaking api change to address a point of confusion. If this PR is not merged by the 1.12 release, this can never be merged, so just close and move on. Related to moby/moby#24053. Signed-off-by: Stephen J Day <stephen.day@docker.com>
@cpuguy83 I've submitted a fix in swarmkit and engine-api. Let's update the vendoring here to use this PR as a gate for the feature. |
@cpuguy83 if you update In case you don't wish to mix them in this PR, don't vendor in changes introduced by docker/engine-api#297, and I'll open a PR with my branch after this one is merged. |
func fatal(t TestingT, msg string) { | ||
_, file, line, _ := runtime.Caller(2) | ||
t.Fatalf("%s:%d: %s", filepath.Base(file), line, msg) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's up with this fatal()
? isn't this already what t.Fatalf()
prints by default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh nevermind , I missed this was in the assert
package. I have a PR somewhere that adds this as well. I'll resolve the conflict if this merges first/
Thanks @nishanttotla! Extremely helpful. |
a72ab39
to
bdba60a
Compare
Ok, this is updated. engine-api and swarmkit changes are vendored in. |
bdba60a
to
daeaadc
Compare
LGTM |
moved to docs review; just the API docs, then we should be able to merge |
daeaadc
to
04881f0
Compare
Docs updated. |
docs LGTM |
docs LGTM 🐯 |
hmf, is this a known issue in CI? https://jenkins.dockerproject.org/job/Docker-PRs/29631/console
|
could be related? |
It's a new test, I will have to update it before we merge. |
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
In the API: `Writable` changed to `ReadOnly` `Populate` changed to `NoCopy` Corresponding CLI options updated to: `volume-writable` changed to `volume-readonly` `volume-populate` changed to `volume-nocopy` Signed-off-by: Brian Goff <cpuguy83@gmail.com>
04881f0
to
56f3422
Compare
Whew, that's a good test. Issue with rebase had some lines mixed up. Seems CI took a vacation. |
retest this please |
Changes the
writable
CLI flag toreadonly
instead. This way CLI usersmust opt-in to readonly as is expected from
docker run
.The API is unchanged and defaults to to not writable.
Fixes #23915