benchmark-runner 1.0.741__py3-none-any.whl → 1.0.743__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/common/clouds/BareMetal/bare_metal_operations.py +28 -22
- benchmark_runner/main/main.py +4 -4
- {benchmark_runner-1.0.741.dist-info → benchmark_runner-1.0.743.dist-info}/METADATA +1 -1
- {benchmark_runner-1.0.741.dist-info → benchmark_runner-1.0.743.dist-info}/RECORD +7 -7
- {benchmark_runner-1.0.741.dist-info → benchmark_runner-1.0.743.dist-info}/LICENSE +0 -0
- {benchmark_runner-1.0.741.dist-info → benchmark_runner-1.0.743.dist-info}/WHEEL +0 -0
- {benchmark_runner-1.0.741.dist-info → benchmark_runner-1.0.743.dist-info}/top_level.txt +0 -0
|
@@ -23,16 +23,10 @@ class BareMetalOperations:
|
|
|
23
23
|
SHORT_TIMEOUT = 600
|
|
24
24
|
|
|
25
25
|
@typechecked
|
|
26
|
-
def __init__(self, user: str):
|
|
26
|
+
def __init__(self, user: str = None):
|
|
27
27
|
self._environment_variables_dict = environment_variables.environment_variables_dict
|
|
28
|
-
self._user = user
|
|
29
28
|
self._ocp_env_flavor = self._environment_variables_dict.get('ocp_env_flavor', '')
|
|
30
29
|
self._create_pod_ci_cmd = self._environment_variables_dict.get('create_pod_ci_cmd', '')
|
|
31
|
-
self._provision_kubeadmin_password_path = self._environment_variables_dict.get('provision_kubeadmin_password_path', '')
|
|
32
|
-
self._provision_kubeconfig_path = self._environment_variables_dict.get('provision_kubeconfig_path', '')
|
|
33
|
-
self._provision_installer_path = self._environment_variables_dict.get('provision_installer_path', '')
|
|
34
|
-
self._provision_installer_cmd = self._environment_variables_dict.get('provision_installer_cmd', '')
|
|
35
|
-
self._provision_installer_log = self._environment_variables_dict.get('provision_installer_log', '')
|
|
36
30
|
self._install_ocp_version = self._environment_variables_dict.get('install_ocp_version', '')
|
|
37
31
|
self._cluster_type = self._environment_variables_dict.get('cluster_type', '')
|
|
38
32
|
self._expected_nodes = self._environment_variables_dict.get('expected_nodes', '')
|
|
@@ -41,22 +35,30 @@ class BareMetalOperations:
|
|
|
41
35
|
self._expected_nodes = ast.literal_eval(self._expected_nodes)
|
|
42
36
|
self._ocp_version_build = self._environment_variables_dict.get('ocp_version_build', '')
|
|
43
37
|
self._num_odf_disks = int(self._environment_variables_dict.get('num_odf_disk', 1))
|
|
44
|
-
self._provision_ip = self._environment_variables_dict.get('provision_ip', '')
|
|
45
|
-
self._provision_port = int(self._environment_variables_dict.get('provision_port', ''))
|
|
46
|
-
self._provision_timeout = int(self._environment_variables_dict.get('provision_timeout', ''))
|
|
47
|
-
self._container_private_key_path = self._environment_variables_dict.get('container_private_key_path', '')
|
|
48
|
-
self._connection_data = ConnectionData(host_name=self._provision_ip,
|
|
49
|
-
user_name=self._user,
|
|
50
|
-
port=self._provision_port,
|
|
51
|
-
timeout=self._provision_timeout,
|
|
52
|
-
ssh_key=self._container_private_key_path)
|
|
53
|
-
self._remote_ssh = RemoteSsh(self._connection_data)
|
|
54
|
-
if self._environment_variables_dict.get('github_repository_short', ''):
|
|
55
|
-
self._github_operations = GitHubOperations()
|
|
56
38
|
self._ssh = SSH()
|
|
57
39
|
self._cli = self._environment_variables_dict.get('cli', '')
|
|
58
40
|
self._upgrade_ocp_version = self._environment_variables_dict.get('upgrade_ocp_version', '')
|
|
59
41
|
self._upgrade_channel = self._environment_variables_dict.get('upgrade_channel', '')
|
|
42
|
+
self._timeout = int(self._environment_variables_dict.get('timeout', ''))
|
|
43
|
+
if user:
|
|
44
|
+
self._user = user
|
|
45
|
+
self._provision_kubeadmin_password_path = self._environment_variables_dict.get('provision_kubeadmin_password_path', '')
|
|
46
|
+
self._provision_kubeconfig_path = self._environment_variables_dict.get('provision_kubeconfig_path', '')
|
|
47
|
+
self._provision_installer_path = self._environment_variables_dict.get('provision_installer_path', '')
|
|
48
|
+
self._provision_installer_cmd = self._environment_variables_dict.get('provision_installer_cmd', '')
|
|
49
|
+
self._provision_installer_log = self._environment_variables_dict.get('provision_installer_log', '')
|
|
50
|
+
self._provision_ip = self._environment_variables_dict.get('provision_ip', '')
|
|
51
|
+
self._provision_port = int(self._environment_variables_dict.get('provision_port', ''))
|
|
52
|
+
self._provision_timeout = int(self._environment_variables_dict.get('provision_timeout', ''))
|
|
53
|
+
self._container_private_key_path = self._environment_variables_dict.get('container_private_key_path', '')
|
|
54
|
+
self._connection_data = ConnectionData(host_name=self._provision_ip,
|
|
55
|
+
user_name=self._user,
|
|
56
|
+
port=self._provision_port,
|
|
57
|
+
timeout=self._provision_timeout,
|
|
58
|
+
ssh_key=self._container_private_key_path)
|
|
59
|
+
self._remote_ssh = RemoteSsh(self._connection_data)
|
|
60
|
+
if self._environment_variables_dict.get('github_repository_short', ''):
|
|
61
|
+
self._github_operations = GitHubOperations()
|
|
60
62
|
|
|
61
63
|
def _get_kubeadmin_password(self):
|
|
62
64
|
"""
|
|
@@ -103,7 +105,7 @@ class BareMetalOperations:
|
|
|
103
105
|
current_wait_time = 0
|
|
104
106
|
logger.info(f'Waiting until the upgrade to version {self._upgrade_ocp_version} starts...')
|
|
105
107
|
oc.wait_for_ocp_upgrade_start(upgrade_version=self._upgrade_ocp_version)
|
|
106
|
-
while self.
|
|
108
|
+
while self._timeout <= 0 or current_wait_time <= self._timeout and oc.upgrade_in_progress():
|
|
107
109
|
logger.info(f'Waiting till OCP upgrade complete, waiting {int(current_wait_time / 60)} minutes')
|
|
108
110
|
# sleep for x seconds
|
|
109
111
|
time.sleep(sleep_time)
|
|
@@ -302,12 +304,16 @@ class BareMetalOperations:
|
|
|
302
304
|
raise OCPUpgradeFailed(status=oc.get_cluster_status())
|
|
303
305
|
|
|
304
306
|
@logger_time_stamp
|
|
305
|
-
def oc_login(self):
|
|
307
|
+
def oc_login(self, kubeadmin_password: str = ''):
|
|
306
308
|
"""
|
|
307
309
|
This method login to the cluster with new credentials
|
|
310
|
+
:param kubeadmin_password, default empty
|
|
308
311
|
:return:
|
|
309
312
|
"""
|
|
310
|
-
|
|
313
|
+
if kubeadmin_password:
|
|
314
|
+
oc = OC(kubeadmin_password=kubeadmin_password)
|
|
315
|
+
else:
|
|
316
|
+
oc = OC(kubeadmin_password=self._get_kubeadmin_password())
|
|
311
317
|
oc.login()
|
|
312
318
|
return oc
|
|
313
319
|
|
benchmark_runner/main/main.py
CHANGED
|
@@ -42,6 +42,7 @@ azure_cluster_operation = environment_variables_dict.get('azure_cluster_operatio
|
|
|
42
42
|
ci_status = environment_variables_dict.get('ci_status', '')
|
|
43
43
|
install_ocp_version = environment_variables_dict.get('install_ocp_version', '')
|
|
44
44
|
upgrade_ocp_version = environment_variables_dict.get('upgrade_ocp_version', '')
|
|
45
|
+
kubeadmin_password = environment_variables_dict.get('kubeadmin_password', '')
|
|
45
46
|
odf_version = environment_variables_dict.get('odf_version', '')
|
|
46
47
|
lso_version = environment_variables_dict.get('lso_version', '')
|
|
47
48
|
cnv_version = environment_variables_dict.get('cnv_version', '')
|
|
@@ -163,9 +164,8 @@ def upgrade_ocp_bare_metal(step: str):
|
|
|
163
164
|
This method runs Bare Metal OCP upgrade
|
|
164
165
|
:return:
|
|
165
166
|
"""
|
|
166
|
-
bare_metal_operations = BareMetalOperations(
|
|
167
|
-
bare_metal_operations.
|
|
168
|
-
oc = bare_metal_operations.oc_login()
|
|
167
|
+
bare_metal_operations = BareMetalOperations()
|
|
168
|
+
oc = bare_metal_operations.oc_login(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)
|
|
@@ -180,7 +180,7 @@ def upgrade_ocp_bare_metal(step: str):
|
|
|
180
180
|
error_message = f'OCP {upgrade_ocp_version} upgrade failed'
|
|
181
181
|
logger.error(error_message)
|
|
182
182
|
raise RuntimeError(error_message)
|
|
183
|
-
|
|
183
|
+
|
|
184
184
|
|
|
185
185
|
|
|
186
186
|
@logger_time_stamp
|
|
@@ -23,7 +23,7 @@ benchmark_runner/common/clouds/Azure/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeu
|
|
|
23
23
|
benchmark_runner/common/clouds/Azure/azure_operations.py,sha256=S9_ZI0ESASUNWIpQ1WeekjrKBVtVWZDdFoIL0qEC35s,4758
|
|
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=OWzpIHu-Xqixb5YviJD5oCji_eqFAfra1ienIHxlAxw,18065
|
|
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
|
|
@@ -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=3bzRBuvSkcqcvleIKrCTEWGwd788mg20_2n8T1_kWwA,28075
|
|
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=MWZnLXCAvx9lC2l9s6q3fzI5iiSnYA2ybyNhDhud3aA,14087
|
|
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
|
|
@@ -172,8 +172,8 @@ benchmark_runner/workloads/windows_vm.py,sha256=eHK79ueAkSlNC1uamz19o7CO20wzJi-U
|
|
|
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
174
|
benchmark_runner/workloads/workloads_operations.py,sha256=SdddQUbAN5biRjZr5CvmlgKxcE4xatCnoSBm9cn1K9A,25286
|
|
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.
|
|
175
|
+
benchmark_runner-1.0.743.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
176
|
+
benchmark_runner-1.0.743.dist-info/METADATA,sha256=GkhbKsCOhDn7F12ZCRyn5TRonTL2jVjv83RlyTEU3h4,11498
|
|
177
|
+
benchmark_runner-1.0.743.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
178
|
+
benchmark_runner-1.0.743.dist-info/top_level.txt,sha256=MP7UbTCzu59D53uKCZl5VsQeM_vheyMc7FmryczJQbk,17
|
|
179
|
+
benchmark_runner-1.0.743.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|