worker/uniter: handle conflicted upgrades #3121

Merged
merged 4 commits into from Aug 27, 2015

Conversation

Projects
None yet
2 participants
Member

axw commented Aug 27, 2015

This PR fixes conflicted upgrade handling. If an
upgrade fails due to a conflict, we now set the
LocalState's Conflicted field to true, and then
we clear it when an upgrade operation is committed.

When in the conflicted state, we only accept two
methods of progressing: hook resolution, or a
forced upgrade. One creates a resolved-upgrade op,
and the other creates a revert-upgrade op. If
neither of these is true, we'll just for a state
change.

We also simplify handling of the Stopped local
state. If the unit has already run the Stop hook,
then it should not generate any more operations.
So we now check for life==Dead or Stopped at the
top of NextOp.

(Review request: http://reviews.vapour.ws/r/2500/)

Member

axw commented Aug 27, 2015

$$merge$$

Contributor

jujubot commented Aug 27, 2015

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

Contributor

jujubot commented Aug 27, 2015

Build failed: Tests failed
build url: http://juju-ci.vapour.ws:8080/job/github-merge-juju/4504

axw added some commits Aug 27, 2015

worker/uniter: handle conflicted upgrades
This PR fixes conflicted upgrade handling. If an
upgrade fails due to a conflict, we now set the
LocalState's Conflicted field to true, and then
we clear it when an upgrade operation is committed.

When in the conflicted state, we only accept two
methods of progressing: hook resolution, or a
forced upgrade. One creates a resolved-upgrade op,
and the other creates a revert-upgrade op. If
neither of these is true, we'll just for a state
change.

We also simplify handling of the Stopped local
state. If the unit has already run the Stop hook,
then it should not generate any more operations.
So we now check for life==Dead or Stopped at the
top of NextOp.
worker/uniter: unskip more upgrade tests
Both TestUniterUpgradeGitConflicts and
TestUniterUpgradeOverwrite are fixed
too, so uncomment them.
Member

axw commented Aug 27, 2015

$$merge$$

Contributor

jujubot commented Aug 27, 2015

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

jujubot added a commit that referenced this pull request Aug 27, 2015

Merge pull request #3121 from axw/uniter-upgrade-conflicts
worker/uniter: handle conflicted upgrades

This PR fixes conflicted upgrade handling. If an
upgrade fails due to a conflict, we now set the
LocalState's Conflicted field to true, and then
we clear it when an upgrade operation is committed.

When in the conflicted state, we only accept two
methods of progressing: hook resolution, or a
forced upgrade. One creates a resolved-upgrade op,
and the other creates a revert-upgrade op. If
neither of these is true, we'll just for a state
change.

We also simplify handling of the Stopped local
state. If the unit has already run the Stop hook,
then it should not generate any more operations.
So we now check for life==Dead or Stopped at the
top of NextOp.

(Review request: http://reviews.vapour.ws/r/2500/)

@jujubot jujubot merged commit ed44bb5 into juju:maltese-falcon Aug 27, 2015

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