resolved always executes hooks
Bug #814987 reported by
Clint Byrum
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pyjuju |
Fix Released
|
High
|
Kapil Thangavelu | ||
juju (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Oneiric |
Won't Fix
|
High
|
Unassigned |
Bug Description
If I have uploaded a bad formula, I will need to fix my formula, and upgrade the formula.
I can't do that while the state is broken though. So the simplest way is to do an 'ensemble resolved' on the service units (though that would be kind of silly with 100 units, I think that is another bug entirely). However, when I do that, they re-run the config-changed hook, returning the state to broken.
config-changed should respect whether I ran resolved with --retry.
Related branches
lp:~hazmat/pyjuju/retry-sans-hook
- Jim Baker (community): Approve
-
Diff: 46 lines (+3/-4)3 files modifiedjuju/agents/tests/test_unit.py (+0/-1)
juju/agents/unit.py (+2/-2)
juju/state/service.py (+1/-1)
Changed in ensemble: | |
milestone: | none → dublin |
importance: | Undecided → Medium |
Changed in ensemble: | |
milestone: | dublin → none |
Changed in juju: | |
milestone: | eureka → florence |
Changed in juju: | |
assignee: | nobody → Kapil Thangavelu (hazmat) |
status: | New → In Progress |
summary: |
- config-changed hook is retried on 'resolved' even when --retry is not - passed + resolved always executes hooks |
Changed in juju: | |
status: | In Progress → Fix Released |
Changed in juju (Ubuntu): | |
status: | New → Fix Released |
Changed in juju (Ubuntu Oneiric): | |
status: | New → Triaged |
importance: | Undecided → High |
To post a comment you must log in.
Was that an actual issue somehow?
It seems to me that this would be a nice default behavior. config-changed must necessarily be idempotent since it will be executed every time the configuration changes, which means reexecuting after a failure is a safe behavior.
I suggest we maintain this behavior, and reuse the same logic for all hooks we're sure are idempotent.