Comment 31 for bug 1719436

Revision history for this message
Frode Nordahl (fnordahl) wrote :

I accidentally hit this with latest openstack-base bundle from jujucharms.com using xenial/queens.

Manually re-running the commands gives the same result as in the log:
# ceph-create-keys --id juju-b275f7-2-lxd-0
INFO:ceph-create-keys:Key exists already: /etc/ceph/ceph.client.admin.keyring
INFO:ceph-create-keys:Talking to monitor...
2018-03-09 14:04:14.527572 7fce4ffec700 0 librados: client.admin authentication error (22) Invalid argument
InvalidArgumentError does not take keyword arguments
INFO:ceph-create-keys:Cannot get or create bootstrap key for osd, permission denied
INFO:ceph-create-keys:Talking to monitor...
2018-03-09 14:04:14.765891 7f19c8306700 0 librados: client.admin authentication error (22) Invalid argument
InvalidArgumentError does not take keyword arguments
INFO:ceph-create-keys:Cannot get or create bootstrap key for rgw, permission denied
INFO:ceph-create-keys:Talking to monitor...
2018-03-09 14:04:14.924680 7f5761738700 0 librados: client.admin authentication error (22) Invalid argument
InvalidArgumentError does not take keyword arguments
INFO:ceph-create-keys:Cannot get or create bootstrap key for mds, permission denied
INFO:ceph-create-keys:Talking to monitor...
2018-03-09 14:04:15.069345 7fcbfb3ff700 0 librados: client.admin authentication error (22) Invalid argument
InvalidArgumentError does not take keyword arguments
INFO:ceph-create-keys:Cannot get or create bootstrap key for rbd, permission denied

After removing the empty /etc/ceph/ceph.client.admin.keyring the re-run succeeds.
# rm /etc/ceph/ceph.client.admin.keyring
root@juju-b275f7-2-lxd-0:~# ceph-create-keys --id juju-b275f7-2-lxd-0
INFO:ceph-create-keys:Talking to monitor...
exported keyring for client.admin
updated caps for client.admin
INFO:ceph-create-keys:Talking to monitor...
INFO:ceph-create-keys:Talking to monitor...
INFO:ceph-create-keys:Talking to monitor...
INFO:ceph-create-keys:Talking to monitor...

I would suggest two paths forward:
1) Add a -t / --timeout with a higher value to call to ceph-create-keys, default is 600. (https://github.com/ceph/ceph/blob/master/src/ceph-create-keys#L269)
2) Unlink the the zero-sized /etc/ceph/ceph.client.admin.keyring before throwing exception in https://github.com/openstack/charm-ceph-mon/blob/master/lib/ceph/utils.py#L1362