diff options
author | selias <samelias@cisco.com> | 2017-10-05 12:19:55 +0200 |
---|---|---|
committer | selias <samelias@cisco.com> | 2017-10-05 16:41:04 +0200 |
commit | 08e35e37f7ad3394cea86c22ab7ffd990651c112 (patch) | |
tree | 25f0bd3ac2efdd72c184dc3850ada9bec1a61736 /resources | |
parent | 22fe84cf9058e189165802c68ce14b96e06e5947 (diff) |
HC Test: remove log check from HC startup
- remove log check from "Check Honeycomb Startup State" keyword
- fix workaround for ODL startup issue
- change log level for HttpRequestError so it doesn't clutter
log.html output
- update EXPECTED_FAILING tags for plugin-acl and routing suites
Change-Id: I7380d24801a6535bdf77505edada39ea2412e833
Signed-off-by: selias <samelias@cisco.com>
Diffstat (limited to 'resources')
-rw-r--r-- | resources/libraries/python/HTTPRequest.py | 2 | ||||
-rw-r--r-- | resources/libraries/python/honeycomb/HoneycombSetup.py | 42 | ||||
-rw-r--r-- | resources/libraries/robot/honeycomb/honeycomb.robot | 1 |
3 files changed, 14 insertions, 31 deletions
diff --git a/resources/libraries/python/HTTPRequest.py b/resources/libraries/python/HTTPRequest.py index 869078bca3..c4e73c25f2 100644 --- a/resources/libraries/python/HTTPRequest.py +++ b/resources/libraries/python/HTTPRequest.py @@ -73,7 +73,7 @@ class HTTPRequestError(Exception): self._msg = "{0}: {1}".format(self.__class__.__name__, msg) self._details = details if enable_logging: - logger.error(self._msg) + logger.info(self._msg) logger.debug(self._details) def __repr__(self): diff --git a/resources/libraries/python/honeycomb/HoneycombSetup.py b/resources/libraries/python/honeycomb/HoneycombSetup.py index b5e964dd6c..975a36c753 100644 --- a/resources/libraries/python/honeycomb/HoneycombSetup.py +++ b/resources/libraries/python/honeycomb/HoneycombSetup.py @@ -155,33 +155,22 @@ class HoneycombSetup(object): ssh = SSH() ssh.connect(node) - ret_code, pid, _ = ssh.exec_command("pgrep honeycomb") - if ret_code != 0: - raise HoneycombError("No process named 'honeycomb' found.") - pid = int(pid) count = 0 start = time() while time() - start < timeout and count < retries: count += 1 - ret_code, _, _ = ssh.exec_command( - " | ".join([ - "sudo tail -n 1000 /var/log/syslog", - "grep {pid}".format(pid=pid), - "grep 'Honeycomb started successfully!'"]) - ) - if ret_code != 0: - logger.debug( - "Attempt #{count} failed on log check.".format( - count=count)) + + try: + status_code_version, _ = HcUtil.get_honeycomb_data( + node, "oper_vpp_version") + status_code_if_cfg, _ = HcUtil.get_honeycomb_data( + node, "config_vpp_interfaces") + status_code_if_oper, _ = HcUtil.get_honeycomb_data( + node, "oper_vpp_interfaces") + except HTTPRequestError: sleep(interval) continue - status_code_version, _ = HcUtil.get_honeycomb_data( - node, "oper_vpp_version") - status_code_if_cfg, _ = HcUtil.get_honeycomb_data( - node, "config_vpp_interfaces") - status_code_if_oper, _ = HcUtil.get_honeycomb_data( - node, "oper_vpp_interfaces") if status_code_if_cfg == HTTPCodes.OK\ and status_code_if_cfg == HTTPCodes.OK\ and status_code_if_oper == HTTPCodes.OK: @@ -200,16 +189,10 @@ class HoneycombSetup(object): sleep(interval) continue else: - _, vpp_status, _ = ssh.exec_command("service vpp status") - ret_code, hc_log, _ = ssh.exec_command( - " | ".join([ - "sudo tail -n 1000 /var/log/syslog", - "grep {pid}".format(pid=pid)])) + _, vpp_status, _ = ssh.exec_command("sudo service vpp status") raise HoneycombError( "Timeout or max retries exceeded. Status of VPP:\n" - "{vpp_status}\n" - "Syslog entries filtered by Honeycomb's pid:\n" - "{hc_log}".format(vpp_status=vpp_status, hc_log=hc_log)) + "{vpp_status}".format(vpp_status=vpp_status)) @staticmethod def check_honeycomb_shutdown_state(node): @@ -677,8 +660,7 @@ class HoneycombStartupConfig(object): def __init__(self): """Initializer.""" - self.template = """ - #!/bin/sh - + self.template = """#!/bin/sh - STATUS=100 while [ $STATUS -eq 100 ] diff --git a/resources/libraries/robot/honeycomb/honeycomb.robot b/resources/libraries/robot/honeycomb/honeycomb.robot index a2be0c7e8d..fa5cea7978 100644 --- a/resources/libraries/robot/honeycomb/honeycomb.robot +++ b/resources/libraries/robot/honeycomb/honeycomb.robot @@ -188,6 +188,7 @@ | | Configure Log Level | ${node} | TRACE | | Configure Persistence | ${node} | disable | | Configure jVPP timeout | ${node} | ${10} +| | Generate Honeycomb startup configuration for ODL test | ${node} | | Clear Persisted Honeycomb Configuration | ${node} | | Configure Honeycomb service on DUTs | ${node} |