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
Fix proposed to branch: master /review. opendev. org/745720
Review: https:/