ceph-ansible/infrastructure-playbooks
Guillaume Abrioux 73287f91bc mgr: fix mgr keyring error on rolling_update
when upgrading from RHCS 2.5 to 3.2, it fails because the task `create
ceph mgr keyring(s) when mon is containerized` has a when condition
`inventory_hostname == groups[mon_group_name]|last`.
First, this is incorrect because `inventory_hostname` is referring to a
mgr node, it means this condition would have never been satisfied.
Then, this condition + `serial: 1` makes the mgr keyring creating skipped on
the first node. Further, the `ceph-mgr` role tries to copy the mgr
keyring (it's not aware we are running `serial: 1`) this leads to a
failure like the following:

```
TASK [ceph-mgr : copy ceph keyring(s) if needed] ***************************************************************************************************************************************************************************************************************************************************************************
task path: /usr/share/ceph-ansible/roles/ceph-mgr/tasks/common.yml:10
Tuesday 27 November 2018  12:03:34 +0000 (0:00:00.296)       0:11:01.290 ******
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: AnsibleFileNotFound: Could not find or access '~/ceph-ansible-keys/48d78ac1-e0d6-4e35-ab3e-772aea7828fc//etc/ceph/local.mgr.magna021.keyring'
failed: [magna021] (item={u'dest': u'/var/lib/ceph/mgr/local-magna021/keyring', u'name': u'/etc/ceph/local.mgr.magna021.keyring', u'copy_key': True}) => {"changed": false, "item": {"copy_key": true, "dest": "/var/lib/ceph/mgr/local-magna021/keyring", "name": "/etc/ceph/local.mgr.magna021.keyring"}, "msg": "Could not find or access '~/ceph-ansible-keys/48d78ac1-e0d6-4e35-ab3e-772aea7828fc//etc/ceph/local.mgr.magna021.keyring'"}
```

The ceph_key module is idempotent, so there is no need to have such a
condition.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1649957

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2018-11-27 18:19:56 +01:00
..
untested-by-ci don't use "role" or "roles" to include roles 2018-10-31 09:38:59 +01:00
vars infrastructure playbooks: ensure nvme_device is defined in lv-create.yml 2018-10-29 08:41:42 +00:00
README.md rolling_update: fix wrong indent 2016-10-26 12:51:08 -05:00
add-osd.yml docker-common: rename role 2018-11-12 10:51:48 +01:00
ansible.cfg Cleanup plugins directories and references 2018-03-14 11:15:39 +01:00
ceph-keys.yml ceph_key: add fetch_initial_keys capability 2018-11-09 12:45:52 +01:00
gather-ceph-logs.yml infra: add a gather-ceph-logs.yml playbook 2018-10-17 13:52:19 +00:00
lv-create.yml infrastructure playbooks: ensure nvme_device is defined in lv-create.yml 2018-10-29 08:41:42 +00:00
lv-teardown.yml lv-teardown: fail silently if lv_vars.yml is not found 2018-08-16 16:38:23 +02:00
purge-cluster.yml don't loop over a task using package management modules 2018-11-08 08:38:10 +00:00
purge-docker-cluster.yml add quotes around package names added in da6f384 2018-11-09 12:59:08 +00:00
purge-iscsi-gateways.yml igw: stop tcmu-runner on iscsi purge 2018-11-09 10:02:16 +01:00
rgw-standalone.yml don't use "role" or "roles" to include roles 2018-10-31 09:38:59 +01:00
rolling_update.yml mgr: fix mgr keyring error on rolling_update 2018-11-27 18:19:56 +01:00
shrink-mon.yml infra playbooks: use the right container binary 2018-11-27 16:47:40 +00:00
shrink-osd-ceph-disk.yml infra playbooks: use the right container binary 2018-11-27 16:47:40 +00:00
shrink-osd.yml shrink-osd: add missing CEPH_BINARY 2018-11-27 16:47:40 +00:00
switch-from-non-containerized-to-containerized-ceph-daemons.yml infra playbooks: use the right container binary 2018-11-27 16:47:40 +00:00
take-over-existing-cluster.yml don't use "role" or "roles" to include roles 2018-10-31 09:38:59 +01:00

README.md

Infrastructure playbooks

This directory contains a variety of playbooks that can be used independently of the Ceph roles we have. They aim to perform infrastructure related tasks that would help use managing a Ceph cluster or performing certain operational tasks.

To use them, you must move them to ceph-ansible's root directory, then run using ansible-playbook <playbook>.