Browse Source

[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
tags/4.0.0.0b3
vponomaryov 2 years ago
parent
commit
10b14bb50e
1 changed files with 11 additions and 4 deletions
  1. 11
    4
      devstack/plugin.sh

+ 11
- 4
devstack/plugin.sh View File

@@ -389,10 +389,16 @@ function create_manila_service_image {
389 389
 # create_manila_service_secgroup - creates security group that is used by
390 390
 # Nova VMs when generic driver is configured.
391 391
 function create_manila_service_secgroup {
392
+    # TODO(vponomaryov): replace usage of novaclient with openstackclient back
393
+    # right after bug #1652317 is fixed.
394
+
392 395
     # Create a secgroup
393
-    if ! openstack security group list | grep -q $MANILA_SERVICE_SECGROUP; then
394
-        openstack security group create $MANILA_SERVICE_SECGROUP --description "$MANILA_SERVICE_SECGROUP description"
395
-        if ! timeout 30 sh -c "while ! openstack security group list | grep -q $MANILA_SERVICE_SECGROUP; do sleep 1; done"; then
396
+    # if ! openstack security group list | grep -q $MANILA_SERVICE_SECGROUP; then
397
+    if ! nova secgroup-list | grep -q $MANILA_SERVICE_SECGROUP; 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 402
             echo "Security group not created"
397 403
             exit 1
398 404
         fi
@@ -425,7 +431,8 @@ function create_manila_service_secgroup {
425 431
     fi
426 432
 
427 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 438
 # create_manila_accounts - Set up common required manila accounts

Loading…
Cancel
Save