Comment 1 for bug 1359827

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