Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Add Busy status to models when upgrading #6763
Conversation
| @@ -210,6 +211,42 @@ func (info *UpgradeInfo) isModelUUIDUpgradeDone() (bool, error) { | ||
| return n > 0, nil | ||
| } | ||
| +// upgradeStatusHistoryAndOps sets the model's status history and returns ops for | ||
| +// setting model status according to the UpgradeStatus. | ||
| +func upgradeStatusHistoryAndOps(st *State, upgradeStatus UpgradeStatus, now int64) ([]txn.Op, error) { |
| + if err != nil { | ||
| + return nil, errors.Trace(err) | ||
| + } | ||
| + globalKey := model.globalKey() |
howbazaar
Jan 9, 2017
Owner
Don't do this. You are getting a database object for no reason. Just use the 'modelGlobalKey' constant.
| + switch upgradeStatus { | ||
| + case UpgradeComplete: | ||
| + modelStatus = status.Available | ||
| + msg = "recently upgraded" |
perrito666
changed the title from
Add "is controller upgrading" to status.
to
Add Busy status to models when upgrading
Jan 12, 2017
|
hey @howbazaar please re-check this after the changes, tx also !!rerunchecks!! |
|
!!build!! |
|
!!build!! |
|
!!wouldyouwbuildthisffs!! |
|
!!retry!! |
|
!!Ireallyhatethisbot!! |
jameinel
approved these changes
Mar 22, 2017
This looks reasonable to me, I'd like Tim to give it a once-over and then we'll merge it.
|
@jameinel bollocks, we now need to make sure we migrate the status and status history for models. We could do that in a follow up branch as long as it gets in for 2.2. |
|
$$merge$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
jujubot
merged commit 39307c9
into
juju:develop
Mar 23, 2017
1 check passed
github-check-merge-juju
Built PR, ran unit tests, and tested LXD deploy. Use !!.*!! to request another build. IE, !!build!!, !!retry!!
Details
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
perrito666 commentedJan 4, 2017
•
Edited 1 time
-
perrito666
Jan 4, 2017
Model Status now holds upgrading information, useful
for automation scripts that require to wait on
juju until upgrade is complete.
QA Steps
Deploy this version of juju and upgrade
Run juju status and model status should be busy with a message indicating that the upgrade is taking place or available with a message indicating that upgrade just took place.