Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Don't schedule placeholder resource cleanup #6702
Conversation
mjs
added some commits
Dec 14, 2016
| +func IsBlobStored(c *gc.C, st *State, storagePath string) bool { | ||
| + stor := storage.NewStorage(st.ModelUUID(), st.MongoSession()) | ||
| + r, _, err := stor.Get(storagePath) | ||
| + if err == nil { |
anastasiamac
Dec 14, 2016
Member
This reads funny, but maybe only to me...
Would it not be simpler to start with:
...
if err != nil {
if errors.isNotFound(err) {
return false
}
r.Close()
return true
}
c.Fatalf(...)
return false
}
...
|
$$merge$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
jujubot
merged commit d22c32f
into
juju:2.1
Dec 14, 2016
mjs
deleted the
mjs:1649179-placeholder-resource-cleanup
branch
Dec 14, 2016
mjs
referenced this pull request
Dec 15, 2016
Merged
Don't schedule placeholder resource cleanup #6716
added a commit
that referenced
this pull request
Dec 15, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
mjs commentedDec 14, 2016
Placeholder resources aren't stored in the blobstore and therefore don't need cleaning up. The fix has been made in two ways:
Fixes https://bugs.launchpad.net/juju/+bug/1649179
There was no testing at all for resource cleanup so this has also been rectified.
QA
Deployed the etcd charm as this uses a placeholder resource, and then removed it. Previously this would result in errors in the logs as the cleaner worker attempted to remove a resource which wasn't stored.