@@ -141,8 +141,21 @@ pkgs.nixosTest {
141141 controllerVM.execute("openstack volume create --size 4 test_vol")
142142 # attach volume to VM
143143 controllerVM.execute("openstack server add volume test_vm test_vol")
144+
145+ _status, output = controllerVM.execute("openstack volume show test_vol")
146+ print(f"openstack volume show test_vol: {output}")
147+ time.sleep(3)
148+ _status, output = controllerVM.execute("openstack volume show test_vol")
149+ print(f"openstack volume show test_vol: {output}")
150+ time.sleep(3)
151+ _status, output = controllerVM.execute("openstack volume show test_vol")
152+ print(f"openstack volume show test_vol: {output}")
153+ time.sleep(3)
154+ _status, output = controllerVM.execute("openstack volume show test_vol")
155+ print(f"openstack volume show test_vol: {output}")
156+
144157 # wait until volume is attached
145- retry_until_succeed(controllerVM, "openstack volume show test_vol -f value -c status | grep 'in-use'", 20)
158+ assert retry_until_succeed(controllerVM, "openstack volume show test_vol -f value -c status | grep 'in-use'", 20)
146159
147160 # add ssh host key to known_hosts
148161 retry_until_succeed(controllerVM, f"ip netns exec {net_ns} ssh-keyscan {vm_ip} > ~/.ssh/known_hosts", 60)
@@ -158,7 +171,7 @@ pkgs.nixosTest {
158171 ## service_metadata_proxy = true
159172 ## metadata_proxy_shared_secret = secret
160173
161- retry_until_succeed(controllerVM, f"ip netns exec {net_ns} ssh cirros@{vm_ip} lsblk", 60)
174+ assert retry_until_succeed(controllerVM, f"ip netns exec {net_ns} ssh cirros@{vm_ip} lsblk", 60)
162175 # check second block device of VM
163176 status, output = controllerVM.execute(f"ip netns exec {net_ns} ssh cirros@{vm_ip} lsblk | grep vdb")
164177 output = output.strip()
0 commit comments