Skip to content

Commit

Permalink
SM-Storage: exit with error after mount to allow next puppet run
Browse files Browse the repository at this point in the history
by exiting with error after mount, puppet will be run one more time  and
this run will ensure ownership of /var/lib/nova/instances/global is correct

closes-bug: #1421534

Unit testing:
1. Created multi node cluster with storage
  a. Verified installation was successful
  b. LiveVM came up, shared space is mount correctly
  c. Ownership of shared space is nova:nova
  d. Created, attached to disk, and migrated a VM to different host

Change-Id: Ib4980ac3252106b5473b9a692a4a94ee2399223b
  • Loading branch information
Dheeraj Gautam committed Feb 13, 2015
1 parent 7f2f6f2 commit 2fa0674
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -182,13 +182,21 @@ RETVAL=$?
if [ $RETVAL -eq 0 ]
then
echo "ping done"
stat -c '%U:%G' /var/lib/nova/instances/global
STAT_OUTPUT=`stat -c '%U:%G' /var/lib/nova/instances/global`
echo "current ownership of instances : ${STAT_OUTPUT}"
mount 192.168.101.3:/livemnfsvol /var/lib/nova/instances/global
RETVAL=$?
if [ ${RETVAL} -ne 0 ]
then
echo "mount to livemnfsvol failed"
exit ${RETVAL}
fi
echo "exiting with failed status to give chown one more chance"
stat -c '%U:%G' /var/lib/nova/instances/global
STAT_OUTPUT=`stat -c '%U:%G' /var/lib/nova/instances/global`
echo "current ownership of instances : ${STAT_OUTPUT}"
exit 1
else
echo "ping to livemnfs failed"
exit 1
Expand Down

0 comments on commit 2fa0674

Please sign in to comment.