Modify mounting paths
When we create mounting paths for devices we have same paths if we create
them on 2 servers. For example for 2 servers and 2 volumes paths look like
this:
- /mnt/vdb
- /mnt/vdc
- /mnt/vdb
- /mnt/vdc
In this patch we add one more directory - id of server to this paths,
that when we have unique patch for each. After this patch paths will look
like this:
- /mnt/226575324/vdb
- /mnt/226575324/vdc
- /mnt/356104023/vdb
- /mnt/356104023/vdc
Change-Id: I7e4b2f68d987cd4d303915062984ce2125667db6
diff --git a/tempest/scenario/test_instances_with_cinder_volumes.py b/tempest/scenario/test_instances_with_cinder_volumes.py
index a907acd..b9ac2c8 100644
--- a/tempest/scenario/test_instances_with_cinder_volumes.py
+++ b/tempest/scenario/test_instances_with_cinder_volumes.py
@@ -181,21 +181,24 @@
server=server
)
+ server_name = server['name'].split('-')[-1]
+
# run write test on all volumes
for volume in attached_volumes:
- # get the mount path
- dev_name = volume['attachments'][0]['device'][5:]
-
# dev name volume['attachments'][0]['device'][5:] is like
# /dev/vdb, we need to remove /dev/ -> first 5 chars
+ dev_name = volume['attachments'][0]['device'][5:]
+
+ mount_path = f"/mnt/{server_name}"
+
timestamp_before = self.create_timestamp(
ssh_ip, private_key=keypair['private_key'], server=server,
- dev_name=dev_name,
+ dev_name=dev_name, mount_path=mount_path,
)
timestamp_after = self.get_timestamp(
ssh_ip, private_key=keypair['private_key'], server=server,
- dev_name=dev_name,
+ dev_name=dev_name, mount_path=mount_path,
)
self.assertEqual(timestamp_before, timestamp_after)