AnalyticsTestSanityWithMin.test_run_contrail_logs_cli_cmd_with_multiple_different_optional_args[sanity] Failure Details Logs: Traceback (most recent call last): testtools.testresult.real._StringException: Empty attachments: pythonlogging:'' stderr stdout Traceback (most recent call last): File "tcutils/wrappers.py", line 162, in wrapper raise TestFailed("\n ".join(errmsg)) tcutils.cores.TestFailed: Test failed: Python 2.7.6: /usr/bin/python Wed Nov 8 13:24:18 2017 A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred. /contrail-test/tcutils/wrappers.py in wrapper(self=, *args=(), **kwargs={}) 76 log.info('Initial checks done. Running the testcase now') 77 log.info('') 78 result = function(self, *args, **kwargs) 79 except KeyboardInterrupt: 80 raise result = None function = self = args = () kwargs = {} /contrail-test/serial_scripts/analytics/test_analytics_resource.py in test_run_contrail_logs_cli_cmd_with_multiple_different_optional_args(self=) 170 ] 171 172 return self.test_cmd_output('contrail-logs', cmd_args_list, check_output=True) 173 174 @test.attr(type=['sanity']) self = self.test_cmd_output = > cmd_args_list = [{'no_key': ['start-time now-5m', 'end-time now'], 'object-type': 'vrouter'}, {'message-type': 'NodeStatusUVE', 'no_key': ['start-time now-10m', 'end-time now', 'raw'], 'object-type': 'database-node'}, {'message-type': 'CassandraStatusUVE', 'no_key': ['start-time now-2h'], 'node-type': 'Database'}, {'message-type': 'UveVMInterfaceAgentTrace', 'no_key': ['start-time now-10m', 'json'], 'node-type': 'Compute'}, {'message-type': 'SandeshModuleClientTrace', 'module': 'contrail-vrouter-agent', 'no_key': ['start-time now-20m', 'end-time now']}, {'module': 'contrail-api', 'no_key': ['raw'], 'node-type': 'Config'}, {'message-type': 'UveVirtualNetworkAgentTrace', 'module': 'contrail-vrouter-agent', 'no_key': ['last 5m', 'verbose', 'reverse'], 'node-type': 'Compute'}, {'message-type': 'AnalyticsApiStats', 'module': 'contrail-analytics-api', 'no_key': ['json'], 'node-type': 'Analytics '}, {'no_key': ['verbose', 'raw', 'json'], 'object-id': u'b032c710-645a-4b76-93a2-e5c432af7e2b', 'object-type': 'virtual-machine'}, {'message-type': 'AnalyticsApiStats', 'module': 'contrail-analytics-api', 'node-type': 'Analytics'}, {'module': 'contrail-control', 'no_key': ['last 10m'], 'object-type': 'virtual-network'}, {'module': 'contrail-analytics-api', 'node-type': 'Analytics', 'source': u'nodem6'}, {'no_key': ['help']}] check_output undefined builtinTrue = True /contrail-test/serial_scripts/analytics/base.py in test_cmd_output(self=, cmd_type='contrail-logs', cmd_args_list=[{'no_key': ['start-time now-5m', 'end-time now'], 'object-type': 'vrouter'}, {'message-type': 'NodeStatusUVE', 'no_key': ['start-time now-10m', 'end-time now', 'raw'], 'object-type': 'database-node'}, {'message-type': 'CassandraStatusUVE', 'no_key': ['start-time now-2h'], 'node-type': 'Database'}, {'message-type': 'UveVMInterfaceAgentTrace', 'no_key': ['start-time now-10m', 'json'], 'node-type': 'Compute'}, {'message-type': 'SandeshModuleClientTrace', 'module': 'contrail-vrouter-agent', 'no_key': ['start-time now-20m', 'end-time now']}, {'module': 'contrail-api', 'no_key': ['raw'], 'node-type': 'Config'}, {'message-type': 'UveVirtualNetworkAgentTrace', 'module': 'contrail-vrouter-agent', 'no_key': ['last 5m', 'verbose', 'reverse'], 'node-type': 'Compute'}, {'message-type': 'AnalyticsApiStats', 'module': 'contrail-analytics-api', 'no_key': ['json'], 'node-type': 'Analytics '}, {'no_key': ['verbose', 'raw', 'json'], 'object-id': u'b032c710-645a-4b76-93a2-e5c432af7e2b', 'object-type': 'virtual-machine'}, {'message-type': 'AnalyticsApiStats', 'module': 'contrail-analytics-api', 'node-type': 'Analytics'}, {'module': 'contrail-control', 'no_key': ['last 10m'], 'object-type': 'virtual-network'}, {'module': 'contrail-analytics-api', 'node-type': 'Analytics', 'source': u'nodem6'}, {'no_key': ['help']}], check_output=True, form_cmd=True) 50 cmd = self._form_cmd(cmd_type, cmd_args) 51 self.logger.info("Running the following cmd:%s \n" %cmd) 52 if not self.execute_cli_cmd(cmd, check_output): 53 self.logger.error('%s command failed..' % cmd) 54 failed_cmds.append(cmd) self = self.execute_cli_cmd = > cmd = 'contrail-logs --object-type virtual-network --last 10m --module contrail-control' check_output = True /contrail-test/serial_scripts/analytics/base.py in execute_cli_cmd(self=, cmd='contrail-logs --object-type virtual-network --last 10m --module contrail-control', check_output=True) 77 analytics = self.res.inputs.collector_ips[0] 78 output = self.res.inputs.run_cmd_on_server(analytics, cmd, 79 container='analytics') 80 self.logger.info("Output: %s \n" % output) 81 if output.failed: container undefined /contrail-test/common/contrail_test_init.py in run_cmd_on_server(self=, server_ip='10.204.216.95', issue_cmd='contrail-logs --object-type virtual-network --last 10m --module contrail-control', username=u'root', password=u'c0ntrail123', pty=True, as_sudo=True, container='analytics', detach=None) 1061 logger=self.logger, 1062 container=container, 1063 detach=detach) 1064 return output 1065 # end run_cmd_on_server detach = None /contrail-test/tcutils/util.py in run_cmd_on_server(issue_cmd='contrail-logs --object-type virtual-network --last 10m --module contrail-control', server_ip='10.204.216.95', username=u'root', password=u'c0ntrail123', pty=True, as_sudo=True, logger=, container='analytics', detach=None, shell_prefix='/bin/bash -c ') 843 issue_cmd) 844 logger.debug('[%s]: Running cmd : %s' % (server_ip, updated_cmd)) 845 output = _run(updated_cmd, pty=pty) 846 logger.debug('Output : %s' % (output)) 847 return output output undefined _run = updated_cmd = "docker exec --privileged -it analytics /bin/ba...ual-network --last 10m --module contrail-control'" pty = True /usr/local/lib/python2.7/dist-packages/fabric/network.py in host_prompting_wrapper(*args=("docker exec --privileged -it analytics /bin/ba...ual-network --last 10m --module contrail-control'",), **kwargs={'pty': True}) 675 " host string for connection: ") 676 env.update(to_dict(host_string)) 677 return func(*args, **kwargs) 678 host_prompting_wrapper.undecorated = func 679 return host_prompting_wrapper func = args = ("docker exec --privileged -it analytics /bin/ba...ual-network --last 10m --module contrail-control'",) kwargs = {'pty': True} /usr/local/lib/python2.7/dist-packages/fabric/operations.py in sudo(command="docker exec --privileged -it analytics /bin/ba...ual-network --last 10m --module contrail-control'", shell=True, pty=True, combine_stderr=None, user=None, quiet=False, warn_only=False, stdout=None, stderr=None, group=None, timeout=None, shell_escape=None, capture_buffer_size=None) 1144 group=group, quiet=quiet, warn_only=warn_only, stdout=stdout, 1145 stderr=stderr, timeout=timeout, shell_escape=shell_escape, 1146 capture_buffer_size=capture_buffer_size, 1147 ) 1148 capture_buffer_size = None /usr/local/lib/python2.7/dist-packages/fabric/operations.py in _run_command(command="docker exec --privileged -it analytics /bin/ba...ual-network --last 10m --module contrail-control'", shell=True, pty=True, combine_stderr=None, sudo=True, user=None, quiet=False, warn_only=False, stdout=None, stderr=None, group=None, timeout=None, shell_escape=True, capture_buffer_size=None) 929 combine_stderr=combine_stderr, invoke_shell=False, stdout=stdout, 930 stderr=stderr, timeout=timeout, 931 capture_buffer_size=capture_buffer_size) 932 933 # Assemble output string capture_buffer_size = None /usr/local/lib/python2.7/dist-packages/fabric/operations.py in _execute(channel= >, command='sudo -S -p \'sudo password:\' /bin/bash -l -c "do...al-network --last 10m --module contrail-control\'"', pty=True, combine_stderr=True, invoke_shell=False, stdout=<_io.TextIOWrapper encoding='utf8'>, stderr=<_io.TextIOWrapper encoding='utf8'>, timeout=120, capture_buffer_size=None) 811 # exception within, recv_exit_status()) 812 for worker in workers: 813 worker.raise_if_needed() 814 try: 815 time.sleep(ssh.io_sleep) worker = worker.raise_if_needed = > /usr/local/lib/python2.7/dist-packages/fabric/thread_handling.py in wrapper(*args=( >, 'recv'), **kwargs={'capture': [], 'stream': <_io.TextIOWrapper encoding='utf8'>, 'timeout': 120}) 10 def wrapper(*args, **kwargs): 11 try: 12 callable(*args, **kwargs) 13 except BaseException: 14 self.exception = sys.exc_info() callable = args = ( >, 'recv') kwargs = {'capture': [], 'stream': <_io.TextIOWrapper encoding='utf8'>, 'timeout': 120} /usr/local/lib/python2.7/dist-packages/fabric/io.py in output_loop(*args=( >, 'recv'), **kwargs={'capture': [], 'stream': <_io.TextIOWrapper encoding='utf8'>, 'timeout': 120}) 30 31 def output_loop(*args, **kwargs): 32 OutputLooper(*args, **kwargs).loop() 33 34 global OutputLooper = args = ( >, 'recv') kwargs = {'capture': [], 'stream': <_io.TextIOWrapper encoding='utf8'>, 'timeout': 120} ).loop undefined /usr/local/lib/python2.7/dist-packages/fabric/io.py in loop(self=) 85 elapsed = time.time() - start 86 if self.timeout is not None and elapsed > self.timeout: 87 raise CommandTimeout(timeout=self.timeout) 88 continue 89 # Empty byte == EOS global CommandTimeout = timeout undefined self = self.timeout = 120 : Command failed to finish in 120 seconds __class__ = __delattr__ = __dict__ = {'message': 'Command failed to finish in 120 seconds', 'timeout': 120} __doc__ = None __format__ = __getattribute__ = __getitem__ = __getslice__ = __hash__ = __init__ = __module__ = 'fabric.exceptions' __new__ = __reduce__ = __reduce_ex__ = __repr__ = __setattr__ = __setstate__ = __sizeof__ = __str__ = __subclasshook__ = __unicode__ = __weakref__ = None args = ('Command failed to finish in 120 seconds',) message = 'Command failed to finish in 120 seconds' timeout = 120 The above is a description of an error in a Python program. Here is the original traceback: Traceback (most recent call last): File "tcutils/wrappers.py", line 78, in wrapper result = function(self, *args, **kwargs) File "serial_scripts/analytics/test_analytics_resource.py", line 172, in test_run_contrail_logs_cli_cmd_with_multiple_different_optional_args return self.test_cmd_output('contrail-logs', cmd_args_list, check_output=True) File "/contrail-test/serial_scripts/analytics/base.py", line 52, in test_cmd_output if not self.execute_cli_cmd(cmd, check_output): File "/contrail-test/serial_scripts/analytics/base.py", line 79, in execute_cli_cmd container='analytics') File "common/contrail_test_init.py", line 1063, in run_cmd_on_server detach=detach) File "tcutils/util.py", line 845, in run_cmd_on_server output = _run(updated_cmd, pty=pty) File "/usr/local/lib/python2.7/dist-packages/fabric/network.py", line 677, in host_prompting_wrapper return func(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/fabric/operations.py", line 1146, in sudo capture_buffer_size=capture_buffer_size, File "/usr/local/lib/python2.7/dist-packages/fabric/operations.py", line 931, in _run_command capture_buffer_size=capture_buffer_size) File "/usr/local/lib/python2.7/dist-packages/fabric/operations.py", line 813, in _execute worker.raise_if_needed() File "/usr/local/lib/python2.7/dist-packages/fabric/thread_handling.py", line 12, in wrapper callable(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/fabric/io.py", line 32, in output_loop OutputLooper(*args, **kwargs).loop() File "/usr/local/lib/python2.7/dist-packages/fabric/io.py", line 87, in loop raise CommandTimeout(timeout=self.timeout) CommandTimeout: Command failed to finish in 120 seconds Cores found(1): {'10.204.216.95': ['core.contrail-query-.3327.nodem6.1510127538']}