aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2018-04-11 20:57:02 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2018-04-11 21:07:13 +0200
commit9cb5fc9e5c565fbf5c3c270f66cf81a0a51f5c7f (patch)
treeefcc4c56789418945fe9440a7f7db43e0de7dd34
parente4b7e2bf524ccc30479015711ec0beeb04c4135e (diff)
Precise vyos_vrouter logs
Aborting was written even if it worked after rebooting the vm [1]. [1] https://build.opnfv.org/ci/view/functest/job/functest-daisy-baremetal-daily-master/41/console Change-Id: Idb29624b8793df5d77d401b375aa3b3176778ddf Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com> (cherry picked from commit 99b72c34e92c567a47ebc3b977c7aaa290fef6de)
-rw-r--r--functest/opnfv_tests/vnf/router/vnf_controller/ssh_client.py5
-rw-r--r--functest/opnfv_tests/vnf/router/vnf_controller/vm_controller.py5
2 files changed, 6 insertions, 4 deletions
diff --git a/functest/opnfv_tests/vnf/router/vnf_controller/ssh_client.py b/functest/opnfv_tests/vnf/router/vnf_controller/ssh_client.py
index 628afd30e..c5f554cbd 100644
--- a/functest/opnfv_tests/vnf/router/vnf_controller/ssh_client.py
+++ b/functest/opnfv_tests/vnf/router/vnf_controller/ssh_client.py
@@ -80,9 +80,8 @@ class SshClient(object): # pylint: disable=too-many-instance-attributes
retrycount -= 1
if retrycount == 0:
- self.logger.error("Cannot establish connection to IP '%s'. " +
- "Aborting",
- self.ip_address)
+ self.logger.warn(
+ "Cannot establish connection to IP '%s'", self.ip_address)
self.connected = False
return self.connected
diff --git a/functest/opnfv_tests/vnf/router/vnf_controller/vm_controller.py b/functest/opnfv_tests/vnf/router/vnf_controller/vm_controller.py
index 10e486455..56dc1e237 100644
--- a/functest/opnfv_tests/vnf/router/vnf_controller/vm_controller.py
+++ b/functest/opnfv_tests/vnf/router/vnf_controller/vm_controller.py
@@ -85,12 +85,15 @@ class VmController(object):
result = ssh.connect(self.ssh_connect_timeout,
self.ssh_connect_retry_count)
if not result:
- self.logger.debug("try to vm reboot.")
+ self.logger.warn("Reboot %s", vm_info["vnf_name"])
self.util.reboot_vm(vm_info["vnf_name"])
time.sleep(self.reboot_wait)
result = ssh.connect(self.ssh_connect_timeout,
self.ssh_connect_retry_count)
if not result:
+ self.logger.error(
+ "Cannot establish connection to IP '%s'. Aborting!",
+ ssh.ip_address)
return None
(result, _) = self.command_create_and_execute(