Repository navigation
graphdriver: prefer prior driver state - #11999
Conversation
There was a problem hiding this comment.
Can this be a map[string]struct{} instead so we don't have to double-loop above?
There was a problem hiding this comment.
I don't think I'll do a map here, because that would be unordered and still require the comparison. Perhaps I can just revisit the double iteration
There was a problem hiding this comment.
@tianon @thaJeztah right here, you're saying that unlike below, in this scan for prior, if it is found and is not supported/compatible/prereq then it should fail. Right?
There was a problem hiding this comment.
Since then the user gets to make the choice of either fix their system to get support back, or to switch Docker's backend explicitly.
There was a problem hiding this comment.
also, are we saying as well, if len(priorDrivers) > 1 bail as well?
There was a problem hiding this comment.
because that could seem problematic ...
There was a problem hiding this comment.
(Hmf GitHub cache (only noticed the comments above))
Yes, I think if there's any doubt; ask the user.
Users searching for "my images disappeared" problems cluttering the issue tracker (or worse; blogging about it first) isn't the best user experience.
A clear error (if possible) with clear instructions seems the better choice.
There was a problem hiding this comment.
dfa69eb to
75aec33
Compare
|
Updated. PTAL |
|
I'll paste output from the use cases once I get my laptop on the www |
There was a problem hiding this comment.
Hahaha
On Apr 1, 2015 5:59 PM, "Sebastiaan van Stijn" [email protected]
wrote:
In daemon/graphdriver/driver.go
#11999 (comment):
}for _, prior := range priorDrivers {// of the state found from prior drivers, check in order of our priority// which we would preferif prior == name {driver, err = GetDriver(name, root, options)if err != nil {// unlike below, we will return error here, because there is prior// state, and now it is no longer supported/prereq/compatible, so// something changed and needs attention. Otherwise the daemon's// images would just "disappear".logrus.Errorf("[graphdriver] prior storage driver %q failed: %s", name, err)return nil, err}logrus.Infof("[graphdriver] using prior storage driver %q", name)checkPriorDriver(name, root) // print out beacause there may be multiples/beacause/because/
—
Reply to this email directly or view it on GitHub
https://github.com/docker/docker/pull/11999/files#r27616218.
|
Thanks so much, @vbatts for picking this up. Hope the maintainers can agree on this approach. Only thing I think might be needed, is some basic instructions/pointers to the user how to solve the issue, but perhaps this can be added after is clear if this direction can be agreed upon. |
75aec33 to
5b901d5
Compare
|
|
@jfrazelle @crosbymichael @unclejack @tiborvass there's been discussion here and it's ready for your review. LMKWYT |
|
LGTM |
There was a problem hiding this comment.
I don't understand the point in keeping this, am i missing something, its just iterating the range again
There was a problem hiding this comment.
for the sake of a print out. At this point you would get an output of the chosen driver, then if there were more than 1 prior drivers (not including vfs) then you'll see output that there is additional state present.
There was a problem hiding this comment.
@jfrazelle like the WARN from the last section of #11999 (comment)
There was a problem hiding this comment.
I assume this is related to the comment to the right: it's being used to print out the (existing) log message that roughly says "hey, we're using driver XYZ, but you have data managed by {list of prior drivers}". Given you already know if "len(priorDrivers) > 0" you could add the message directly here, but given the list is short (and I assume it has little room to grow by any large measure), it isn't much of a hit to scan the list again.
I think the function might just be more clearly renamed as "logPriorDrivers()"?
There was a problem hiding this comment.
fair. and since we're now acting on the prior drivers, the call to checkPriorDriver() in the subsequent loops will not even be needed. This output would only ever be needed at this very spot. I'll fix that.
5b901d5 to
50616a5
Compare
|
rebased on master, for good measure |
|
I think you found the wrath of docker-py in the latest janky run, but other than that need for re-run, I like this. Especially if we want more use of overlay, I don't see how we get that until it becomes a default for new uses, and this allows that and keeps from frustrating upgraders from aufs. |
|
@estesp yep. That's the plan. |
|
IMO, should be fatal. If there's any ambiguity, then just guessing isn't going to help the user out very much, and will instead just hide the problem and they'll never know. I'm fully +1 to forcing the user to disambiguate manually via |
|
@crosbymichael @jfrazelle @tiborvass @unclejack ^^ thoughts? |
|
im with @tianon no sense in guessing |
50616a5 to
5ade252
Compare
|
alrighty. Updated PTAL @jfrazelle @tianon |
|
Nice! That literal error should probably be added to the docs somewhere so that people can Goooogle it. (guess #11999 (comment) would be too verbose for a daemon error) |
There was a problem hiding this comment.
I'd get rid of what driver is selected and just say why it's bailing out.
Also should include something like you must explicitly set a storage driver
|
@thaJeztah I'll truncate that down as much as possible. I don't much care for newlines in the log lines. |
5ade252 to
2819972
Compare
|
LGTM anyone else want to review before merge? |
|
LGTM |
|
ick. Should i split the overlay promotion into its own PR, since the
|
sgtm (but not my say :)) |
|
sgtm, and idk if regressions necessarily because they fail on 1.5.0 too On Mon, Apr 13, 2015 at 3:54 PM, Sebastiaan van Stijn <
|
|
but we should definitely fix before promoting to no.1 On Mon, Apr 13, 2015 at 3:55 PM, Jessica Frazelle [email protected] wrote:
|
2819972 to
4c29682
Compare
4c29682 to
deec690
Compare
Before this, a storage driver would be defaulted to based on the priority list, and only print a warning if there is state from other drivers. This meant a reordering of priority list would "break" users in an upgrade of docker, such that there images in the prior driver's state were now invisible. With this change, prior state is scanned, and if present that driver is preferred. As such, we can reorder the priority list, and after an upgrade, existing installs with prior drivers can have a contiguous experience, while fresh installs may default to a driver in the new priority list. Ref: moby#11962 (comment) Signed-off-by: Vincent Batts <[email protected]>
deec690 to
b68e161
Compare
|
updated to only be the prior-driver priority selection. overlay promotion is now #12354 PTAL |
|
Don't see any downsides, so LGTM :) |
|
LGTM |
graphdriver: prefer prior driver state
|
@jfrazelle I think this didn't make it in 1.6? |
|
ya it didnt need to |
Before this, a storage driver would be defaulted to based on the
priority list, and only print a warning if there is state from other
drivers.
This meant a reordering of priority list would "break" users in an
upgrade of docker, such that there images in the prior driver's state
were now invisible.
With this change, prior state is scanned, and if present that driver is
preferred.
As such, we can reorder the priority list, and after an upgrade,
existing installs with prior drivers can have a contiguous experience,
while fresh installs may default to a driver in the new priority list.
Ref: #11962 (comment)
Upgrade overlayfs to first place, now that this will not break driver
usage on existing installs. See #12354 for overlay promotion.
/cc @jfrazelle @crosbymichael @tianon @unclejack