Fix test case for cinder volumes
The verification step (test) in setup_cinder_volumes fails because the compute node does not have access to the api network (noticed with KVM; our VirtualBox setup hides the problem). This changeset adds helper functions that allow scripts to make ssh calls into other node VMs. The script, setup_cinder_volumes.sh, now runs the tests on the controller node. Change-Id: I79da47d829ed387f510318d27ec919af575344c3 Co-Authored-By: Roger Luethi <rl@patchworkscience.org>
This commit is contained in:
committed by
Roger Luethi
parent
ae5b5ed8ea
commit
d99d206262
@@ -361,6 +361,25 @@ function config_network {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------------------
|
||||||
|
# ssh wrapper functions
|
||||||
|
#-------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
function no_chk_ssh {
|
||||||
|
echo >&2 "ssh $@"
|
||||||
|
# Options set to disable strict host key checking and related messages.
|
||||||
|
ssh \
|
||||||
|
-o "UserKnownHostsFile /dev/null" \
|
||||||
|
-o "StrictHostKeyChecking no" \
|
||||||
|
-o LogLevel=error \
|
||||||
|
"$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
# ssh from one node VM to another node in the cluster
|
||||||
|
function node_ssh {
|
||||||
|
no_chk_ssh -i "$HOME/.ssh/vagrant" "$@"
|
||||||
|
}
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
fix_path_env
|
fix_path_env
|
||||||
source_deploy
|
source_deploy
|
||||||
|
|||||||
@@ -100,20 +100,23 @@ sudo service tgt restart
|
|||||||
# Verify the Block Storage installation
|
# Verify the Block Storage installation
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
echo "Verifying Block Storage installation on controller node."
|
||||||
|
|
||||||
echo "Waiting for cinder to start."
|
echo "Waiting for cinder to start."
|
||||||
until cinder list >/dev/null 2>&1; do
|
AUTH='source config/$CONFIG_DIR/admin-openstackrc.sh'
|
||||||
|
until node_ssh controller-mgmt "$AUTH; cinder list" >/dev/null 2>&1; do
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "cinder create --display-name labsVolume 1"
|
echo "cinder create --display-name labsVolume 1"
|
||||||
cinder create --display-name labsVolume 1
|
node_ssh controller-mgmt "$AUTH; cinder create --display-name labsVolume 1"
|
||||||
|
|
||||||
echo "cinder list"
|
echo "cinder list"
|
||||||
cinder list
|
# FIXME check Status column (may be creating, available, or error)
|
||||||
|
node_ssh controller-mgmt "$AUTH; cinder list"
|
||||||
|
|
||||||
echo "cinder delete labsVolume"
|
echo "cinder delete labsVolume"
|
||||||
cinder delete labsVolume
|
node_ssh controller-mgmt "$AUTH; cinder delete labsVolume"
|
||||||
|
|
||||||
echo "cinder list"
|
echo "cinder list"
|
||||||
cinder list
|
node_ssh controller-mgmt "$AUTH; cinder list"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user