juju resolve doesn't recognize error state

Bug #1424069 reported by Adam Israel
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
juju-core
Fix Released
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@vagrant-ubuntu-trusty-64:~$ juju status siege
environment: local
machines:
  "2":
    agent-state: started
    agent-version: 1.23-alpha1.1
    dns-name: 10.0.3.175
    instance-id: vagrant-local-machine-2
    series: trusty
    hardware: arch=amd64
services:
  siege:
    charm: local:trusty/siege-1
    exposed: false
    units:
      siege/0:
        agent-state: error
        agent-state-info: 'hook failed: "config-changed"'
        agent-version: 1.23-alpha1.1
        machine: "2"
        public-address: 10.0.3.175
vagrant@vagrant-ubuntu-trusty-64:~$ juju resolved siege/0
ERROR unit "siege/0" is not in an error state

Revision history for this message
Adam Israel (aisrael) wrote :

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

Curtis Hovey (sinzui)
tags: added: resolved
Changed in juju-core:
milestone: none → 1.23
status: New → Fix Released
Revision history for this message
Liam Young (gnuoy) wrote :

I don't think this is fixed. Using the latest version of juju-core:

git log -p -1
commit 1852e2d84f40717d88d8172d2a1f3ddcaca01305
Merge: 2d5676e 7bd3309
Author: Juju bot <email address hidden>
Date: Wed Mar 4 08:56:34 2015 +0000

    Merge pull request #1720 from TheMue/fix-1425435-master

    Ported fix #1425435 from 1.22 to master

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

I can reproduce with:

mkdir -p ~/1424069/trusty
cd ~/1424069/trusty
bzr branch lp:charms/trusty/ubuntu
echo "exit 1" >> ~/1424069/trusty/ubuntu/hooks/install
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

Revision history for this message
Liam Young (gnuoy) wrote :

Looks to me like it broke between f4e2307 and 0123494

Broken 0123494bcc00244b7c99849591bae28715f73996 Mon Feb 16 13:37:06 2015 +0000
Working f4e2307bea5f8d0efb518e0b2dc59c9f097b6cdb Fri Feb 13 10:53:20 2015 +0000

Revision history for this message
Adam Israel (aisrael) wrote :

Confirming, I am still able to reproduce this bug after updating from trunk (commit e5cca4e6abfc935c9475a5f80f261c4367b4c9c8)

Curtis Hovey (sinzui)
Changed in juju-core:
status: Fix Released → Triaged
importance: Undecided → High
Curtis Hovey (sinzui)
tags: added: regression
Curtis Hovey (sinzui)
Changed in juju-core:
milestone: 1.23 → 1.23-beta1
importance: High → Critical
Revision history for this message
Cheryl Jennings (cherylj) wrote :

Looking...

Changed in juju-core:
assignee: nobody → Cheryl Jennings (cherylj)
Revision history for this message
Cheryl Jennings (cherylj) wrote :

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.

Ian Booth (wallyworld)
Changed in juju-core:
assignee: Cheryl Jennings (cherylj) → Ian Booth (wallyworld)
status: Triaged → In Progress
Ian Booth (wallyworld)
Changed in juju-core:
status: In Progress → Fix Committed
Revision history for this message
Liam Young (gnuoy) wrote :

I've retested and it lgtm. Thanks!

Curtis Hovey (sinzui)
Changed in juju-core:
importance: Critical → High
Curtis Hovey (sinzui)
Changed in juju-core:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.