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

Ignore not found models on destroy and backup. #7956

Merged
merged 2 commits into from
Oct 24, 2017

Conversation

anastasiamac
Copy link
Contributor

Description of change

There are several circumtances under which behavior described in the linked bug can occur. Specifically, anywhere where we have a list of models but any model can be destroyed while we are iterating over the list.
We have addressed the actual listing of models. This PR addresses model destruction and backup.

Bug reference

https://bugs.launchpad.net/juju/+bug/1721786

Copy link
Contributor

@axw axw left a comment

Choose a reason for hiding this comment

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

LGTM, but I think the restore one is dubious.

@@ -277,6 +277,10 @@ func (b *backups) Restore(backupId string, dbInfo *DBInfo, args RestoreArgs) (na
for _, modelUUID := range modelUUIDs {
st, release, err := pool.Get(modelUUID)
if err != nil {
// This model could have been removed.
Copy link
Contributor

Choose a reason for hiding this comment

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

we're restoring, so they shouldn't have been removed?

@anastasiamac
Copy link
Contributor Author

Removed the change in restore to avoid controversy. Let's wait until we see the need for it.
$$merge$$

@jujubot
Copy link
Collaborator

jujubot commented Oct 24, 2017

Status: merge request accepted. Url: http://ci.jujucharms.com/job/github-merge-juju

@jujubot jujubot merged commit 2f3b93a into juju:develop Oct 24, 2017
@anastasiamac anastasiamac deleted the ignore-not-found-on-destroy branch October 24, 2017 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants