Skip to content

Commit c9cc529

Browse files
committed
fix: test suite
Signed-off-by: Paul Kroeher <paul.kroeher@cyberus-technology.de> On-behalf-of: SAP paul.kroeher@sap.com
1 parent 08c32d4 commit c9cc529

1 file changed

Lines changed: 18 additions & 2 deletions

File tree

tests/openstack-default-setup.nix

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,26 @@ pkgs.nixosTest {
144144
# wait until volume is attached
145145
retry_until_succeed(controllerVM, "openstack volume show test_vol -f value -c status | grep 'in-use'", 20)
146146
147-
retry_until_succeed(controllerVM, f"ip netns exec {net_ns} sshpass -p gocubsgo ssh cirros@{vm_ip} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null lsblk", 60)
147+
# add ssh host key to known_hosts
148+
retry_until_succeed(controllerVM, f"ip netns exec {net_ns} ssh-keyscan {vm_ip} > ~/.ssh/known_hosts", 60)
149+
150+
# passwordless ssh login should work if the metadata service is running and nova can access it
151+
## check on controllerVM
152+
## neutron.conf
153+
## [DEFAULT]
154+
## metadata_proxy_shared_secret = secret
155+
##
156+
## nova.conf
157+
## [neutron]
158+
## service_metadata_proxy = true
159+
## metadata_proxy_shared_secret = secret
160+
161+
retry_until_succeed(controllerVM, f"ip netns exec {net_ns} ssh cirros@{vm_ip} lsblk", 60)
148162
# check second block device of VM
149-
status, output = controllerVM.execute(f"ip netns exec {net_ns} sshpass -p gocubsgo ssh cirros@{vm_ip} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null lsblk | grep vdb")
163+
status, output = controllerVM.execute(f"ip netns exec {net_ns} ssh cirros@{vm_ip} lsblk | grep vdb")
150164
output = output.strip()
165+
print(f"output of lsblk: {output}")
166+
print(f"exit code of lsblk: {status}")
151167
assert status == 0
152168
assert output == "vdb 252:16 0 4G 0 disk"
153169
'';

0 commit comments

Comments
 (0)