KeyError for units that were added by add_unit

Bug #1296780 reported by Matt Bruzek
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Amulet
Fix Released
Critical
Tim Van Steenburgh

Bug Description

I am using the new add_unit() method in amulet and I can not access any of the additional units as I would the normal units.

Traceback (most recent call last):
  File "tests/10-deploy-test.py", line 98, in <module>
    osd_units.append(d.sentry.unit['ceph-osd/%s' % n])
KeyError: 'ceph-osd/1'

The juju status command shows me that there is a unit named "ceph-osd/1" in my deployment.
$ juju status
environment: hp-mbruzek
machines:
  "0":
    agent-state: started
    agent-version: 1.17.6
    dns-name: 15.185.121.156
    instance-id: "3821995"
    instance-state: ACTIVE
    series: precise
    hardware: arch=amd64 cpu-cores=1 mem=1024M root-disk=30720M
  "1":
    agent-state: started
    agent-version: 1.17.6
    dns-name: 15.185.92.50
    instance-id: "3822055"
    instance-state: ACTIVE
    series: precise
    hardware: arch=amd64 cpu-cores=1 mem=1024M root-disk=30720M
  "2":
    agent-state: started
    agent-version: 1.17.6
    dns-name: 15.185.126.75
    instance-id: "3822059"
    instance-state: ACTIVE
    series: precise
    hardware: arch=amd64 cpu-cores=1 mem=1024M root-disk=30720M
  "3":
    agent-state: started
    agent-version: 1.17.6
    dns-name: 15.185.90.136
    instance-id: "3822061"
    instance-state: ACTIVE
    series: precise
            upgrading-from: local:precise/ceph-radosgw-sentry-0
            agent-state: started
            agent-version: 1.17.6
            open-ports:
            - 9001/tcp
            public-address: 15.185.90.136
  ceph-radosgw-sentry:
    charm: local:precise/ceph-radosgw-sentry-0
    exposed: true
    relations:
      juju-info:
      - ceph-radosgw
    subordinate-to:
    - ceph-radosgw
  ceph-sentry:
    charm: local:precise/ceph-sentry-0
    exposed: true
    relations:
      juju-info:
      - ceph
    subordinate-to:
    - ceph
  relation-sentry:
    charm: local:precise/relation-sentry-0
    exposed: true
    relations:
      provides-ceph_osd-ceph-osd_mon:
      - ceph
      provides-ceph_radosgw-ceph-radosgw_mon:
      - ceph
      requires-ceph_osd-ceph-osd_mon:
      - ceph-osd
      requires-ceph_radosgw-ceph-radosgw_mon:
      - ceph-radosgw
    units:
      relation-sentry/0:
        agent-state: started
        agent-version: 1.17.6
        machine: "4"
        open-ports:
        - 9001/tcp
        public-address: 15.185.124.64

Please let me know if you need any other information.

Marco Ceppi (marcoceppi)
Changed in amulet:
status: New → Triaged
assignee: nobody → Marco Ceppi (marcoceppi)
importance: Undecided → High
milestone: none → 1.4.1
Marco Ceppi (marcoceppi)
Changed in amulet:
importance: High → Critical
Marco Ceppi (marcoceppi)
Changed in amulet:
milestone: 1.4.1 → 1.5.0
Changed in amulet:
assignee: Marco Ceppi (marcoceppi) → Tim Van Steenburgh (tvansteenburgh)
status: Triaged → In Progress
Revision history for this message
Tim Van Steenburgh (tvansteenburgh) wrote :
Changed in amulet:
status: In Progress → Fix Committed
Marco Ceppi (marcoceppi)
Changed in amulet:
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.