Make rbd-provisioner installation more deterministic
This commit will provide more predictable behavior with regards to the platform-integ-apps app and specifically the rbd-provisioner that it installs. - Add an additional apply check for the platform-integ-apps app. The check will required a healthy ceph cluster before applying (and installing the rbd-provisioner). - Add an application apply check to define and check for inter-app dependencies. For the stx-openstack app, reject the application apply if the platform-integ-apps has not been successfully applied. This locks out the app from being applied since the rbd provisioner is not available. - Update the rbd provisioner pre-install checks to add a timeout when attempting to access the pool. This check will block if OSDs are not installed in the cluster and will eventually cause the job exec deadline to be reached. This should not be a failure as the provisioner has been setup correctly at the point of the check and will perform correctly once OSDs are added. Change-Id: I1e11358fc613b3d1e58a749897ac25f199c8aad4 Story: 2005424 Task: 33456 Signed-off-by: Robert Church <robert.church@windriver.com>
This commit is contained in:
@@ -115,12 +115,16 @@ data:
|
||||
|
||||
# Check if pool is accessible using provided credentials
|
||||
echo "====================================="
|
||||
rbd -p ${POOL_NAME} --user ${USER_ID} ls -K $CEPH_USER_KEYRING
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error: Ceph pool ${POOL_NAME} is not accessible using credentials for user ${USER_ID}, check Pod logs for details."
|
||||
exit 1
|
||||
timeout --preserve-status 10 rbd -p ${POOL_NAME} --user ${USER_ID} ls -K $CEPH_USER_KEYRING
|
||||
if [ $? -ne 143 ]; then
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error: Ceph pool ${POOL_NAME} is not accessible using credentials for user ${USER_ID}, check Pod logs for details."
|
||||
exit 1
|
||||
else
|
||||
echo "Pool ${POOL_NAME} accessible"
|
||||
fi
|
||||
else
|
||||
echo "Pool ${POOL_NAME} accessible"
|
||||
echo "rbd command timed out and was sent a SIGTERM. Make sure OSDs have been provisioned."
|
||||
fi
|
||||
|
||||
ceph -s
|
||||
|
||||
Reference in New Issue
Block a user