Change rollback-agents to abort #24

Merged
merged 3 commits into from Sep 1, 2017

Conversation

Projects
None yet
2 participants
Member

babbageclunk commented Sep 1, 2017

It now will also remove the imported model from the target controller (as
long as it hasn't been activated). If aborting the model fails, the
agents will still be rolled back (and vice versa).

Member

babbageclunk commented Sep 1, 2017

This follows on from #23, the earlier two commits don't need separate reviewing here.

@babbageclunk babbageclunk requested a review from axw Sep 1, 2017

axw approved these changes Sep 1, 2017

commands/abort.go
+ if err != nil {
+ // We still want to rollback the agent upgrades, so just
+ // report this and continue.
+ logger.Errorf("failed to abort model: %s", err.Error())
@axw

axw Sep 1, 2017

Member

should probably still cause the command to report non-zero at the end, if rolling back agents succeeds

@babbageclunk

babbageclunk Sep 1, 2017

Member

Oh yeah, good point! I'll change that.

babbageclunk added some commits Sep 1, 2017

Change rollback-agents to abort
It now will also remove the imported model from the target controller (as
long as it hasn't been activated). If importing the model fails, the
agents will still be rolled back.
Return nonzero code if model abort fails
Even if rolling back the agents succeeds.

@babbageclunk babbageclunk merged commit bafa840 into juju:master Sep 1, 2017

@babbageclunk babbageclunk deleted the babbageclunk:abort branch Sep 1, 2017

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