Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
resources: Don't run multiple cleanups for one storage path #7664
Conversation
babbageclunk
added some commits
Jul 21, 2017
babbageclunk
changed the title from
state: Fix resource blob cleanup when the blob is already gone
to
resources: Don't run multiple cleanups for one storage path
Jul 21, 2017
|
$$merge$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
jujubot
merged commit 099ed19
into
juju:2.2
Jul 21, 2017
1 check failed
github-check-merge-juju
Use !!.*!! to request another build. IE, !!build!!, !!retry!!
Details
babbageclunk
deleted the
babbageclunk:resource-cleanups
branch
Jul 23, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
babbageclunk commentedJul 21, 2017
•
Edited 1 time
-
babbageclunk
Jul 21, 2017
Description of change
Destroying an application with units would result in multiple cleanups being scheduled for the same storage path, because there are resource records for the application and the units. Change
ResourcePersistence.NewRemoveResourcesOpsto only schedule a cleanup once for a given path.If a resource blob had already been deleted from storage when the cleanup ran, it would fail (logging an error) and leave the cleanup record around. This would prevent migrations, since the source precheck
ensures there aren't any cleanups. If the blob's already gone, the cleanup should succeed.
QA steps
Bug reference
Fixes https://bugs.launchpad.net/juju/+bug/1705352