Hook error for admin relation on Xenial and Bionic

Bug #1891217 reported by Cory Johns
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack ceph-mon charm
Cory Johns

Bug Description

The 'mgr' cap was introduced in Ceph Nautilus, but the fix for https://bugs.launchpad.net/charm-ceph-mon/+bug/1867795 didn't guard for this, leading to any Xenial deployment and any Bionic deployment which doesn't specify either cloud:bionic-train or cloud:bionic-ussuri and has the admin relation attached raising the following hook error:

Error EINVAL: unknown cap type 'mgr'
Traceback (most recent call last):
  File "/var/lib/juju/agents/unit-ceph-mon-0/charm/hooks/mon-relation-changed", line 1084, in <module>
  File "/var/lib/juju/agents/unit-ceph-mon-0/charm/hooks/charmhelpers/core/hookenv.py", line 943, in execute
  File "/var/lib/juju/agents/unit-ceph-mon-0/charm/hooks/mon-relation-changed", line 539, in mon_relation
  File "/var/lib/juju/agents/unit-ceph-mon-0/charm/hooks/mon-relation-changed", line 582, in notify_client
  File "/var/lib/juju/agents/unit-ceph-mon-0/charm/hooks/mon-relation-changed", line 848, in admin_relation_joined
    data = {'key': ceph.get_named_key(name=name, caps=ceph.admin_caps),
  File "lib/charms_ceph/utils.py", line 1240, in get_named_key
  File "/usr/lib/python3.5/subprocess.py", line 626, in check_output
  File "/usr/lib/python3.5/subprocess.py", line 708, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['sudo', '-u', 'ceph', 'ceph', '--name', 'mon.', '--keyring', '/var/lib/ceph/mon/ceph-ip-172-31-5-119/keyring', 'auth', 'get-or-create', 'client.admin', 'mds', 'allow *', 'mgr', 'allow *', 'mon', 'allow *', 'osd', 'allow *']' returned non-zero exit status 22

Cory Johns (johnsca)
Changed in charm-ceph-mon:
assignee: nobody → Cory Johns (johnsca)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-ceph-mon (master)

Fix proposed to branch: master
Review: https://review.opendev.org/745720

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers