actions kicked off by juju remove-service not finishing

Bug #1359827 reported by Eric Snow
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-core
New
Undecided
Unassigned

Bug Description

After deploying a charm it settled into an error state (which I'm handling in a separate bug report). I tried removing the service that was created and nothing happened (even after +/- 1 hour). The failed service simply would not go away. I also tried to remove the unit and the machine. Neither worked. Eventually I destroyed the environment to clean everything up.

Tags: deploy
Revision history for this message
Eric Snow (ericsnowcurrently) wrote :

Here's a more specific breakdown of what I did:

$ juju bootstrap # local
...
$ juju deploy postgresql
$ juju status
environment: local
machines:
  "0":
    agent-state: started
    agent-version: 1.21-alpha1.1
    dns-name: localhost
    instance-id: localhost
    series: trusty
    state-server-member-status: has-vote
  "1":
    agent-state: started
    agent-version: 1.21-alpha1.1
    dns-name: 10.0.3.58
    instance-id: esnow-local-machine-1
    series: trusty
    hardware: arch=amd64
services:
  postgresql:
    charm: cs:trusty/postgresql-3
    exposed: false
    relations:
      replication:
      - postgresql
    units:
      postgresql/0:
        agent-state: error
        agent-state-info: 'hook failed: "install"'
        agent-version: 1.21-alpha1.1
        machine: "1"
        open-ports:
        - 5432/tcp
        public-address: 10.0.3.58
$ juju remove-service postgresql
# Nothing written to std*.
$ juju status
environment: local
machines:
  "0":
    agent-state: started
    agent-version: 1.21-alpha1.1
    dns-name: localhost
    instance-id: localhost
    series: trusty
    state-server-member-status: has-vote
  "1":
    agent-state: started
    agent-version: 1.21-alpha1.1
    dns-name: 10.0.3.58
    instance-id: esnow-local-machine-1
    series: trusty
    hardware: arch=amd64
services:
  postgresql:
    charm: cs:trusty/postgresql-3
    exposed: false
    life: dying
    units:
      postgresql/0:
        agent-state: error
        agent-state-info: 'hook failed: "install"'
        agent-version: 1.21-alpha1.1
        life: dying
        machine: "1"
        open-ports:
        - 5432/tcp
        public-address: 10.0.3.58

Removing the unit:

$ juju remove-unit postgresql/0
$ juju status
environment: local
machines:
  "0":
    agent-state: started
    agent-version: 1.21-alpha1.1
    dns-name: localhost
    instance-id: localhost
    series: trusty
    state-server-member-status: has-vote
  "1":
    agent-state: started
    agent-version: 1.21-alpha1.1
    dns-name: 10.0.3.58
    instance-id: esnow-local-machine-1
    series: trusty
    hardware: arch=amd64
services:
  postgresql:
    charm: cs:trusty/postgresql-3
    exposed: false
    life: dying
    units:
      postgresql/0:
        agent-state: error
        agent-state-info: 'hook failed: "install"'
        agent-version: 1.21-alpha1.1
        life: dying
        machine: "1"
        open-ports:
        - 5432/tcp
        public-address: 10.0.3.58

Removing the machine:

$ juju remove-machine 1
ERROR no machines were destroyed: machine 1 has unit "postgresql/0" assigned

Revision history for this message
Kapil Thangavelu (hazmat) wrote :

use juju remove-machine --force 1 will kill the unit and the machine.

Revision history for this message
Kapil Thangavelu (hazmat) wrote :

alternatively you can juju resolved postgresql/0 and wait, and do it again if there's another hook error (likely given the failure to install).

Curtis Hovey (sinzui)
tags: added: deploy
Revision history for this message
Eric Snow (ericsnowcurrently) wrote :

Good to know, Kapil. Feel free to close this ticket in lieu of #1219902.

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.