summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tempest/scenario/test_server_basic_ops.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/tempest/scenario/test_server_basic_ops.py b/tempest/scenario/test_server_basic_ops.py
index 80728dc74..446c87a72 100644
--- a/tempest/scenario/test_server_basic_ops.py
+++ b/tempest/scenario/test_server_basic_ops.py
@@ -14,6 +14,7 @@
# under the License.
import json
+import re
from oslo_log import log as logging
@@ -83,9 +84,9 @@ class TestServerBasicOps(manager.ScenarioTest):
def verify_metadata_on_config_drive(self):
if self.run_ssh and CONF.compute_feature_enabled.config_drive:
# Verify metadata on config_drive
- cmd_blkid = 'blkid -t LABEL=config-2 -o device'
- dev_name = self.ssh_client.exec_command(cmd_blkid)
- dev_name = dev_name.rstrip()
+ cmd_blkid = 'blkid | grep -i config-2'
+ result = self.ssh_client.exec_command(cmd_blkid)
+ dev_name = re.match('([^:]+)', result).group()
self.ssh_client.exec_command('sudo mount %s /mnt' % dev_name)
cmd_md = 'sudo cat /mnt/openstack/latest/meta_data.json'
result = self.ssh_client.exec_command(cmd_md)