Re-running the deployment scripts (os-glance-install.yml) on a running system when the /var/lib/glance/images directory is NFS mounted causes an error. The script blindly tries to chmod the mountpoint to mode 777. If the permissions are wrong and the directory is mounted, it needs to error out because there's nothing it can do to fix the problem. If the permissions are correct, it should skip this step.
TASK [os_glance : Create glance dir] *******************************************
...
failed: [control1_glance_container-76cda432] (item={u'path': u'/var/lib/glance/images/'}) => {"failed": true, "gid": 0, "group": "root", "item": {"path": "/var/lib/glance/images/"}, "mode": "0777", "msg": "chown failed", "owner": "root", "path": "/var/lib/glance/images/", "size": 4096, "state": "directory", "uid": 0}
failed: [control0_glance_container-765d7c1d] (item={u'path': u'/var/lib/glance/images/'}) => {"failed": true, "gid": 0, "group": "root", "item": {"path": "/var/lib/glance/images/"}, "mode": "0777", "msg": "chown failed", "owner": "root", "path": "/var/lib/glance/images/", "size": 4096, "state": "directory", "uid": 0}
failed: [control2_glance_container-4d9d50cf] (item={u'path': u'/var/lib/glance/images/'}) => {"failed": true, "gid": 0, "group": "root", "item": {"path": "/var/lib/glance/images/"}, "mode": "0777", "msg": "chown failed", "owner": "root", "path": "/var/lib/glance/images/", "size": 4096, "state": "directory", "uid": 0}
Hi Bryce,
I assume you have root squash enabled, in case you're running a DIY NFS server?
Do you have security concerns ?
It is not advisable to implement a ignore errors condition in Ansible, it actually has been shunned by the project. Ansible idempotency does not account for the situation that you only want to apply changes once and then never again.