benchmark-runner 1.0.740__py3-none-any.whl → 1.0.742__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.

@@ -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._provision_timeout <= 0 or current_wait_time <= self._provision_timeout and oc.upgrade_in_progress():
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
308
311
  :return:
309
312
  """
310
- oc = OC(kubeadmin_password=self._get_kubeadmin_password())
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
 
@@ -33,7 +33,6 @@ class OC(SSH):
33
33
 
34
34
  def __init__(self, kubeadmin_password: str = ''):
35
35
  super().__init__()
36
- self.__kubeadmin_password = kubeadmin_password
37
36
  self.__environment_variables_dict = environment_variables.environment_variables_dict
38
37
  self._run_artifacts = self.__environment_variables_dict.get('run_artifacts_path', '')
39
38
  self.__elasticsearch_url = self.__environment_variables_dict.get('elasticsearch_url', '')
@@ -43,6 +42,10 @@ class OC(SSH):
43
42
  self.__worker_disk_ids = self.__environment_variables_dict.get('worker_disk_ids', '')
44
43
  if self.__worker_disk_ids:
45
44
  self.__worker_disk_ids = ast.literal_eval(self.__worker_disk_ids)
45
+ if kubeadmin_password:
46
+ self.__kubeadmin_password = kubeadmin_password
47
+ else:
48
+ self.__kubeadmin_password = self.__environment_variables_dict.get('kubeadmin_password', '')
46
49
 
47
50
  def get_ocp_server_version(self):
48
51
  """
@@ -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(user=provision_user)
167
- bare_metal_operations.connect_to_provisioner()
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
- bare_metal_operations.disconnect_from_provisioner()
183
+
184
184
 
185
185
 
186
186
  @logger_time_stamp
@@ -217,6 +217,7 @@ class BootstormVM(WorkloadsOperations):
217
217
  failure_vms = [] # List to store failed VM names
218
218
 
219
219
  if self._wait_for_upgrade_version:
220
+ logger.info(f"wait for ocp upgrade version: {self._wait_for_upgrade_version}")
220
221
  upgrade_done = self._oc.get_cluster_status() == f'Cluster version is {self._wait_for_upgrade_version}'
221
222
  current_wait_time = 0
222
223
 
@@ -391,6 +391,7 @@ class WorkloadsOperations:
391
391
  :return:
392
392
  """
393
393
  date_format = '%Y_%m_%d'
394
+ self._oc.login()
394
395
  metadata = {'ocp_version': self._oc.get_ocp_server_version(),
395
396
  'previous_ocp_version': self._oc.get_previous_ocp_version() if self._upgrade_ocp_version else '',
396
397
  'cnv_version': self._oc.get_cnv_version(),
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: benchmark-runner
3
- Version: 1.0.740
3
+ Version: 1.0.742
4
4
  Summary: Benchmark Runner Tool
5
5
  Home-page: https://github.com/redhat-performance/benchmark-runner
6
6
  Author: Red Hat
@@ -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=a9nZZrPxh01N6fY2aadrHW3_p8L4p5av3SnX9uCYCmU,17721
26
+ benchmark_runner/common/clouds/BareMetal/bare_metal_operations.py,sha256=rSRd16sWTeYWto8dRu0rDutIPHk0T5qvi2WmpJC5IAk,18045
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=-ta6Z9H4D0GMX2mNt83M_j6Lr3u_7CgeBB2I_PyQcDs,67742
49
+ benchmark_runner/common/oc/oc.py,sha256=8dVYHOhg8dLN-zBxgFSLA5N-V86HIW3YT_Je1eNajwg,67895
50
50
  benchmark_runner/common/oc/oc_exceptions.py,sha256=4JDebyFqe6yIN6Y70E-oscWnme0t7Ggg_CJBBoOuFPs,6336
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
@@ -162,18 +162,18 @@ 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=SB-rD4U_978gP8ojGUtIsYzhSsmzeEDsUfOiJQJdz9c,14097
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
- benchmark_runner/workloads/bootstorm_vm.py,sha256=1dOThOr4QUptjHg-fV4_-T-0TpriyBvO6As94mLKMtU,18511
168
+ benchmark_runner/workloads/bootstorm_vm.py,sha256=gQcAhsu-5aWp55JqzgLUskCZGZrX53KXoE_Cz2O-6HA,18606
169
169
  benchmark_runner/workloads/vdbench_pod.py,sha256=OcmxVr5QlbkhAgY37wsZ7xJUjs9HI-qMVDex1HdL2P0,9778
170
170
  benchmark_runner/workloads/vdbench_vm.py,sha256=Yhoz-GbvZwA8q6qGIeSUsYhEIERj8SmJB1yjetwsGow,9449
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=zhMAL-Zc2JtdI-LG4kxGwbGwHaLY2DfklpzM4bBG-eo,25261
175
- benchmark_runner-1.0.740.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
176
- benchmark_runner-1.0.740.dist-info/METADATA,sha256=y_Yy8xdbItGuAITl1xQJe4blHuymN2ugMbGRou2teuI,11498
177
- benchmark_runner-1.0.740.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
178
- benchmark_runner-1.0.740.dist-info/top_level.txt,sha256=MP7UbTCzu59D53uKCZl5VsQeM_vheyMc7FmryczJQbk,17
179
- benchmark_runner-1.0.740.dist-info/RECORD,,
174
+ benchmark_runner/workloads/workloads_operations.py,sha256=SdddQUbAN5biRjZr5CvmlgKxcE4xatCnoSBm9cn1K9A,25286
175
+ benchmark_runner-1.0.742.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
176
+ benchmark_runner-1.0.742.dist-info/METADATA,sha256=z6f5NpcnK9f4Ne1NUbKG8yJFV0ZYFrM7bTzJc8_ZICI,11498
177
+ benchmark_runner-1.0.742.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
178
+ benchmark_runner-1.0.742.dist-info/top_level.txt,sha256=MP7UbTCzu59D53uKCZl5VsQeM_vheyMc7FmryczJQbk,17
179
+ benchmark_runner-1.0.742.dist-info/RECORD,,