Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2106)

Issue 5752069: Supporting for forcing upgrades when unit not in started state.

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 1 month ago by hazmat
Modified:
12 years, 1 month ago
Reviewers:
bcsaller, mp+96299, niemeyer
Visibility:
Public.

Description

Supporting for forcing upgrades when unit not in started state. Per user feedback/request. Supporting for forcing upgrades when unit not in started state. upgrade-charm hooks are not executed on a force upgrade. https://code.launchpad.net/~hazmat/juju/force-upgrade/+merge/96299 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 6

Patch Set 2 : Supporting for forcing upgrades when unit not in started state. #

Total comments: 1

Patch Set 3 : Supporting for forcing upgrades when unit not in started state. #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+155 lines, -42 lines) Patch
M .bzrignore View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
A [revision details] View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M juju/agents/tests/test_unit.py View 1 2 chunks +30 lines, -1 line 0 comments Download
M juju/agents/unit.py View 1 1 chunk +4 lines, -0 lines 0 comments Download
M juju/control/tests/test_destroy_environment.py View 1 2 chunks +2 lines, -0 lines 1 comment Download
M juju/control/tests/test_upgrade_charm.py View 1 2 1 chunk +16 lines, -0 lines 0 comments Download
M juju/control/upgrade_charm.py View 1 2 3 chunks +13 lines, -3 lines 0 comments Download
M juju/state/errors.py View 1 1 chunk +12 lines, -0 lines 1 comment Download
M juju/state/service.py View 1 3 chunks +33 lines, -11 lines 2 comments Download
M juju/state/tests/test_errors.py View 1 2 chunks +9 lines, -1 line 2 comments Download
M juju/state/tests/test_service.py View 1 7 chunks +22 lines, -10 lines 0 comments Download
M juju/unit/lifecycle.py View 1 2 chunks +3 lines, -3 lines 2 comments Download
M juju/unit/tests/test_lifecycle.py View 1 4 chunks +7 lines, -13 lines 0 comments Download

Messages

Total messages: 10
hazmat
Please take a look.
12 years, 1 month ago (2012-03-07 06:21:48 UTC) #1
bcsaller
This looks good, approved with the minors below. Given how much of the delta is ...
12 years, 1 month ago (2012-03-07 22:38:42 UTC) #2
hazmat
https://codereview.appspot.com/5752069/diff/1/juju/state/service.py File juju/state/service.py (right): https://codereview.appspot.com/5752069/diff/1/juju/state/service.py#newcode1034 juju/state/service.py:1034: self._upgrade_flag_path, yaml.dump(dict(force=force))) On 2012/03/07 22:38:43, bcsaller wrote: > I ...
12 years, 1 month ago (2012-03-07 23:16:58 UTC) #3
bcsaller
https://codereview.appspot.com/5752069/diff/1/juju/state/service.py File juju/state/service.py (right): https://codereview.appspot.com/5752069/diff/1/juju/state/service.py#newcode1036 juju/state/service.py:1036: raise ServiceUnitUpgradeAlreadyEnabled(self.unit_name) sounds reasonable On 2012/03/07 23:16:58, hazmat wrote: ...
12 years, 1 month ago (2012-03-07 23:19:14 UTC) #4
hazmat
Please take a look.
12 years, 1 month ago (2012-03-17 22:07:14 UTC) #5
niemeyer
https://codereview.appspot.com/5752069/diff/6001/juju/control/upgrade_charm.py File juju/control/upgrade_charm.py (right): https://codereview.appspot.com/5752069/diff/6001/juju/control/upgrade_charm.py#newcode56 juju/control/upgrade_charm.py:56: dry_run, force): Isn't there something missing below?
12 years, 1 month ago (2012-03-19 22:15:44 UTC) #6
hazmat
Please take a look.
12 years, 1 month ago (2012-03-20 03:04:33 UTC) #7
hazmat
On 2012/03/19 22:15:44, niemeyer wrote: > > juju/control/upgrade_charm.py:56: dry_run, force): > Isn't there something missing ...
12 years, 1 month ago (2012-03-20 03:05:16 UTC) #8
bcsaller
Some minors https://codereview.appspot.com/5752069/diff/10001/juju/control/tests/test_destroy_environment.py File juju/control/tests/test_destroy_environment.py (right): https://codereview.appspot.com/5752069/diff/10001/juju/control/tests/test_destroy_environment.py#newcode71 juju/control/tests/test_destroy_environment.py:71: @inlineCallbacks I hate it when that happens... ...
12 years, 1 month ago (2012-03-22 00:40:22 UTC) #9
hazmat
12 years, 1 month ago (2012-03-22 01:25:58 UTC) #10
Thanks for the review, besides the minors if you think its okay, please mark it
approved.

https://codereview.appspot.com/5752069/diff/10001/juju/state/service.py
File juju/state/service.py (right):

https://codereview.appspot.com/5752069/diff/10001/juju/state/service.py#newco...
juju/state/service.py:1045: raise
ServiceUnitUpgradeAlreadyEnabled(self.unit_name)
On 2012/03/22 00:40:22, bcsaller wrote:
> Is this important vs silently moving on? It makes sense to only check it if
the
> values are different like you do, but not sure if its worth the fallout.

i think it is, the user requested an activity, the system silently doing a
different activity is an error. this is path is directly attached to the cli.

https://codereview.appspot.com/5752069/diff/10001/juju/state/tests/test_error...
File juju/state/tests/test_errors.py (right):

https://codereview.appspot.com/5752069/diff/10001/juju/state/tests/test_error...
juju/state/tests/test_errors.py:104: error =
ServiceUnitDebugAlreadyEnabled("wordpress/0")
On 2012/03/22 00:40:22, bcsaller wrote:
> Looks like this is the wrong exception? The name doesn't reflect the message
and
> its not what was added in state/errors
ugh.. good catch. thanks.

https://codereview.appspot.com/5752069/diff/10001/juju/unit/lifecycle.py
File juju/unit/lifecycle.py (left):

https://codereview.appspot.com/5752069/diff/10001/juju/unit/lifecycle.py#oldc...
juju/unit/lifecycle.py:272: fire_hooks = True
On 2012/03/22 00:40:22, bcsaller wrote:
> Is this only to support testing? Do we want this in practice?

hmm.. good catch, this looks erroneous, should have conditional on force.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b