.iSCSI gateway setup fails if the cluster name is different than "ceph"
The `device-mapper-multipath rbd` path checker currently only supports the default cluster name, which is "ceph". As a consequence, an attempt to set up an iSCSI gateway fails during Logical Unit Number (LUN) creation if the cluster name is different than "ceph". In addition, the `ansible-playbook ceph-iscsi-gw.yml` command returns the following error:
----
Could not find dm multipath device for <image_name>.
----
To work around this problem:
. In the `ceph-iscsi-gw` Ansible configuration file:
.. Set the `cluster_name` variable to `ceph`.
.. Set the `gateway_keyring` variable to `ceph.client.admin.keyring`.
. On the `seed_monitor` host, create the following symbolic links:
* from `/etc/ceph/<your_cluster_name>.conf` to `/etc/ceph/ceph.conf`
+
----
ln -s /etc/ceph/<your_cluster_name>.conf /etc/ceph/ceph.conf
----
* from `/etc/ceph/<your_cluster_name>.client.admin.keyring` to `/etc/ceph/ceph.client.admin.keyring`
+
----
ln -s /etc/ceph/<your_cluster_name>.client.admin.keyring \
/etc/ceph/ceph.client.admin.keyring
----
Description of problem:
I have created a ceph cluster named "iscsi1". The task to sync the admin keyring fails, since its looking for the "ceph.client.admin.keyring".
the keyring should be "<cluster>.client.admin.keyring"
ll /etc/ceph/
total 12
-rw-------. 1 ceph ceph 63 Oct 19 01:57 iscsi1.client.admin.keyring
-rw-r--r--. 1 ceph ceph 803 Oct 19 01:57 iscsi1.conf
-rwxr-xr-x. 1 root root 92 Oct 12 12:40 rbdmap
TASK: [ceph-iscsi-gw | sync the admin keyring from the seed monitor to each gateway node] ***
failed: [havoc -> harvard] => {"cmd": "rsync --delay-updates -F --compress --archive --rsh 'ssh -S none -o StrictHostKeyChecking=no' --out-format='<<CHANGED>>%i %n%L' \"/etc/ceph/ceph.client.admin.keyring\" \"root@havoc:/etc/ceph/ceph.client.admin.keyring\"", "failed": true, "rc": 23}
msg: rsync: link_stat "/etc/ceph/ceph.client.admin.keyring" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1052) [sender=3.0.9]
failed: [mustang -> harvard] => {"cmd": "rsync --delay-updates -F --compress --archive --rsh 'ssh -S none -o StrictHostKeyChecking=no' --out-format='<<CHANGED>>%i %n%L' \"/etc/ceph/ceph.client.admin.keyring\" \"root@mustang:/etc/ceph/ceph.client.admin.keyring\"", "failed": true, "rc": 23}
msg: rsync: link_stat "/etc/ceph/ceph.client.admin.keyring" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1052) [sender=3.0.9]
failed: [magna086.ceph.redhat.com -> harvard] => {"cmd": "rsync --delay-updates -F --compress --archive --rsh 'ssh -S none -o StrictHostKeyChecking=no' --out-format='<<CHANGED>>%i %n%L' \"/etc/ceph/ceph.client.admin.keyring\" \"root.redhat.com:/etc/ceph/ceph.client.admin.keyring\"", "failed": true, "rc": 23}
msg: rsync: link_stat "/etc/ceph/ceph.client.admin.keyring" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1052) [sender=3.0.9]
failed: [magna080.ceph.redhat.com -> harvard] => {"cmd": "rsync --delay-updates -F --compress --archive --rsh 'ssh -S none -o StrictHostKeyChecking=no' --out-format='<<CHANGED>>%i %n%L' \"/etc/ceph/ceph.client.admin.keyring\" \"root.redhat.com:/etc/ceph/ceph.client.admin.keyring\"", "failed": true, "rc": 23}
msg: rsync: link_stat "/etc/ceph/ceph.client.admin.keyring" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1052) [sender=3.0.9]
FATAL: all hosts have already failed -- aborting
We have a provision to support different names for clusters from Ceph 2.0 onwards.
Version-Release number of selected component (if applicable):
ceph-ansible-1.0.5-36.el7scon.noarch
ceph-iscsi-ansible-1.2-1.el7scon.noarch
How reproducible:
Always
Steps to Reproduce:
1. on a cluster which has a user defined name, try to create the iscsi gateways
Changing the cluster name not only impacts the keys, but also the default interaction to the cluster - since ceph.conf becomes <cluster_name>.conf
Good catch - the fix is likely to touch a number of modules.
Description of problem: I have created a ceph cluster named "iscsi1". The task to sync the admin keyring fails, since its looking for the "ceph.client.admin.keyring". the keyring should be "<cluster>.client.admin.keyring" ll /etc/ceph/ total 12 -rw-------. 1 ceph ceph 63 Oct 19 01:57 iscsi1.client.admin.keyring -rw-r--r--. 1 ceph ceph 803 Oct 19 01:57 iscsi1.conf -rwxr-xr-x. 1 root root 92 Oct 12 12:40 rbdmap TASK: [ceph-iscsi-gw | sync the admin keyring from the seed monitor to each gateway node] *** failed: [havoc -> harvard] => {"cmd": "rsync --delay-updates -F --compress --archive --rsh 'ssh -S none -o StrictHostKeyChecking=no' --out-format='<<CHANGED>>%i %n%L' \"/etc/ceph/ceph.client.admin.keyring\" \"root@havoc:/etc/ceph/ceph.client.admin.keyring\"", "failed": true, "rc": 23} msg: rsync: link_stat "/etc/ceph/ceph.client.admin.keyring" failed: No such file or directory (2) rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1052) [sender=3.0.9] failed: [mustang -> harvard] => {"cmd": "rsync --delay-updates -F --compress --archive --rsh 'ssh -S none -o StrictHostKeyChecking=no' --out-format='<<CHANGED>>%i %n%L' \"/etc/ceph/ceph.client.admin.keyring\" \"root@mustang:/etc/ceph/ceph.client.admin.keyring\"", "failed": true, "rc": 23} msg: rsync: link_stat "/etc/ceph/ceph.client.admin.keyring" failed: No such file or directory (2) rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1052) [sender=3.0.9] failed: [magna086.ceph.redhat.com -> harvard] => {"cmd": "rsync --delay-updates -F --compress --archive --rsh 'ssh -S none -o StrictHostKeyChecking=no' --out-format='<<CHANGED>>%i %n%L' \"/etc/ceph/ceph.client.admin.keyring\" \"root.redhat.com:/etc/ceph/ceph.client.admin.keyring\"", "failed": true, "rc": 23} msg: rsync: link_stat "/etc/ceph/ceph.client.admin.keyring" failed: No such file or directory (2) rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1052) [sender=3.0.9] failed: [magna080.ceph.redhat.com -> harvard] => {"cmd": "rsync --delay-updates -F --compress --archive --rsh 'ssh -S none -o StrictHostKeyChecking=no' --out-format='<<CHANGED>>%i %n%L' \"/etc/ceph/ceph.client.admin.keyring\" \"root.redhat.com:/etc/ceph/ceph.client.admin.keyring\"", "failed": true, "rc": 23} msg: rsync: link_stat "/etc/ceph/ceph.client.admin.keyring" failed: No such file or directory (2) rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1052) [sender=3.0.9] FATAL: all hosts have already failed -- aborting We have a provision to support different names for clusters from Ceph 2.0 onwards. Version-Release number of selected component (if applicable): ceph-ansible-1.0.5-36.el7scon.noarch ceph-iscsi-ansible-1.2-1.el7scon.noarch How reproducible: Always Steps to Reproduce: 1. on a cluster which has a user defined name, try to create the iscsi gateways