@@ -1105,7 +1105,7 @@ def __init__(self, ts: TestSettings):
11051105 ConnectionMode .MNP_PRIMARY_DENY ,
11061106 ):
11071107 in_file_template = "pod-secondary-network.yaml.j2"
1108- pod_name = f"normal-pod-secondary-network- server-{ port } "
1108+ pod_name = f"normal-pod-secondary-server-{ port } "
11091109 elif pod_type == PodType .SRIOV :
11101110 in_file_template = "sriov-pod.yaml.j2"
11111111 pod_name = f"sriov-pod-server-{ port } "
@@ -1145,16 +1145,20 @@ def _svc_backend_label(self) -> str:
11451145 )
11461146 return f"{ prefix } -{ self .port } "
11471147
1148- def initialize (self ) -> None :
1149- super ().initialize ()
1150-
1148+ def ensure_services (self ) -> None :
11511149 if self .in_file_template != "" :
1152- self .render_pod_file ("Server Pod Yaml" )
11531150 if self .get_cluster_ip () is None :
11541151 self .create_cluster_ip_service ()
11551152 if self .get_nodeport_ip () is None :
11561153 self .create_node_port_service ()
11571154
1155+ def initialize (self ) -> None :
1156+ super ().initialize ()
1157+
1158+ if self .in_file_template != "" :
1159+ self .render_pod_file ("Server Pod Yaml" )
1160+ self .ensure_services ()
1161+
11581162 def _get_template_args_args (self ) -> list [str ]:
11591163 if not self .exec_persistent :
11601164 return []
@@ -1400,16 +1404,16 @@ def __init__(self, ts: TestSettings, server: ServerTask):
14001404 ConnectionMode .MNP_PRIMARY_DENY ,
14011405 ):
14021406 in_file_template = "pod-secondary-network.yaml.j2"
1403- pod_name = f"normal-pod-secondary-network- { node_location } -client- { port } "
1407+ pod_name = f"normal-pod-secondary-{ node_location } -client"
14041408 elif pod_type == PodType .SRIOV :
14051409 in_file_template = "sriov-pod.yaml.j2"
1406- pod_name = f"sriov-pod-{ node_location } -client- { port } "
1410+ pod_name = f"sriov-pod-{ node_location } -client"
14071411 elif pod_type == PodType .NORMAL :
14081412 in_file_template = "pod.yaml.j2"
1409- pod_name = f"normal-pod-{ node_location } -client- { port } "
1413+ pod_name = f"normal-pod-{ node_location } -client"
14101414 elif pod_type == PodType .HOSTBACKED :
14111415 in_file_template = "host-pod.yaml.j2"
1412- pod_name = f"host-pod-{ node_location } -client- { port } "
1416+ pod_name = f"host-pod-{ node_location } -client"
14131417 else :
14141418 raise ValueError ("Invalid pod_type {pod_type}" )
14151419
0 commit comments