deprecate bind path auto-create#16349
Conversation
a1f61a6 to
b66102b
Compare
|
@cpuguy83 I think we should show a warning in the client when this happens. @docker/maintainers Please, take a look. This is source of much confusion among users and we'd like to deprecate it. |
|
warning is fine for me |
|
Definitely +1 for deprecation, and +1 for a warning 👍 🤘 |
|
sgtm |
|
Just to clarify, I meant to show a warning saying that we auto-created the directory but it's a deprecated feature and we're going to stop doing it. |
|
Agreed for deprecating/removing it, SGTM |
|
+1 for removing this "feature", and +1 for outputting a warning now (including a "deprecation" message?) (If we want a "warning" in 1.9, please add that change to this PR) The documentation changes in this PR can use a slight touch-up, but I'll wait until it's been agreed on. |
|
Presenting the user with a warning is not a small change. Not sure about presenting a warning to the user here unless we just do it for all binds. |
|
And then it would just be on the client. |
|
LGTM @thaJeztah touch up at will it looks ok by me. Didn't we just have a pr touching on bind mount --- #13776? Does that language still work in light of this...bit late for me...maybe I'm not clear |
|
👍 |
|
@cpuguy83 maybe the daemon log is good enough, that's what we did with LXC: Can you add it here? |
b66102b to
39d4b12
Compare
|
Pushed with daemon log added. |
daemon/volumes.go
Outdated
There was a problem hiding this comment.
This needs to check for an error that is not a os.IsNotExist and handle that appropriately:
if fi, err := os.Stat(m.Source); err != nil {
if !os.IsNotExist(err) {
//.. handle error
}
logrus.Warnf("Auto-creating non-existant volume host path %s, this is deprecated and will be removed soon", m.Source)
}There was a problem hiding this comment.
I suppose we can, though this would picked up by the subsequent os.MkdirAll anyway.
But since we're already adding the stat call, might as well handle earlier.
There was a problem hiding this comment.
hah, the worst part is we were already doing this, and this is already wrapped in a stat call... silly me.
Signed-off-by: Brian Goff <[email protected]>
39d4b12 to
249f45b
Compare
|
LGTM |
|
LGTM. Merging since #16287 takes care of the deprecation note in the run page mentioned by @moxiegirl . |
deprecate bind path auto-create
|
The way I'm understanding this, if
There isn't even a warning. Am I misreading this? |
|
@m59peacemaker this change was later reverted; see #19953 (comment), and #21666 |
|
@thaJeztah Well, that's unfortunate.. I commented my issue here: #19953 (comment) Thanks for letting me know. |
|
@thaJeztah Auto-creation of bind paths is why we can't have nice things. This model is extremely broken. Any way we can re-deprecate this? |
|
@stevvooe I know 😞. To re-deprecate, I think best start would be to open an issue or PR for discussion |
|
We can't deprecate this, there are scripts relying on this misfeature. |
|
I wish we got the new mounts (for containers) API in for 1.12 so that at least services didn't have to propagate this nastiness. |
|
@tiborvass The |
|
In my opinion the directory auto-creation and mounting a host file as a data volume are incompatible options. If you truly want to have a feature like this you would need options like:
and also have an option for
This way you have full control over the result of starting a container. For now, just being able to disable autocreation with |
|
Plans are to provide an "advanced" syntax for The current "shorthand" syntax for bind-mounts |
|
@thaJeztah thanks a lot for the update. That sounds really good and makes a lot of sense. Looking forward to see those changes :) |
|
wise decision to leave existing syntax's behavior unchanged. some monitoring solutions leverages the auto-create feature to install their software. |
|
To update my earlier comment: the |
Fixes #16302
Fixes #12776
Fixes #13468
I'm sure a few more that I could not find again.
ping @calavera