mkdir() throws an exception if the directory already exists, so we should check
for it's existance before creation as hooks should be idempotent.
This occurred in practice when the install hook had to be re-run, following a
previous failure due to juju API timeout. It would also occur if the keystone
relation was re-built, so that case is also fixed.
Reviewed: https:/ /review. openstack. org/299128 /git.openstack. org/cgit/ openstack/ charm-ceph- radosgw/ commit/ ?id=b0338f7283b 7d2fb25471e23b8 325147e7d9cb34
Committed: https:/
Submitter: Jenkins
Branch: master
commit b0338f7283b7d2f b25471e23b83251 47e7d9cb34
Author: Trent Lloyd <email address hidden>
Date: Wed Mar 30 13:11:58 2016 +0800
Check if /var/lib/ceph/nss exists before creation
mkdir() throws an exception if the directory already exists, so we should check
for it's existance before creation as hooks should be idempotent.
This occurred in practice when the install hook had to be re-run, following a
previous failure due to juju API timeout. It would also occur if the keystone
relation was re-built, so that case is also fixed.
Change-Id: I4052cda5bb20f7 6ab592ed7817bdc 1e5b5b2138d
Closes-Bug: #1563667