libopenstorage / stork

Stork - Storage Orchestration Runtime for Kubernetes
Apache License 2.0
391 stars 89 forks source link

snapshot not labeling volumesnapshot #69

Closed JWasdin closed 6 years ago

JWasdin commented 6 years ago

Is this a BUG REPORT or FEATURE REQUEST?: Bug Report

What happened: When trying to take down a deployment we noticed a certain volumesnapshot on a mongodb was not being removed. There was also a host failure on a portworx node during the request to take the volumesnapshots down. On inspection of the logged serialization of the snapshot resource, which was supposed to be deleted, mongodb-2, some of its release labels had been removed. There is only one occurrence of the label in mongodb-2, whereas, in another mongodb node, which did successfully shutdown, there were 3 label references.

We believe there may be a race condition between our labeling of the resource and Stork fetching it from kubernetes. This race condition is fine, except Stork does not do a differential update and so replaces the labels with their old resource version thus preventing us from actions to the resource based on label reference.

What you expected to happen: We would expect the release label would not be overwritten as Stork would do a differential update instead of an overwrite.

How to reproduce it (as minimally and precisely as possible): Create a snapshot, add label immediately after creation, then attempt an update via Stork. See if the initial labels have been maintained on the snapshot or removed by the Stork upgrade.

Anything else we need to know?: This issue request is for Vertiv SRE

Environment:

disrani-px commented 6 years ago

Filed a bug in kubernetes for this: https://github.com/kubernetes-incubator/external-storage/issues/738 Will submit a fix.

JWasdin commented 6 years ago

Thanks @disrani-px

cehoffman commented 6 years ago

Whats the plan on a new release? If not soon we can look at bringing in a vendor scheme to produce our own builds.

disrani-px commented 6 years ago

@cehoffman New release (v1.1) should be out in a few days