mirror of https://github.com/ceph/ceph-ansible.git
d65cbaa539
If ceph-ansible deploys a Ceph cluster with "openstack_config: true" and sets the openstack_keys map to have certain ACLs or permissions, the requested ACLs or permissions are only set on one of the monitor nodes [2] when they should be set on all of them. This patch solves [3] the above issue by having the chmod and setfacl tasks iterate the list of mon nodes (including the mon node that the task was delegated to) to apply the chmod of setfacl to the keys in openstack_keys. [1] ``` openstack_keys: - { name: client.openstack, key: "$(ceph-authtool --gen-print-key)", mon_cap: "allow r", osd_cap: "allow class-read object_prefix rbd_children, allow rwx pool=images, allow rwx pool=vms, allow rwx pool=volumes, allow rwx pool=backups", mode: "0600", acls: ["u:nova:r--", "u:cinder:r--", "u:glance:r--", "u:gnocchi:r--"] } ``` [2] ``` $ ansible mons -m shell -b -a "ls -l /etc/ceph/ceph.client.openstack.keyring ; getfacl /etc/ceph/ceph.client.openstack.keyring" 192.168.1.26 | SUCCESS | rc=0 >> -rw-r-----+ 1 root root 253 Nov 3 20:30 /etc/ceph/ceph.client.openstack.keyring user::rw- user:glance:r-- user:nova:r-- user:cinder:r-- user:gnocchi:r-- group::--- mask::r-- other::---getfacl: Removing leading '/' from absolute path names 192.168.1.29 | SUCCESS | rc=0 >> -rw-r--r--. 1 root root 253 Nov 3 20:30 /etc/ceph/ceph.client.openstack.keyring user::rw- group::r-- other::r--getfacl: Removing leading '/' from absolute path names 192.168.1.23 | SUCCESS | rc=0 >> -rw-r--r--. 1 root root 253 Nov 3 20:30 /etc/ceph/ceph.client.openstack.keyring user::rw- group::r-- other::r--getfacl: Removing leading '/' from absolute path names $ ``` [3] ``` (undercloud) [stack@hci-director ceph-ansible]$ ansible mons -m shell -b -a "ls -l /etc/ceph/ceph.client.openstack.keyring ; getfacl /etc/ceph/ceph.client.openstack.keyring" 192.168.1.25 | SUCCESS | rc=0 >> -rw-r-----+ 1 root root 253 Nov 14 01:12 /etc/ceph/ceph.client.openstack.keyring user::rw- user:glance:r-- user:nova:r-- user:cinder:r-- user:gnocchi:r-- group::--- mask::r-- other::---getfacl: Removing leading '/' from absolute path names 192.168.1.29 | SUCCESS | rc=0 >> -rw-r-----+ 1 root root 253 Nov 14 01:12 /etc/ceph/ceph.client.openstack.keyring user::rw- user:glance:r-- user:nova:r-- user:cinder:r-- user:gnocchi:r-- group::--- mask::r-- other::---getfacl: Removing leading '/' from absolute path names 192.168.1.27 | SUCCESS | rc=0 >> -rw-r-----+ 1 root root 253 Nov 14 01:12 /etc/ceph/ceph.client.openstack.keyring user::rw- user:glance:r-- user:nova:r-- user:cinder:r-- user:gnocchi:r-- group::--- mask::r-- other::---getfacl: Removing leading '/' from absolute path names (undercloud) [stack@hci-director ceph-ansible]$ ``` |
||
---|---|---|
contrib | ||
docker | ||
docs | ||
group_vars | ||
infrastructure-playbooks | ||
library | ||
plugins/actions | ||
profiles | ||
roles | ||
tests | ||
.gitignore | ||
LICENSE | ||
Makefile | ||
README-MULTISITE.md | ||
README.rst | ||
Vagrantfile | ||
action_plugins | ||
ansible.cfg | ||
ceph-aio-no-vagrant.sh | ||
ceph-ansible.spec.in | ||
dummy-ansible-hosts | ||
example-ansible-role-requirements.yml | ||
generate_group_vars_sample.sh | ||
monitor_keys_example | ||
rhcs_edits.txt | ||
rundep.sample | ||
rundep_installer.sh | ||
site-docker.yml.sample | ||
site.yml.sample | ||
test.yml | ||
tox.ini | ||
vagrant_variables.yml.atomic | ||
vagrant_variables.yml.linode | ||
vagrant_variables.yml.openstack | ||
vagrant_variables.yml.sample |
README.rst
ceph-ansible ============ Ansible playbooks for Ceph, the distributed filesystem. Please refer to our hosted documentation here: http://docs.ceph.com/ceph-ansible/master/ You can view documentation for our ``stable-*`` branches by substituting ``master`` in the link above for the name of the branch. For example: http://docs.ceph.com/ceph-ansible/stable-2.2/