TestIngressClusterIp.test_ingress_ip_assignment[ci_k8s_sanity,k8s_sanity,k8s_upgrade] | Failure | Details
Traceback (most recent call last): testtools.testresult.real._StringException: Traceback (most recent call last): File "/contrail-test/tcutils/wrappers.py", line 176, in wrapper raise TestFailed("\n ".join(errmsg)) tcutils.cores.TestFailed: Test failed: TypeError Python 3.6.8: /usr/bin/python3 Thu Apr 24 09:21:01 2025
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=<scripts.k8s_scripts.test_ingress.TestIngressClu...sanity,k8s_sanity,k8s_upgrade] id=0x7fcb301f2b38>, *args=(), **kwargs={}) 78 log.info('Initial checks done. Running the testcase now') 79 log.info('') 80 result = function(self, *args, **kwargs) 81 if self.inputs.upgrade: 82 pid = os.getpid() result = None function = <function TestIngressClusterIp.test_ingress_ip_assignment> self = <scripts.k8s_scripts.test_ingress.TestIngressClu...sanity,k8s_sanity,k8s_upgrade] id=0x7fcb301f2b38> args = () kwargs = {}
/contrail-test/scripts/k8s_scripts/test_ingress.py in test_ingress_ip_assignment(self=<scripts.k8s_scripts.test_ingress.TestIngressClu...sanity,k8s_sanity,k8s_upgrade] id=0x7fcb301f2b38>) 39 labels = {'app':app} 40 namespace = self.setup_namespace(name='default') 41 assert namespace.verify_on_setup() 42 43 service = self.setup_http_service(namespace=namespace.name, namespace = <k8s.namespace.NamespaceFixture object> namespace.verify_on_setup = <bound method NamespaceFixture.verify_on_setup of <k8s.namespace.NamespaceFixture object>>
/contrail-test/fixtures/k8s/namespace.py in verify_on_setup(self=<k8s.namespace.NamespaceFixture object>) 47 self.logger.info('Skipping Namespace API server validation in nested mode') 48 else: 49 if not self.verify_namespace_in_contrail_api(): 50 self.logger.error('Namespace %s not seen in Contrail API' % ( 51 self.name)) self = <k8s.namespace.NamespaceFixture object> self.verify_namespace_in_contrail_api = <bound method retry.<locals>.deco_retry.<locals>.f_retry of <k8s.namespace.NamespaceFixture object>>
/contrail-test/tcutils/util.py in f_retry(*args=(<k8s.namespace.NamespaceFixture object>,), **kwargs={}) 82 mtries, mdelay = tries, delay # make mutable 83 84 result = f(*args, **kwargs) # first attempt 85 rv = result 86 final = False result undefined f = <function NamespaceFixture.verify_namespace_in_contrail_api> args = (<k8s.namespace.NamespaceFixture object>,) kwargs = {}
/contrail-test/fixtures/k8s/namespace.py in verify_namespace_in_contrail_api(self=<k8s.namespace.NamespaceFixture object>) 100 @retry(delay=2, tries=10) 101 def verify_namespace_in_contrail_api(self): 102 self.project_name = self.get_project_name_for_namespace() 103 self.project_fq_name = '%s:%s' %(self.connections.domain_name, 104 self.project_name) self = <k8s.namespace.NamespaceFixture object> self.project_name = None self.get_project_name_for_namespace = <bound method NamespaceFixture.get_project_name_...space of <k8s.namespace.NamespaceFixture object>>
/contrail-test/fixtures/k8s/namespace.py in get_project_name_for_namespace(self=<k8s.namespace.NamespaceFixture object>) 92 # Get lock in case some other api is setting the config 93 with get_lock('kube_manager_conf'): 94 project = self._read_cluster_project() 95 if project: 96 return project project undefined self = <k8s.namespace.NamespaceFixture object> self._read_cluster_project = <bound method NamespaceFixture._read_cluster_project of <k8s.namespace.NamespaceFixture object>>
/contrail-test/fixtures/k8s/namespace.py in _read_cluster_project(self=<k8s.namespace.NamespaceFixture object>) 73 m = None 74 cmd = 'grep "^[ \t]*cluster_project" /etc/contrail/contrail-kubernetes.conf' 75 cp_line= self.inputs.container_tool.run_cmd_on_container(cmd, self.inputs.kube_manager_ips[0], container='contrail-kube-manager') 76 if 'cluster_project' in cp_line: 77 m = re.match('[ ]*cluster_project.*?=[ ]*(.*)?', cp_line) cp_line undefined self = <k8s.namespace.NamespaceFixture object> self.inputs = <common.contrail_test_init.ContrailTestInit object> self.inputs.container_tool = <common.container_cli_wrapper.DockerWrapper object> self.inputs.container_tool.run_cmd_on_container = <bound method DockerWrapper.run_cmd_on_container...mmon.container_cli_wrapper.DockerWrapper object>> cmd = 'grep "^[ \t]*cluster_project" /etc/contrail/contrail-kubernetes.conf' self.inputs.kube_manager_ips = ['10.0.0.50'] container undefined
/contrail-test/common/container_cli_wrapper.py in run_cmd_on_container(self=<common.container_cli_wrapper.DockerWrapper object>, cmd='grep "^[ \t]*cluster_project" /etc/contrail/contrail-kubernetes.conf', host='10.0.0.50', container='contrail-kube-manager', pty=True, detach=None, shell_prefix='/bin/bash -c ') 67 args += ' --privileged ' 68 args += ' -it ' if pty else '' 69 args += cntr 70 cntr_cmd = self.tool + ' exec ' + args 71 if shell_prefix: args = ' --privileged -it ' cntr = None TypeError: must be str, not NoneType __cause__ = None __class__ = <class 'TypeError'> __context__ = None __delattr__ = <method-wrapper '__delattr__' of TypeError object> __dict__ = {} __dir__ = <built-in method __dir__ of TypeError object> __doc__ = 'Inappropriate argument type.' __eq__ = <method-wrapper '__eq__' of TypeError object> __format__ = <built-in method __format__ of TypeError object> __ge__ = <method-wrapper '__ge__' of TypeError object> __getattribute__ = <method-wrapper '__getattribute__' of TypeError object> __gt__ = <method-wrapper '__gt__' of TypeError object> __hash__ = <method-wrapper '__hash__' of TypeError object> __init__ = <method-wrapper '__init__' of TypeError object> __init_subclass__ = <built-in method __init_subclass__ of type object> __le__ = <method-wrapper '__le__' of TypeError object> __lt__ = <method-wrapper '__lt__' of TypeError object> __ne__ = <method-wrapper '__ne__' of TypeError object> __new__ = <built-in method __new__ of type object> __reduce__ = <built-in method __reduce__ of TypeError object> __reduce_ex__ = <built-in method __reduce_ex__ of TypeError object> __repr__ = <method-wrapper '__repr__' of TypeError object> __setattr__ = <method-wrapper '__setattr__' of TypeError object> __setstate__ = <built-in method __setstate__ of TypeError object> __sizeof__ = <built-in method __sizeof__ of TypeError object> __str__ = <method-wrapper '__str__' of TypeError object> __subclasshook__ = <built-in method __subclasshook__ of type object> __suppress_context__ = False __traceback__ = <traceback object> args = ('must be str, not NoneType',) with_traceback = <built-in method with_traceback of TypeError object>
The above is a description of an error in a Python program. Here is the original traceback:
Traceback (most recent call last): File "/contrail-test/tcutils/wrappers.py", line 80, in wrapper result = function(self, *args, **kwargs) File "/contrail-test/scripts/k8s_scripts/test_ingress.py", line 41, in test_ingress_ip_assignment assert namespace.verify_on_setup() File "/contrail-test/fixtures/k8s/namespace.py", line 49, in verify_on_setup if not self.verify_namespace_in_contrail_api(): File "/contrail-test/tcutils/util.py", line 84, in f_retry result = f(*args, **kwargs) # first attempt File "/contrail-test/fixtures/k8s/namespace.py", line 102, in verify_namespace_in_contrail_api self.project_name = self.get_project_name_for_namespace() File "/contrail-test/fixtures/k8s/namespace.py", line 94, in get_project_name_for_namespace project = self._read_cluster_project() File "/contrail-test/fixtures/k8s/namespace.py", line 75, in _read_cluster_project cp_line= self.inputs.container_tool.run_cmd_on_container(cmd, self.inputs.kube_manager_ips[0], container='contrail-kube-manager') File "/contrail-test/common/container_cli_wrapper.py", line 69, in run_cmd_on_container args += cntr TypeError: must be str, not NoneType
| 0.612 |
Log File
|
TestNetworkPolicyServiceIngress.test_ingress_rule_on_pod_with_service[ci_k8s_sanity,k8s_sanity] | Failure | Details
Traceback (most recent call last): testtools.testresult.real._StringException: Traceback (most recent call last): File "/contrail-test/scripts/k8s_scripts/test_policy.py", line 2573, in setUp self._res = self.__class__.SharedResources(self.connections) File "/contrail-test/tcutils/util.py", line 884, in __call__ Singleton, cls).__call__(*args, **kwargs) File "/contrail-test/scripts/k8s_scripts/test_policy.py", line 2451, in __init__ self.setUp() File "/contrail-test/scripts/k8s_scripts/test_policy.py", line 2529, in setUp assert self.ns1.verify_on_setup() File "/contrail-test/fixtures/k8s/namespace.py", line 49, in verify_on_setup if not self.verify_namespace_in_contrail_api(): File "/contrail-test/tcutils/util.py", line 84, in f_retry result = f(*args, **kwargs) # first attempt File "/contrail-test/fixtures/k8s/namespace.py", line 102, in verify_namespace_in_contrail_api self.project_name = self.get_project_name_for_namespace() File "/contrail-test/fixtures/k8s/namespace.py", line 94, in get_project_name_for_namespace project = self._read_cluster_project() File "/contrail-test/fixtures/k8s/namespace.py", line 75, in _read_cluster_project cp_line= self.inputs.container_tool.run_cmd_on_container(cmd, self.inputs.kube_manager_ips[0], container='contrail-kube-manager') File "/contrail-test/common/container_cli_wrapper.py", line 69, in run_cmd_on_container args += cntr TypeError: must be str, not NoneType
| 6.635 |
Log File
|