[k8s-automation]: rt_number need to be treated as string
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Juniper Openstack | Status tracked in Trunk | |||||
R5.0 |
Fix Released
|
Critical
|
Pulkit Tandon | |||
Trunk |
Fix Released
|
Critical
|
Pulkit Tandon |
Bug Description
In R5.0 contrail-test using "contrail_
router_asn: 64512
public_rt: 2225
Whn contrail_
Earlier parse_ini_file used to read these values as a string.
Thus, the values self.mx_rt and self.router_asn are treated as string everywhere.
Treating them as integer can lead to issues as these variables have been used as string everywhere. Thus, changing it to a "str" variable.
For e.g., I landed into following issue:
=======
ERROR: setUpClass (scripts.
-------
Traceback (most recent call last):
File "scripts/
super(
File "common/
api_
File "tcutils/util.py", line 997, in __call__
Singleton, cls).__
File "common/
self.
File "common/
assert self.public_
File "/contrail-
if not self.verify_
File "tcutils/util.py", line 62, in f_retry
result = f(*args, **kwargs) # first attempt
File "/contrail-
if not any(item.
File "/contrail-
if not any(item.
TypeError: endswith first arg must be str, unicode, or tuple, not int
Reason:
(Pdb) self.rt_names
['target:
(Pdb) self.rt_names[1]
'target:64512:2225'
(Pdb) self.rt_number
2225
(Pdb) self.rt_
*** TypeError: endswith first arg must be str, unicode, or tuple, not int
This fails complete k8s sanity in a particular case where MX_GW_TEST=1
Review in progress for https:/ /review. opencontrail. org/41789
Submitter: Pulkit Tandon (<email address hidden>)