diff options
author | Martin Schwenke <martin@meltin.net> | 2014-12-03 12:09:12 +1100 |
---|---|---|
committer | Martin Schwenke <martins@samba.org> | 2014-12-05 21:02:41 +0100 |
commit | 3a2c8bb906fac4e2611a28ead6b4290ddc93de54 (patch) | |
tree | 3a7a2498af8793ff4b2d1cd77f52ba65d8ecf951 /ctdb/tests | |
parent | 49449f66fca52d5044d2e486570562df866adf57 (diff) | |
download | samba-3a2c8bb906fac4e2611a28ead6b4290ddc93de54.tar.gz samba-3a2c8bb906fac4e2611a28ead6b4290ddc93de54.tar.xz samba-3a2c8bb906fac4e2611a28ead6b4290ddc93de54.zip |
ctdb-tests: More debug on SSH failure
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Diffstat (limited to 'ctdb/tests')
-rwxr-xr-x | ctdb/tests/complex/42_failover_ssh_hostname.sh | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/ctdb/tests/complex/42_failover_ssh_hostname.sh b/ctdb/tests/complex/42_failover_ssh_hostname.sh index a74c63207a..8c0ac10500 100755 --- a/ctdb/tests/complex/42_failover_ssh_hostname.sh +++ b/ctdb/tests/complex/42_failover_ssh_hostname.sh @@ -51,8 +51,9 @@ echo "Removing ${test_ip} from the local neighbor table..." ip neigh flush "$test_prefix" >/dev/null 2>&1 || true echo "SSHing to ${test_ip} and running hostname..." -original_hostname=$(ssh -o "StrictHostKeyChecking no" $test_ip hostname) -[ $? -eq 0 ] +if ! original_hostname=$(ssh -o "StrictHostKeyChecking no" $test_ip hostname) ; then + die "Failed to get original hostname via SSH..." +fi echo "Hostname is: ${original_hostname}" @@ -65,8 +66,12 @@ wait_until_node_has_status $test_node disabled gratarp_sniff_wait_show echo "SSHing to ${test_ip} and running hostname (again)..." -new_hostname=$(ssh -o "StrictHostKeyChecking no" $test_ip hostname) -[ $? -eq 0 ] +if ! new_hostname=$(ssh -o "StrictHostKeyChecking no" $test_ip hostname) ; then + echo "Failed to get new hostname via SSH..." + echo "DEBUG:" + ip neigh show + exit 1 +fi echo "Hostname is: ${new_hostname}" |