juju resolve doesn't recognize error state
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | juju-core |
High
|
Ian Booth | ||
Bug Description
Using the latest version of juju core (as of 2015-02-20), I am unable to resolve a unit in an error state. I'm able to reproduce the error even after destroying and bootstrapping the environment.
vagrant@
environment: local
machines:
"2":
agent-state: started
agent-version: 1.23-alpha1.1
dns-name: 10.0.3.175
instance-id: vagrant-
series: trusty
hardware: arch=amd64
services:
siege:
charm: local:trusty/
exposed: false
units:
siege/0:
machine: "2"
vagrant@
ERROR unit "siege/0" is not in an error state
| Adam Israel (aisrael) wrote : | #1 |
| tags: | added: resolved |
| Changed in juju-core: | |
| milestone: | none → 1.23 |
| status: | New → Fix Released |
| Liam Young (gnuoy) wrote : | #2 |
I don't think this is fixed. Using the latest version of juju-core:
git log -p -1
commit 1852e2d84f40717
Merge: 2d5676e 7bd3309
Author: Juju bot <email address hidden>
Date: Wed Mar 4 08:56:34 2015 +0000
Merge pull request #1720 from TheMue/
Ported fix #1425435 from 1.22 to master
(Review request: http://
I can reproduce with:
mkdir -p ~/1424069/trusty
cd ~/1424069/trusty
bzr branch lp:charms/trusty/ubuntu
echo "exit 1" >> ~/1424069/
cd ~/1424069
juju bootstrap --upload-tools
juju deploy local:trusty/ubuntu
When the ubuntu/0 is in the error state try and resolve:
juju resolved --retry ubuntu/0
ERROR unit "ubuntu/0" is not in an error state
| Liam Young (gnuoy) wrote : | #3 |
Looks to me like it broke between f4e2307 and 0123494
Broken 0123494bcc00244
Working f4e2307bea5f8d0
| Adam Israel (aisrael) wrote : | #4 |
Confirming, I am still able to reproduce this bug after updating from trunk (commit e5cca4e6abfc935
| Changed in juju-core: | |
| status: | Fix Released → Triaged |
| importance: | Undecided → High |
| tags: | added: regression |
| Changed in juju-core: | |
| milestone: | 1.23 → 1.23-beta1 |
| importance: | High → Critical |
| Cheryl Jennings (cherylj) wrote : | #5 |
Looking...
| Changed in juju-core: | |
| assignee: | nobody → Cheryl Jennings (cherylj) |
| Cheryl Jennings (cherylj) wrote : | #6 |
From what I can see, the issue is that when this install hook fails, the state of the UnitAgent is set to "error", but when trying to run the juju resolved command, that command checks the state of the Unit, not the UnitAgent. The state of the Unit is never changed.
I need to talk with perrito666 to determine what should happen here.
| Changed in juju-core: | |
| assignee: | Cheryl Jennings (cherylj) → Ian Booth (wallyworld) |
| status: | Triaged → In Progress |
| Changed in juju-core: | |
| status: | In Progress → Fix Committed |
| Liam Young (gnuoy) wrote : | #7 |
I've retested and it lgtm. Thanks!
| Changed in juju-core: | |
| importance: | Critical → High |
| Changed in juju-core: | |
| status: | Fix Committed → Fix Released |


For what it's worth, I did a `git checkout 471eb0e31d8c9c9 94de816619a1ab6 8a75697830` , and as of that commit I am able to resolve a unit in error state.