diff options
author | Lingxian Kong <anlin.kong@gmail.com> | 2020-01-10 18:37:58 +1300 |
---|---|---|
committer | Lingxian Kong <anlin.kong@gmail.com> | 2020-01-28 14:27:52 +1300 |
commit | 602c4d42de77d1be0397185b04f2790f4bae87b7 (patch) | |
tree | 57a91b0024c9ed917571e411df27a111e1341f44 /devstack/plugin.sh | |
parent | 54987b60a738abfbe8171b889da1658468dcf9ca (diff) | |
download | trove-602c4d42de77d1be0397185b04f2790f4bae87b7.tar.gz |
Improve the function tests
- Execute test groups in serial to make sure no more than 2 database
instance are created at the same time.
- Remove some unneccesary tests
- Remove unneeded datastore, e.g. 'Test_Datastore_1'
- Remove unsupported trovestack subcommands
- Move unsupported DIB elements to the 'deprecated-elements' folder
- Decrease default value of 'agent_call_high_timeout' to 5min
- Add initial_deplay for pooling task
- Use socket file to connect with database instead of using localhost
IP
Change-Id: Ie5030a671fbeb453eafa6cbe04e08da7b52e33c9
Diffstat (limited to 'devstack/plugin.sh')
-rw-r--r-- | devstack/plugin.sh | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/devstack/plugin.sh b/devstack/plugin.sh index 12b63304..ecd861de 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -390,9 +390,11 @@ function setup_mgmt_network() { die_if_not_set $LINENO network_id "Failed to create network: $NET_NAME, project: ${PROJECT_ID}" if [[ "$IP_VERSION" =~ 4.* ]]; then - NEW_SUBNET_ID=$(create_mgmt_subnet_v4 ${PROJECT_ID} ${network_id} ${SUBNET_NAME} ${SUBNET_RANGE}) - openstack router add subnet $ROUTER_ID $NEW_SUBNET_ID + net_subnet_id=$(create_mgmt_subnet_v4 ${PROJECT_ID} ${network_id} ${SUBNET_NAME} ${SUBNET_RANGE}) + # 'openstack router add' has a bug that cound't show the error message + # openstack router add subnet ${ROUTER_ID} ${net_subnet_id} --debug fi + # Trove doesn't support IPv6 for now. # if [[ "$IP_VERSION" =~ .*6 ]]; then # NEW_IPV6_SUBNET_ID=$(create_subnet_v6 ${PROJECT_ID} ${network_id} ${IPV6_SUBNET_NAME}) @@ -454,32 +456,25 @@ function create_guest_image { ${TROVE_IMAGE_OS_RELEASE} \ true - image_name="trove-${TROVE_IMAGE_OS}-${TROVE_IMAGE_OS_RELEASE}-${TROVE_DATASTORE_TYPE}" + image_name="trove-datastore-${TROVE_IMAGE_OS}-${TROVE_IMAGE_OS_RELEASE}-${TROVE_DATASTORE_TYPE}" image_file=$HOME/images/${image_name}.qcow2 if [ ! -f ${image_file} ]; then - echo "Image file was not found at ${image_file}. Probably it was not created." + echo "Image file was not found at ${image_file}" return 1 fi - ACTIVE=1 - INACTIVE=0 - echo "Add the image to glance" glance_image_id=$(openstack --os-region-name RegionOne --os-password ${SERVICE_PASSWORD} \ --os-project-name service --os-username trove \ - image create ${TROVE_IMAGE_OS}-${TROVE_IMAGE_OS_RELEASE}-${TROVE_DATASTORE_TYPE} \ + image create ${image_name} \ --disk-format qcow2 --container-format bare --property hw_rng_model='virtio' --file ${image_file} \ -c id -f value) echo "Register the image in datastore" $TROVE_MANAGE datastore_update $TROVE_DATASTORE_TYPE "" - $TROVE_MANAGE datastore_version_update $TROVE_DATASTORE_TYPE $TROVE_DATASTORE_VERSION $TROVE_DATASTORE_TYPE $glance_image_id "" $ACTIVE + $TROVE_MANAGE datastore_version_update $TROVE_DATASTORE_TYPE $TROVE_DATASTORE_VERSION $TROVE_DATASTORE_TYPE $glance_image_id "" 1 $TROVE_MANAGE datastore_update $TROVE_DATASTORE_TYPE $TROVE_DATASTORE_VERSION - # just for tests - $TROVE_MANAGE datastore_version_update "$TROVE_DATASTORE_TYPE" "inactive_version" "manager1" $glance_image_id "" $INACTIVE - $TROVE_MANAGE datastore_update Test_Datastore_1 "" - echo "Add parameter validation rules if available" if [ -f $DEST/trove/trove/templates/$TROVE_DATASTORE_TYPE/validation-rules.json ]; then $TROVE_MANAGE db_load_datastore_config_parameters "$TROVE_DATASTORE_TYPE" "$TROVE_DATASTORE_VERSION" \ @@ -546,6 +541,8 @@ function config_trove_network { openstack network list echo "Neutron subnet list:" openstack subnet list + echo "Neutron router:" + openstack router show ${ROUTER_ID} -f yaml echo "ip route:" sudo ip route |