benchmark-runner 1.0.754__py3-none-any.whl → 1.0.755__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of benchmark-runner might be problematic. Click here for more details.
- benchmark_runner/benchmark_operator/benchmark_operator_workloads_operations.py +4 -12
- benchmark_runner/common/clouds/Azure/azure_operations.py +2 -3
- benchmark_runner/common/clouds/BareMetal/bare_metal_operations.py +1 -2
- benchmark_runner/common/oc/oc.py +17 -6
- benchmark_runner/common/ocp_resources/create_ocp_resource.py +0 -1
- benchmark_runner/main/main.py +2 -2
- benchmark_runner/workloads/workloads_operations.py +4 -6
- {benchmark_runner-1.0.754.dist-info → benchmark_runner-1.0.755.dist-info}/METADATA +1 -1
- {benchmark_runner-1.0.754.dist-info → benchmark_runner-1.0.755.dist-info}/RECORD +12 -12
- {benchmark_runner-1.0.754.dist-info → benchmark_runner-1.0.755.dist-info}/LICENSE +0 -0
- {benchmark_runner-1.0.754.dist-info → benchmark_runner-1.0.755.dist-info}/WHEEL +0 -0
- {benchmark_runner-1.0.754.dist-info → benchmark_runner-1.0.755.dist-info}/top_level.txt +0 -0
|
@@ -67,8 +67,8 @@ class BenchmarkOperatorWorkloadsOperations:
|
|
|
67
67
|
timeout=self._timeout)
|
|
68
68
|
# Generate template class
|
|
69
69
|
self._template = TemplateOperations(workload=self._workload)
|
|
70
|
-
#
|
|
71
|
-
self._oc = self.
|
|
70
|
+
# get oc instance
|
|
71
|
+
self._oc = self.get_oc(kubeadmin_password=self._kubeadmin_password)
|
|
72
72
|
self._virtctl = Virtctl()
|
|
73
73
|
# PrometheusSnapshot
|
|
74
74
|
if self._enable_prometheus_snapshot:
|
|
@@ -87,14 +87,13 @@ class BenchmarkOperatorWorkloadsOperations:
|
|
|
87
87
|
else:
|
|
88
88
|
self._lso_disk_id = None
|
|
89
89
|
|
|
90
|
-
def
|
|
90
|
+
def get_oc(self, kubeadmin_password: str = ''):
|
|
91
91
|
"""
|
|
92
|
-
This method
|
|
92
|
+
This method returns oc instance
|
|
93
93
|
:param kubeadmin_password:
|
|
94
94
|
:return:
|
|
95
95
|
"""
|
|
96
96
|
self._oc = OC(kubeadmin_password=kubeadmin_password)
|
|
97
|
-
self._oc.login()
|
|
98
97
|
return self._oc
|
|
99
98
|
|
|
100
99
|
@logger_time_stamp
|
|
@@ -163,13 +162,6 @@ class BenchmarkOperatorWorkloadsOperations:
|
|
|
163
162
|
logger.info('make undeploy benchmark operator running pod')
|
|
164
163
|
self.make_undeploy_benchmark_controller_manager(runner_path=runner_path)
|
|
165
164
|
|
|
166
|
-
@logger_time_stamp
|
|
167
|
-
def login(self):
|
|
168
|
-
"""
|
|
169
|
-
This method logs in to the cluster
|
|
170
|
-
"""
|
|
171
|
-
self._oc.login()
|
|
172
|
-
|
|
173
165
|
@logger_time_stamp
|
|
174
166
|
def tear_down_pod_after_error(self, yaml: str, pod_name: str):
|
|
175
167
|
"""
|
|
@@ -76,13 +76,12 @@ class AzureOperations:
|
|
|
76
76
|
return vm_instance
|
|
77
77
|
|
|
78
78
|
@logger_time_stamp
|
|
79
|
-
def
|
|
79
|
+
def get_oc(self):
|
|
80
80
|
"""
|
|
81
81
|
This method login to the cluster with new credentials
|
|
82
82
|
:return:
|
|
83
83
|
"""
|
|
84
84
|
oc = OC(kubeadmin_password=self.__kubeadmin_password)
|
|
85
|
-
oc.login()
|
|
86
85
|
return oc
|
|
87
86
|
|
|
88
87
|
def verify_sno_cluster_is_up(self):
|
|
@@ -90,7 +89,7 @@ class AzureOperations:
|
|
|
90
89
|
This method verifies sno cluster is up and running
|
|
91
90
|
@return:
|
|
92
91
|
"""
|
|
93
|
-
master_nodes = self.
|
|
92
|
+
master_nodes = self.get_oc().get_master_nodes()
|
|
94
93
|
if len(master_nodes.split()) == 1:
|
|
95
94
|
return True
|
|
96
95
|
else:
|
|
@@ -304,7 +304,7 @@ class BareMetalOperations:
|
|
|
304
304
|
raise OCPUpgradeFailed(status=oc.get_cluster_status())
|
|
305
305
|
|
|
306
306
|
@logger_time_stamp
|
|
307
|
-
def
|
|
307
|
+
def get_oc(self, kubeadmin_password: str = ''):
|
|
308
308
|
"""
|
|
309
309
|
This method login to the cluster with new credentials
|
|
310
310
|
:param kubeadmin_password, default empty
|
|
@@ -314,7 +314,6 @@ class BareMetalOperations:
|
|
|
314
314
|
oc = OC(kubeadmin_password=kubeadmin_password)
|
|
315
315
|
else:
|
|
316
316
|
oc = OC(kubeadmin_password=self._get_kubeadmin_password())
|
|
317
|
-
oc.login()
|
|
318
317
|
return oc
|
|
319
318
|
|
|
320
319
|
@staticmethod
|
benchmark_runner/common/oc/oc.py
CHANGED
|
@@ -50,6 +50,9 @@ class OC(SSH):
|
|
|
50
50
|
else:
|
|
51
51
|
self.__kubeadmin_password = self.__environment_variables_dict.get('kubeadmin_password', '')
|
|
52
52
|
self.__kubeconfig_path = self.__environment_variables_dict.get('kubeconfig_path', '')
|
|
53
|
+
self._is_logged_in = False # Shared across all instances
|
|
54
|
+
# singleton login
|
|
55
|
+
self.__login()
|
|
53
56
|
|
|
54
57
|
def _ocp_server_version(self, jsonpath: str):
|
|
55
58
|
"""
|
|
@@ -747,23 +750,31 @@ class OC(SSH):
|
|
|
747
750
|
return f"Error: {str(e)}"
|
|
748
751
|
|
|
749
752
|
@logger_time_stamp
|
|
750
|
-
def
|
|
753
|
+
def __login(self):
|
|
751
754
|
"""
|
|
752
|
-
Logs in to the cluster with retries.
|
|
755
|
+
Logs in to the cluster with retries, ensuring only a single login per execution.
|
|
753
756
|
"""
|
|
757
|
+
if self._is_logged_in:
|
|
758
|
+
logger.info("Already logged in. Skipping login.")
|
|
759
|
+
return True # Avoid redundant login attempts
|
|
760
|
+
|
|
754
761
|
for attempt in range(self.RETRIES):
|
|
755
762
|
try:
|
|
756
763
|
if self.__kubeadmin_password and self.__kubeadmin_password.strip():
|
|
757
764
|
self.run(
|
|
758
765
|
f'{self.__cli} login {self.get_kube_api_server()} -u kubeadmin -p {self.__kubeadmin_password}',
|
|
759
|
-
is_check=True
|
|
760
|
-
|
|
766
|
+
is_check=True
|
|
767
|
+
)
|
|
768
|
+
self._is_logged_in = True # Mark as logged in globally
|
|
769
|
+
break # Exit loop upon success
|
|
761
770
|
except Exception as err:
|
|
762
|
-
logger.
|
|
771
|
+
logger.warning(f"Login attempt {attempt + 1} failed: {err}")
|
|
763
772
|
if attempt < self.RETRIES - 1:
|
|
764
773
|
time.sleep(self.DELAY)
|
|
765
774
|
else:
|
|
766
|
-
raise LoginFailed(
|
|
775
|
+
raise LoginFailed("Login failed after multiple attempts")
|
|
776
|
+
|
|
777
|
+
return self._is_logged_in # Ensure return after loop
|
|
767
778
|
|
|
768
779
|
@typechecked
|
|
769
780
|
@logger_time_stamp
|
|
@@ -21,7 +21,6 @@ class CreateOCPResource:
|
|
|
21
21
|
self.__dir_path = f'{os.path.dirname(os.path.realpath(__file__))}'
|
|
22
22
|
self.__environment_variables_dict = environment_variables.environment_variables_dict
|
|
23
23
|
self.__oc = OC(kubeadmin_password=self.__environment_variables_dict.get('kubeadmin_password', ''))
|
|
24
|
-
self.__oc.login()
|
|
25
24
|
self.__oc.populate_additional_template_variables(self.__environment_variables_dict)
|
|
26
25
|
self.__worker_disk_prefix = self.__environment_variables_dict.get('worker_disk_prefix', '')
|
|
27
26
|
self.__worker_disk_ids = self.__environment_variables_dict.get('worker_disk_ids', '')
|
benchmark_runner/main/main.py
CHANGED
|
@@ -165,7 +165,7 @@ def upgrade_ocp_bare_metal(step: str):
|
|
|
165
165
|
:return:
|
|
166
166
|
"""
|
|
167
167
|
bare_metal_operations = BareMetalOperations()
|
|
168
|
-
oc = bare_metal_operations.
|
|
168
|
+
oc = bare_metal_operations.get_oc(kubeadmin_password=kubeadmin_password)
|
|
169
169
|
if step == 'run_bare_metal_ocp_upgrade':
|
|
170
170
|
if not bare_metal_operations.is_ocp_already_upgraded(oc):
|
|
171
171
|
bare_metal_operations.run_ocp_upgrade(oc)
|
|
@@ -198,7 +198,7 @@ def install_resources():
|
|
|
198
198
|
except (ValueError, SyntaxError):
|
|
199
199
|
resources = [install_resources_list]
|
|
200
200
|
logger.info(f'Start Bare-Metal OpenShift resources installation')
|
|
201
|
-
oc = bare_metal_operations.
|
|
201
|
+
oc = bare_metal_operations.get_oc()
|
|
202
202
|
bare_metal_operations.verify_cluster_is_up(oc)
|
|
203
203
|
oc.wait_for_node_ready()
|
|
204
204
|
bare_metal_operations.install_ocp_resources(resources=resources)
|
|
@@ -90,10 +90,9 @@ class WorkloadsOperations:
|
|
|
90
90
|
# Generate templates class
|
|
91
91
|
self._template = TemplateOperations(workload=self._workload)
|
|
92
92
|
|
|
93
|
-
#
|
|
93
|
+
# get oc instance
|
|
94
94
|
if WorkloadsOperations.oc is None:
|
|
95
|
-
|
|
96
|
-
self._oc = WorkloadsOperations.oc
|
|
95
|
+
self._oc = self.get_oc(kubeadmin_password=self._kubeadmin_password)
|
|
97
96
|
self._virtctl = Virtctl()
|
|
98
97
|
|
|
99
98
|
# Prometheus Snapshot
|
|
@@ -131,14 +130,13 @@ class WorkloadsOperations:
|
|
|
131
130
|
else:
|
|
132
131
|
return f'{workload}-{self._time_stamp_format}'
|
|
133
132
|
|
|
134
|
-
def
|
|
133
|
+
def get_oc(self, kubeadmin_password: str = ''):
|
|
135
134
|
"""
|
|
136
|
-
This method
|
|
135
|
+
This method returns oc instance
|
|
137
136
|
:param kubeadmin_password:
|
|
138
137
|
:return: oc instance
|
|
139
138
|
"""
|
|
140
139
|
self._oc = OC(kubeadmin_password=kubeadmin_password)
|
|
141
|
-
self._oc.login()
|
|
142
140
|
return self._oc
|
|
143
141
|
|
|
144
142
|
@logger_time_stamp
|
|
@@ -2,7 +2,7 @@ benchmark_runner/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,
|
|
|
2
2
|
benchmark_runner/benchmark_operator/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
3
|
benchmark_runner/benchmark_operator/benchmark_operator_exceptions.py,sha256=5BCKcvLBMLFW4-XgZ7uXrja7uOE0UaplxAsdkKTpmek,1668
|
|
4
4
|
benchmark_runner/benchmark_operator/benchmark_operator_workloads.py,sha256=dL09ni6x4yaNFHs5djEebe4KE7M4n_rupWH7ngHpJwc,1425
|
|
5
|
-
benchmark_runner/benchmark_operator/benchmark_operator_workloads_operations.py,sha256=
|
|
5
|
+
benchmark_runner/benchmark_operator/benchmark_operator_workloads_operations.py,sha256=enJr5Syq1UFJAVPfUsFfBZ39IKqAgR7DoP3JYjkf1JU,25021
|
|
6
6
|
benchmark_runner/benchmark_operator/hammerdb_pod.py,sha256=Xe3ZDHnbxQgUx9DAkjyeCI9rLqzuVV69GiC8J_FUvKc,8127
|
|
7
7
|
benchmark_runner/benchmark_operator/hammerdb_vm.py,sha256=bG7nb07cL0GuB7-oxf3jFx8bkolD_MujYykUacWqJOM,5785
|
|
8
8
|
benchmark_runner/benchmark_operator/stressng_pod.py,sha256=wOPjETpeUfS7Ey6bpmmYVQas9vtlmyujLf0swemaP4g,5268
|
|
@@ -20,10 +20,10 @@ benchmark_runner/common/assisted_installer/assisted_installer_latest_version.py,
|
|
|
20
20
|
benchmark_runner/common/assisted_installer/jetlag/run_jetlag.sh,sha256=-iJunF4fAQEWdWfICnwCx0xVBb4T_eVTYCi58yY6SpU,947
|
|
21
21
|
benchmark_runner/common/clouds/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
22
22
|
benchmark_runner/common/clouds/Azure/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
23
|
-
benchmark_runner/common/clouds/Azure/azure_operations.py,sha256=
|
|
23
|
+
benchmark_runner/common/clouds/Azure/azure_operations.py,sha256=Ok3l0rxCAqZd2_yzuOuUO6Zs3KjvYC85p2VQf7uyMnM,4735
|
|
24
24
|
benchmark_runner/common/clouds/BareMetal/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
25
25
|
benchmark_runner/common/clouds/BareMetal/bare_metal_exceptions.py,sha256=d-aeCfsfGpZ3e1Bho1M8pYlN0D8R-ffjwPm9YwGHvhU,1552
|
|
26
|
-
benchmark_runner/common/clouds/BareMetal/bare_metal_operations.py,sha256=
|
|
26
|
+
benchmark_runner/common/clouds/BareMetal/bare_metal_operations.py,sha256=RjocXfXX8T4cTGgBkEi6LBRX-y5xk6mQmj7aMvqBu1Q,18044
|
|
27
27
|
benchmark_runner/common/clouds/IBM/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
28
28
|
benchmark_runner/common/clouds/IBM/ibm_exceptions.py,sha256=psqHgqEBRbfFRWD1blwaWGad-QpThgOl8Puq76VIP80,417
|
|
29
29
|
benchmark_runner/common/clouds/IBM/ibm_operations.py,sha256=ZpF3Vnu2YKqAEYVf7ofBg_kOavMaLCXYCt0CdX8dKd4,3419
|
|
@@ -46,7 +46,7 @@ benchmark_runner/common/logger/init_logger.py,sha256=ERa-gNqrl2pZybj7v3csvmao7Mv
|
|
|
46
46
|
benchmark_runner/common/logger/logger_exceptions.py,sha256=rivdlRm_jIsKQ53rP_-HX8emdtOmQNO4JuIkg8fnBoc,454
|
|
47
47
|
benchmark_runner/common/logger/logger_time_stamp.py,sha256=2JgugN9LpXF4Ijx0wPRzz3DAGJB8eJpM5g1qPvbWbV8,1479
|
|
48
48
|
benchmark_runner/common/oc/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
49
|
-
benchmark_runner/common/oc/oc.py,sha256=
|
|
49
|
+
benchmark_runner/common/oc/oc.py,sha256=mwAZ30vrv1WQIFrKmAXx0YBWu8H93MQZ0Ses4MJ1Ksw,69981
|
|
50
50
|
benchmark_runner/common/oc/oc_exceptions.py,sha256=XfKUzeK3Ors_Y2csQEoGqrlsZlYvq6OXLkFh9s_mQRM,6311
|
|
51
51
|
benchmark_runner/common/ocp_resources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
52
52
|
benchmark_runner/common/ocp_resources/create_cnv.py,sha256=AXsyR8_g_RIFHz2rkyHzzvvUDIiGdOi9rZWJPhiPzDQ,3511
|
|
@@ -54,7 +54,7 @@ benchmark_runner/common/ocp_resources/create_custom.py,sha256=rthm96yDzI-Hke54hL
|
|
|
54
54
|
benchmark_runner/common/ocp_resources/create_kata.py,sha256=IhfnDHj0lLUVENA-Nh9BucSAt0BqL8mtqT6QloMzIDg,3721
|
|
55
55
|
benchmark_runner/common/ocp_resources/create_lso.py,sha256=uzhYTUK-645_2L45Q2sbDOuvSLeGnN-UdbdrkYR5PqQ,1634
|
|
56
56
|
benchmark_runner/common/ocp_resources/create_nhc_snr.py,sha256=ejbX-KhkvqU9SCEX1-tA7xiZRXe5bsSAQoyyjMC15IU,1991
|
|
57
|
-
benchmark_runner/common/ocp_resources/create_ocp_resource.py,sha256=
|
|
57
|
+
benchmark_runner/common/ocp_resources/create_ocp_resource.py,sha256=Tq_M3AtykXo7Cp7rZ1nhGnhb_dJdd774C9166qCxQ_Q,5478
|
|
58
58
|
benchmark_runner/common/ocp_resources/create_ocp_resource_exceptions.py,sha256=hthowyHAeg66IZHYPe1FWU3dnhwXcQtPBrOQSO1RZMU,941
|
|
59
59
|
benchmark_runner/common/ocp_resources/create_ocp_resource_operations.py,sha256=47SyVjtv5e9vKuRQFlC-VfGKXBLEl46rut4XVeZRsMo,6834
|
|
60
60
|
benchmark_runner/common/ocp_resources/create_odf.py,sha256=3ZwFaiLB-j062W-6SESZRzh6thUrn1dAzDQ07FISOjE,4441
|
|
@@ -162,7 +162,7 @@ benchmark_runner/krkn_hub/krknhub_workloads.py,sha256=qNRZA-FBQZiT6h013WbP6zBRIN
|
|
|
162
162
|
benchmark_runner/main/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
163
163
|
benchmark_runner/main/environment_variables.py,sha256=FqXk-zKvmunv9vV2td9bYfpeFWaY5s2D38fEnzO-tw0,28189
|
|
164
164
|
benchmark_runner/main/environment_variables_exceptions.py,sha256=UR0Ith0P0oshsDZdJRlRq8ZUTt0h8jFvUtrnP4m4AIY,437
|
|
165
|
-
benchmark_runner/main/main.py,sha256=
|
|
165
|
+
benchmark_runner/main/main.py,sha256=A744O550wQh37hhk10H0HlT28LZ_2EOaRlJyWG6Pras,14083
|
|
166
166
|
benchmark_runner/main/temporary_environment_variables.py,sha256=ODSHkfhgvdr_b2e3XyvykW21MVjSdyqimREyMc2klRE,957
|
|
167
167
|
benchmark_runner/workloads/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
168
168
|
benchmark_runner/workloads/bootstorm_vm.py,sha256=gQcAhsu-5aWp55JqzgLUskCZGZrX53KXoE_Cz2O-6HA,18606
|
|
@@ -171,9 +171,9 @@ benchmark_runner/workloads/vdbench_vm.py,sha256=Yhoz-GbvZwA8q6qGIeSUsYhEIERj8SmJ
|
|
|
171
171
|
benchmark_runner/workloads/windows_vm.py,sha256=eHK79ueAkSlNC1uamz19o7CO20wzJi-UIqRuTByTVxg,2373
|
|
172
172
|
benchmark_runner/workloads/workloads.py,sha256=F9fnk4h715tq7ANSCbDH0jktB8fpr_u3YG61Kdi5_os,1422
|
|
173
173
|
benchmark_runner/workloads/workloads_exceptions.py,sha256=u7VII95iPRF_YhfpGH1U1RmgiIYESMOtbSF1dz7_ToE,1858
|
|
174
|
-
benchmark_runner/workloads/workloads_operations.py,sha256=
|
|
175
|
-
benchmark_runner-1.0.
|
|
176
|
-
benchmark_runner-1.0.
|
|
177
|
-
benchmark_runner-1.0.
|
|
178
|
-
benchmark_runner-1.0.
|
|
179
|
-
benchmark_runner-1.0.
|
|
174
|
+
benchmark_runner/workloads/workloads_operations.py,sha256=EEIZjNYGjEkyUafxFKSu4X9jaN_wgYDbMeCi1hZBZ-0,25186
|
|
175
|
+
benchmark_runner-1.0.755.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
176
|
+
benchmark_runner-1.0.755.dist-info/METADATA,sha256=T1jvuTpygYknOPfmkBaIqKhBnPt_A2Icb1Td2xpFEFo,11498
|
|
177
|
+
benchmark_runner-1.0.755.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
178
|
+
benchmark_runner-1.0.755.dist-info/top_level.txt,sha256=MP7UbTCzu59D53uKCZl5VsQeM_vheyMc7FmryczJQbk,17
|
|
179
|
+
benchmark_runner-1.0.755.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|