Experiment: set create_share_from_snapshot_support capability in
CI pre and post test hooks for glusterfs native driver.

Change-Id: I01d266cd9c3d95e8eacd06641fa0cbb577bebe80
This commit is contained in:
Tom Barron 2016-12-26 13:24:19 -05:00
parent a48b35f0d0
commit f7534d13e1
3 changed files with 23 additions and 6 deletions

View File

@ -229,7 +229,9 @@ function _create_thin_lv_gluster_vol {
test_with_retry "sudo mkfs.xfs -i size=512 /dev/$GLUSTERFS_VG_NAME/$vol_name" "mkfs.xfs failed"
# Mount the filesystem
mkdir -p $MANILA_STATE_PATH/export/$vol_name
if [! -d $MANILA_STATE_PATH/export/$vol_name ] ; then
mkdir -p $MANILA_STATE_PATH/export/$vol_name
fi
test_with_retry "sudo mount /dev/$GLUSTERFS_VG_NAME/$vol_name $MANILA_STATE_PATH/export/$vol_name" "mounting XFS from the LV failed"
# Create a directory that would serve as a brick.

View File

@ -31,14 +31,18 @@ done
if [[ "$GLUSTERFS_MANILA_DRIVER_TYPE" == "glusterfs-native" ]]; then
local BACKEND_NAME="GLUSTERNATIVE"
iniset $TEMPEST_CONFIG share enable_protocols glusterfs
iniset $TEMPEST_CONFIG share storage_protocol glusterfs
iniset $TEMPEST_CONFIG share capability_storage_protocol glusterfs
# Disable tempest config option that enables creation of 'ip' type access
# rules by default during tempest test runs.
iniset $TEMPEST_CONFIG share enable_ip_rules_for_protocols
iniset $TEMPEST_CONFIG share enable_cert_rules_for_protocols glusterfs
iniset $TEMPEST_CONFIG share capability_snapshot_support True
iniset $TEMPEST_CONFIG share capablilty_create_share_from_snapshot_support True
# ro access_level is not supported by the driver.
iniset $TEMPEST_CONFIG share enable_ro_access_level_for_protocols
# Enable snapshot tests if they haven't been explicitly disabled
RUN_MANILA_SNAPSHOT_TESTS=${RUN_MANILA_SNAPSHOT_TESTS:-True}
else
case "$GLUSTERFS_MANILA_DRIVER_TYPE" in
glusterfs|glusterfs-nfs)
@ -56,8 +60,13 @@ else
iniset $TEMPEST_CONFIG share storage_protocol NFS
# ro access_level is not supported by the driver.
iniset $TEMPEST_CONFIG share enable_ro_access_level_for_protocols
# Disable snapshot tests if they haven't been explicitly enabled
RUN_MANILA_SNAPSHOT_TESTS=${RUN_MANILA_SNAPSHOT_TESTS:-False}
fi
iniset $TEMPEST_CONFIG share run_snapshot_tests $RUN_MANILA_SNAPSHOT_TESTS
iniset $TEMPEST_CONFIG share backend_names $BACKEND_NAME
@ -88,9 +97,6 @@ iniset $TEMPEST_CONFIG share run_shrink_tests $RUN_MANILA_SHRINK_TESTS
# Disable multi_tenancy tests
iniset $TEMPEST_CONFIG share multitenancy_enabled False
# Disable snapshot tests
RUN_MANILA_SNAPSHOT_TESTS=${RUN_MANILA_SNAPSHOT_TESTS:-False}
iniset $TEMPEST_CONFIG share run_snapshot_tests $RUN_MANILA_SNAPSHOT_TESTS
# Disable consistency group tests
RUN_MANILA_CG_TESTS=${RUN_MANILA_CG_TESTS:-False}

View File

@ -32,10 +32,19 @@ done
# extra_spec snapshot_support as False. Becasuse the job that tests the
# glusterfs (NFS) driver tests the directory based layout that doesn't support
# snapshots. The job that tests glusterfs (NFS) driver has a name that
# ends with "glusterfs".
# ends with "glusterfs". For glusterfs-native backend we are using the
# volume layout, which does support snapshot creation as well as creation of
# volumes from snapshots, so set the default share type accordingly.
case "$GLUSTERFS_MANILA_DRIVER_TYPE" in
glusterfs|glusterfs-nfs)
echo "MANILA_DEFAULT_SHARE_TYPE_EXTRA_SPECS='snapshot_support=False'" >> $localrc_path
;;
glusterfs-native)
echo "MANILA_DEFAULT_SHARE_TYPE_EXTRA_SPECS='snapshot_support=True create_share_from_snapshot_support=True'" >> $localrc_path
;;
*)
# TODO(tbarron): Fill in appropriate line here for heketi.
;;
esac
# Enabling isolated metadata in Neutron is required because