Hook error for admin relation on Xenial and Bionic

Bug #1891217 reported by Cory Johns
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceph Monitor Charm
In Progress
Undecided
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>
    hooks.execute(sys.argv)
  File "/var/lib/juju/agents/unit-ceph-mon-0/charm/hooks/charmhelpers/core/hookenv.py", line 943, in execute
    self._hooks[hook_name]()
  File "/var/lib/juju/agents/unit-ceph-mon-0/charm/hooks/mon-relation-changed", line 539, in mon_relation
    notify_client()
  File "/var/lib/juju/agents/unit-ceph-mon-0/charm/hooks/mon-relation-changed", line 582, in notify_client
    admin_relation_joined(relid)
  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
    .check_output(cmd)
  File "/usr/lib/python3.5/subprocess.py", line 626, in check_output
    **kwargs).stdout
  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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on charm-ceph-mon (master)

Change abandoned by "James Page <email address hidden>" on branch: master
Review: https://review.opendev.org/c/openstack/charm-ceph-mon/+/745720
Reason: This review is > 12 weeks without comment, and failed testing the last time it was checked. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

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.