ceph-ansible/infrastructure-playbooks
Dimitri Savineau da4280e243 switch2container: chown symlink for devices
If the OSD directory is using symlinks for referencing devices (like
block, db, wal for bluestore and journal for filestore) then the chown
command could fail to change the owner:group on some system.

$ ls -hl /var/lib/ceph/osd/ceph-0/
total 28K
lrwxrwxrwx 1 ceph ceph 92 Sep 15 01:53 block -> /dev/ceph-45113532-95ca-471b-bd75-51de46f1339c/osd-data-570a1aee-60c0-44c9-8036-ffed7d67a4e6
-rw------- 1 ceph ceph 37 Sep 15 01:53 ceph_fsid
-rw------- 1 ceph ceph 37 Sep 15 01:53 fsid
-rw------- 1 ceph ceph 55 Sep 15 01:53 keyring
-rw------- 1 ceph ceph  6 Sep 15 01:53 ready
-rw------- 1 ceph ceph  3 Sep 15 02:00 require_osd_release
-rw------- 1 ceph ceph 10 Sep 15 01:53 type
-rw------- 1 ceph ceph  2 Sep 15 01:53 whoami
$ find /var/lib/ceph/osd/ceph-0 -not -user 167 -execdir chown 167:167 {} +
chown: cannot dereference './block': Permission denied
$ find /var/lib/ceph/osd/ceph-0 -not -user 167
/var/lib/ceph/osd/ceph-0/block

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
2020-09-15 20:05:49 +02:00
..
untested-by-ci ansible: use 'bool' filter on boolean conditionals 2019-06-06 10:21:17 +02:00
vars osd: remove variable osd_scenario 2019-04-11 11:57:02 -04:00
README.md doc: update infra playbooks statements 2020-02-25 15:27:52 +01:00
add-mon.yml facts: explicitly disable facter and ohai 2020-07-02 17:46:12 +02:00
add-osd.yml facts: explicitly disable facter and ohai 2020-07-02 17:46:12 +02:00
ansible.cfg Cleanup plugins directories and references 2018-03-14 11:15:39 +01:00
ceph-keys.yml ceph_key: set state as optional 2020-09-14 14:12:21 -04:00
cephadm-adopt.yml cephadm: set the command as a fact 2020-07-20 16:32:20 -04:00
cephadm.yml cephadm: set the command as a fact 2020-07-20 16:32:20 -04:00
docker-to-podman.yml ceph-crash: introduce new role ceph-crash 2020-07-21 20:22:12 +02:00
filestore-to-bluestore.yml common: don't enable debug log on ceph-volume calls by default 2020-08-11 15:03:20 +02:00
gather-ceph-logs.yml play: remove backward compatibility group name 2020-07-08 09:21:19 -04:00
lv-create.yml lv-create: fix a typo 2019-09-26 11:35:24 +02:00
lv-teardown.yml improve coding style 2019-04-23 15:37:07 +02:00
purge-cluster.yml purge: remove potential socket leftover 2020-09-14 15:34:49 -04:00
purge-container-cluster.yml purge: remove potential socket leftover 2020-09-14 15:34:49 -04:00
purge-iscsi-gateways.yml purge-iscsi-gateways: don't run all ceph-facts 2020-01-10 15:46:15 +01:00
rgw-add-users-buckets.yml Example ceph_add_users_buckets playbook 2018-12-20 14:23:25 +01:00
rolling_update.yml ceph_key: set state as optional 2020-09-14 14:12:21 -04:00
shrink-mds.yml shrink-mds: use mds_to_kill_hostname instead 2020-08-18 14:56:57 -04:00
shrink-mgr.yml shrink-mgr: fix systemd condition 2020-03-03 10:32:15 +01:00
shrink-mon.yml shrink: don't use localhost node 2020-03-03 10:32:15 +01:00
shrink-osd.yml common: don't enable debug log on ceph-volume calls by default 2020-08-11 15:03:20 +02:00
shrink-rbdmirror.yml shrink-rbdmirror: fix presence after removal 2020-03-03 10:32:15 +01:00
shrink-rgw.yml facts: explicitly disable facter and ohai 2020-07-02 17:46:12 +02:00
storage-inventory.yml common: don't enable debug log on ceph-volume calls by default 2020-08-11 15:03:20 +02:00
switch-from-non-containerized-to-containerized-ceph-daemons.yml switch2container: chown symlink for devices 2020-09-15 20:05:49 +02:00
take-over-existing-cluster.yml remove ceph-agent role and references 2019-06-03 13:35:50 +02: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, run ansible-playbook infrastructure-playbooks/<playbook>.