Browse Source

Don't run volume snapshot/clone tests in Tempest

The Cinder NFS backend doesn't yet support snapshot, clone
or backup operations, so they should be disabled when
running Tempest.

We also have to explicitly disable the image cache in
cinder because that relies on volume cloning which the NFS
volume backend doesn't support.

Depends-On: I5ad578a78d6cfd4186a8230ad472d4a7b92445c9
Change-Id: I8fb421276005f9ba9cbc6c55ba8b6089349fdb69
Matt Riedemann 2 years ago
parent
commit
fc041321ae
2 changed files with 14 additions and 0 deletions
  1. 2
    0
      devstack/override-defaults
  2. 12
    0
      devstack/plugin.sh

+ 2
- 0
devstack/override-defaults View File

@@ -3,6 +3,8 @@ ENABLE_NFS_CINDER=$(trueorfalse True ENABLE_NFS_CINDER)
3 3
 if [[ $ENABLE_NFS_CINDER == "True" ]]; then
4 4
     CINDER_DRIVER=nfs
5 5
     CINDER_ENABLED_BACKENDS=nfs:nfs
6
+    # NOTE(mriedem): This is a workaround for Cinder bug 1642394.
7
+    CINDER_IMG_CACHE_ENABLED=False
6 8
 
7 9
     TEMPEST_STORAGE_PROTOCOL=nfs
8 10
 fi

+ 12
- 0
devstack/plugin.sh View File

@@ -78,6 +78,14 @@ function configure_cinder_nfs {
78 78
 
79 79
 }
80 80
 
81
+# Configures tempest for running Cinder volume API tests with an NFS backend.
82
+function configure_tempest_nfs {
83
+    # The Cinder NFS backend doesn't yet support snapshot, backup or clone.
84
+    iniset $TEMPEST_CONFIG volume-feature-enabled snapshot False
85
+    iniset $TEMPEST_CONFIG volume-feature-enabled backup False
86
+    iniset $TEMPEST_CONFIG volume-feature-enabled clone False
87
+}
88
+
81 89
 
82 90
 if [[ "$1" == "stack" && "$2" == "pre-install" ]]; then
83 91
     echo_summary "Installing NFS"
@@ -91,6 +99,10 @@ elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
91 99
         configure_cinder_nfs
92 100
         sudo service $NFS_SERVICE restart
93 101
     fi
102
+elif [[ "$1" == "stack" && "$2" == "test-config" ]]; then
103
+    if is_nfs_enabled_for_service cinder; then
104
+        configure_tempest_nfs
105
+    fi
94 106
 fi
95 107
 
96 108
 if [[ "$1" == "unstack" ]]; then

Loading…
Cancel
Save