diff --git a/contrib/ci/pre_test_hook.sh b/contrib/ci/pre_test_hook.sh index 350f7f4f48..de0d46502e 100755 --- a/contrib/ci/pre_test_hook.sh +++ b/contrib/ci/pre_test_hook.sh @@ -155,7 +155,6 @@ elif [[ "$DRIVER" == "lvm" ]]; then echo "SHARE_DRIVER=manila.share.drivers.lvm.LVMShareDriver" >> $localconf echo "SHARE_BACKING_FILE_SIZE=32000M" >> $localconf - export MANILA_SETUP_IPV6=True elif [[ "$DRIVER" == "zfsonlinux" ]]; then MANILA_SERVICE_IMAGE_ENABLED=True echo "SHARE_DRIVER=manila.share.drivers.zfsonlinux.driver.ZFSonLinuxShareDriver" >> $localconf diff --git a/devstack/upgrade/resources.sh b/devstack/upgrade/resources.sh index 395cda2aa4..ad812e51c1 100755 --- a/devstack/upgrade/resources.sh +++ b/devstack/upgrade/resources.sh @@ -13,7 +13,7 @@ set -o xtrace # Access rules data specific to first enabled backend. MANILA_GRENADE_ACCESS_TYPE=${MANILA_GRENADE_ACCESS_TYPE:-"ip"} -MANILA_GRENADE_ACCESS_TO=${MANILA_GRENADE_ACCESS_TO:-"127.0.0.1"} +MANILA_GRENADE_ACCESS_TO=${MANILA_GRENADE_ACCESS_TO:-"0.0.0.0/0"} # Network information that will be used in case DHSS=True driver is used # with non-single-network-plugin. @@ -55,6 +55,8 @@ function scenario_1_do_share_with_rules_and_metadata { create_share_cmd+="--share-type $MANILA_GRENADE_SHARE_TYPE_NAME " create_share_cmd+="--name $MANILA_GRENADE_SHARE_NAME" + resource_save manila share_protocol $share_protocol + if [[ $(trueorfalse False driver_handles_share_servers) == True ]]; then share_driver=$(iniget $MANILA_CONF $backend share_driver) generic_driver='manila.share.drivers.generic.GenericShareDriver' @@ -120,6 +122,13 @@ function scenario_1_do_share_with_rules_and_metadata { die $LINENO "Share timed out to reach 'available' status." fi + # grab the export location + export_path=$(manila share-export-location-list \ + $MANILA_GRENADE_SHARE_NAME | grep ":/" | \ + cut -d "|" -f 3 | head -1) + + resource_save manila export_path $export_path + # Create some metadata manila metadata $MANILA_GRENADE_SHARE_NAME set gre=nade @@ -433,6 +442,37 @@ function scenario_5_destroy_share_snapshot { fi } +##### + +function scenario_6_do_share_mount_and_write_data { + + mkdir -p /tmp/manila-share + export_path=$(resource_get manila export_path) + share_protocol=$(resource_get manila share_protocol| awk '{print tolower($0)}') + sudo mount -t $share_protocol $export_path /tmp/manila-share + test_msg="Hello from the past" + echo $test_msg | sudo tee /tmp/manila-share/testfile && sudo sync +} + +function scenario_6_verify_share_mount_and_read_data { + export_path=$(resource_get manila export_path) + share_is_mounted=$(sudo mount | grep $export_path) + [[ -z $share_is_mounted ]] && die $LINENO "Share $export_path is not mounted" + + read_data=$(sudo cat /tmp/manila-share/testfile|xargs) + if [[ $read_data == "Hello from the past" ]]; then + echo "Share data remains unmodified." + else + die $LINENO "Share data does not match what was written before upgrade." + fi +} + +function scenario_6_destroy_share_mount { + export_path=$(resource_get manila export_path) + sudo umount -f /tmp/manila-share +} + + ################################# Main logic ################################## function create { @@ -441,6 +481,7 @@ function create { scenario_3_do_quotas scenario_4_do_private_share_types scenario_5_do_share_snapshot + scenario_6_do_share_mount_and_write_data echo "Manila 'create': SUCCESS" } @@ -450,10 +491,12 @@ function verify { scenario_3_verify_quotas scenario_4_verify_private_share_types scenario_5_verify_share_snapshot + scenario_6_verify_share_mount_and_read_data echo "Manila 'verify': SUCCESS" } function destroy { + scenario_6_destroy_share_mount scenario_5_destroy_share_snapshot scenario_1_destroy_share_with_rules_and_metadata scenario_2_destroy_attach_ss_to_sn @@ -463,7 +506,7 @@ function destroy { } function verify_noapi { - : + scenario_6_verify_share_mount_and_read_data } ################################# Dispatcher ################################## diff --git a/playbooks/legacy/grenade-dsvm-manila/run.yaml b/playbooks/legacy/grenade-dsvm-manila/run.yaml index fc0195d24c..4339650c55 100644 --- a/playbooks/legacy/grenade-dsvm-manila/run.yaml +++ b/playbooks/legacy/grenade-dsvm-manila/run.yaml @@ -51,10 +51,7 @@ export KEEP_LOCALRC=1 function pre_test_hook { - source $BASE/new/manila/contrib/ci/pre_test_hook.sh \ - True \ - dummy \ - multibackend + source $BASE/new/manila/contrib/ci/pre_test_hook.sh False lvm multibackend } export -f pre_test_hook