summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvponomaryov <vponomaryov@mirantis.com>2016-12-23 17:07:39 +0200
committervponomaryov <vponomaryov@mirantis.com>2016-12-23 17:33:20 +0200
commit10b14bb50e95d2a30bba4e4c37a7de9c4b564691 (patch)
treec760462c764e3cc0f4eee1e58bb1a15447879a34
parentb76a2af2370eb55c3a689aecc266baf9364a2750 (diff)
[Devstack] Workaround osclient breakage
Creation of security group using openstack client is broken. So, use nova client for it temporary while 'related' bug is not fixed. Change-Id: I51b5be5157bd49d5835b30eaa8b6b0e7185cabdf Related-Bug: #1652317
Notes
Notes (review): Code-Review+2: Goutham Pacha Ravi <gouthampravi@gmail.com> Code-Review+2: Clinton Knight <cknight@netapp.com> Code-Review+2: xing-yang <xing.yang@emc.com> Workflow+1: xing-yang <xing.yang@emc.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Fri, 23 Dec 2016 17:27:24 +0000 Reviewed-on: https://review.openstack.org/414610 Project: openstack/manila Branch: refs/heads/master
-rwxr-xr-xdevstack/plugin.sh15
1 files changed, 11 insertions, 4 deletions
diff --git a/devstack/plugin.sh b/devstack/plugin.sh
index 5489eb5..418ae30 100755
--- a/devstack/plugin.sh
+++ b/devstack/plugin.sh
@@ -389,10 +389,16 @@ function create_manila_service_image {
389# create_manila_service_secgroup - creates security group that is used by 389# create_manila_service_secgroup - creates security group that is used by
390# Nova VMs when generic driver is configured. 390# Nova VMs when generic driver is configured.
391function create_manila_service_secgroup { 391function create_manila_service_secgroup {
392 # TODO(vponomaryov): replace usage of novaclient with openstackclient back
393 # right after bug #1652317 is fixed.
394
392 # Create a secgroup 395 # Create a secgroup
393 if ! openstack security group list | grep -q $MANILA_SERVICE_SECGROUP; then 396 # if ! openstack security group list | grep -q $MANILA_SERVICE_SECGROUP; then
394 openstack security group create $MANILA_SERVICE_SECGROUP --description "$MANILA_SERVICE_SECGROUP description" 397 if ! nova secgroup-list | grep -q $MANILA_SERVICE_SECGROUP; then
395 if ! timeout 30 sh -c "while ! openstack security group list | grep -q $MANILA_SERVICE_SECGROUP; do sleep 1; done"; then 398 # openstack security group create $MANILA_SERVICE_SECGROUP --description "$MANILA_SERVICE_SECGROUP description"
399 nova secgroup-create $MANILA_SERVICE_SECGROUP "$MANILA_SERVICE_SECGROUP description"
400 # if ! timeout 30 sh -c "while ! openstack security group list | grep -q $MANILA_SERVICE_SECGROUP; do sleep 1; done"; then
401 if ! timeout 30 sh -c "while ! nova secgroup-list | grep -q $MANILA_SERVICE_SECGROUP; do sleep 1; done"; then
396 echo "Security group not created" 402 echo "Security group not created"
397 exit 1 403 exit 1
398 fi 404 fi
@@ -425,7 +431,8 @@ function create_manila_service_secgroup {
425 fi 431 fi
426 432
427 # List secgroup rules 433 # List secgroup rules
428 openstack security group rule list $MANILA_SERVICE_SECGROUP 434 # openstack security group rule list $MANILA_SERVICE_SECGROUP
435 nova secgroup-list-rules $MANILA_SERVICE_SECGROUP
429} 436}
430 437
431# create_manila_accounts - Set up common required manila accounts 438# create_manila_accounts - Set up common required manila accounts