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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create labels when volume exists only remotely #34896

Merged
merged 1 commit into from
Nov 15, 2017

Conversation

cpuguy83
Copy link
Member

@cpuguy83 cpuguy83 commented Sep 19, 2017

Before this, if a volume exists in a driver but not in the local cache,
the store would just return a bare volume. This means that if a user
supplied options or labels, they will not get stored.

Instead only return early if we have the volume stored locally. Note
this could still have an issue with labels/opts passed in by the user
differing from what is stored, however this isn't really a new problem.

There is a minor behavior change in the interaction with the volume
driver in that create is called each time instead of doing a
get and then create. This shouldn't be a problem as the get was just a
best effort and create is expected to be idempotent.

This fixes a problem where if there is a shared storage backend between
two docker nodes, a create on one node will have labels stored and a
create on the other node will not.

@cpuguy83
Copy link
Member Author

ping @srust @clintkitson @gourao

@sixcounts
Copy link

@tiborvass any idea when this pull request will get merged for an engine release?

Thank you

@sixcounts
Copy link

@tiborvass any ETA as to when this will get merged into which release? I have a customer that has been having problems with this Docker Certified Rex-Ray PlugIn for EMC's Isilon for several months now.

Thank you,

Josh

@sixcounts
Copy link

@cpuguy83 @tiborvass there is a meeting with this customer this week and we need a solid update to give them. Can someone provide an update on to when this will be merged and what release will address it? This stemmed from the Docker Certified Plugin for Rex-Rex for EMC Isilon:

rexray/rexray#989

Thank you,

Josh

@thaJeztah
Copy link
Member

@sixcounts for certified plugins it'll have to end up in a Docker EE release, so that would have to be back-ported by Docker; it's best to open a backport request for that internally.

@moby moby deleted a comment from sixcounts Nov 8, 2017
if err != nil {
return nil, &OpErr{Op: "create", Name: name, Err: err}
}

logrus.Debugf("Registering new volume reference: driver %q, name %q", vd.Name(), name)

if v, _ := vd.Get(name); v != nil {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I don't need to get rid of this... may need to revisit, but just need to ensure that labels are stored locally.

@cpuguy83 cpuguy83 force-pushed the store_labels_when_exists branch from 7e70776 to c99431e Compare November 9, 2017 20:10
Before this, if a volume exists in a driver but not in the local cache,
the store would just return a bare volume. This means that if a user
supplied options or labels, they will not get stored.

Instead only return early if we have the volume stored locally. Note
this could still have an issue with labels/opts passed in by the user
differing from what is stored, however this isn't really a new problem.

This fixes a problem where if there is a shared storage backend between
two docker nodes, a create on one node will have labels stored and a
create on the other node will not.

Signed-off-by: Brian Goff <[email protected]>
@vieux
Copy link
Contributor

vieux commented Nov 13, 2017

@cpuguy83 if is ready to merge ?

@cpuguy83
Copy link
Member Author

I'm happy with it, no behavior change in volume driver interaction like was originally implemented.

On mobile so I can't inspect that windows error at the moment.

@vieux
Copy link
Contributor

vieux commented Nov 13, 2017

@cpuguy83

21:33:58 ----------------------------------------------------------------------
21:33:58 FAIL: docker_cli_logs_test.go:92: DockerSuite.TestLogsTail
21:33:58 
21:33:58 docker_cli_logs_test.go:113:
21:33:58     c.Assert(lines, checker.HasLen, testLen+1)
21:33:58 ... obtained []string = []string{""}
21:33:58 ... n int = 101
21:33:58 
21:34:05 
21:34:05 ----------------------------------------------------------------------

I restarted

@vieux
Copy link
Contributor

vieux commented Nov 14, 2017

LGTM

1 similar comment
@tonistiigi
Copy link
Member

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants