You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ROSA HCP does not have machines and MachineConfigPool. user has access only to worker nodes and rosa machinepool
We need to find a way to replace this call if this is not essential for the test
[2024-12-03T22:55:02.669Z] �[31mFAILED�[0m
[2024-12-03T22:55:02.669Z] _______________ TestHugePages.test_hugepages_post_odf_deployment _______________
[2024-12-03T22:55:02.669Z]
[2024-12-03T22:55:02.669Z] self = <tests.functional.z_cluster.test_hugepages.TestHugePages object at 0x7fe516806fa0>
[2024-12-03T22:55:02.669Z] pvc_factory = <function pvc_factory_fixture.<locals>.factory at 0x7fe52408bdc0>
[2024-12-03T22:55:02.669Z] pod_factory = <function pod_factory_fixture.<locals>.factory at 0x7fe52408bee0>
[2024-12-03T22:55:02.669Z] bucket_factory = <function bucket_factory_fixture.<locals>._create_buckets at 0x7fe524976940>
[2024-12-03T22:55:02.669Z] rgw_bucket_factory = None, node_restart_teardown = None
[2024-12-03T22:55:02.669Z]
[2024-12-03T22:55:02.669Z] @skipif_external_mode
[2024-12-03T22:55:02.669Z] @pytest.mark.order(-3)
[2024-12-03T22:55:02.669Z] def test_hugepages_post_odf_deployment(
[2024-12-03T22:55:02.669Z] self,
[2024-12-03T22:55:02.669Z] pvc_factory,
[2024-12-03T22:55:02.669Z] pod_factory,
[2024-12-03T22:55:02.669Z] bucket_factory,
[2024-12-03T22:55:02.669Z] rgw_bucket_factory,
[2024-12-03T22:55:02.669Z] node_restart_teardown,
[2024-12-03T22:55:02.669Z] ):
[2024-12-03T22:55:02.669Z] """
[2024-12-03T22:55:02.669Z] Test to verify that after enabling huge pages the nodes come up with
[2024-12-03T22:55:02.669Z] higher page size and all odf cluster pods come back up.
[2024-12-03T22:55:02.669Z]
[2024-12-03T22:55:02.669Z] """
[2024-12-03T22:55:02.669Z] # Applies huge pages on the cluster nodes
[2024-12-03T22:55:02.669Z] > enable_huge_pages()
[2024-12-03T22:55:02.669Z]
[2024-12-03T22:55:02.669Z] �[1m�[31m/home/jenkins/workspace/qe-deploy-ocs-cluster/ocs-ci/tests/functional/z_cluster/test_hugepages.py�[0m:89:
[2024-12-03T22:55:02.669Z] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[2024-12-03T22:55:02.669Z] �[1m�[31m/home/jenkins/workspace/qe-deploy-ocs-cluster/ocs-ci/ocs_ci/utility/utils.py�[0m:4531: in enable_huge_pages
[2024-12-03T22:55:02.669Z] wait_for_machineconfigpool_status(
[2024-12-03T22:55:02.669Z] �[1m�[31m/home/jenkins/workspace/qe-deploy-ocs-cluster/ocs-ci/ocs_ci/utility/utils.py�[0m:4209: in wait_for_machineconfigpool_status
[2024-12-03T22:55:02.669Z] machine_count = ocp_obj.get()["status"]["machineCount"]
[2024-12-03T22:55:02.669Z] �[1m�[31m/home/jenkins/workspace/qe-deploy-ocs-cluster/ocs-ci/ocs_ci/ocs/ocp.py�[0m:328: in get
[2024-12-03T22:55:02.669Z] return self.exec_oc_cmd(
[2024-12-03T22:55:02.669Z] �[1m�[31m/home/jenkins/workspace/qe-deploy-ocs-cluster/ocs-ci/ocs_ci/ocs/ocp.py�[0m:212: in exec_oc_cmd
[2024-12-03T22:55:02.669Z] out = run_cmd(
[2024-12-03T22:55:02.669Z] �[1m�[31m/home/jenkins/workspace/qe-deploy-ocs-cluster/ocs-ci/ocs_ci/utility/utils.py�[0m:488: in run_cmd
[2024-12-03T22:55:02.669Z] completed_process = exec_cmd(
[2024-12-03T22:55:02.669Z] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[2024-12-03T22:55:02.669Z]
[2024-12-03T22:55:02.669Z] cmd = ['oc', '--kubeconfig', '/home/jenkins/current-cluster-dir/openshift-cluster-dir/auth/kubeconfig', 'get', 'MachineConfigPool', 'worker', ...]
[2024-12-03T22:55:02.669Z] secrets = None, timeout = 600, ignore_error = False, threading_lock = None
[2024-12-03T22:55:02.669Z] silent = False, use_shell = False
[2024-12-03T22:55:02.669Z] cluster_config = <ocs_ci.framework.MultiClusterConfig object at 0x7fe5553eab80>
[2024-12-03T22:55:02.669Z] lock_timeout = 7200, kwargs = {}
[2024-12-03T22:55:02.669Z] masked_cmd = 'oc --kubeconfig /home/jenkins/current-cluster-dir/openshift-cluster-dir/auth/kubeconfig get MachineConfigPool worker -o yaml'
[2024-12-03T22:55:02.669Z]
[2024-12-03T22:55:02.669Z] def exec_cmd(
[2024-12-03T22:55:02.669Z] cmd,
[2024-12-03T22:55:02.669Z] secrets=None,
[2024-12-03T22:55:02.669Z] timeout=600,
[2024-12-03T22:55:02.669Z] ignore_error=False,
[2024-12-03T22:55:02.669Z] threading_lock=None,
[2024-12-03T22:55:02.669Z] silent=False,
[2024-12-03T22:55:02.669Z] use_shell=False,
[2024-12-03T22:55:02.669Z] cluster_config=None,
[2024-12-03T22:55:02.669Z] lock_timeout=7200,
[2024-12-03T22:55:02.669Z] **kwargs,
[2024-12-03T22:55:02.669Z] ):
[2024-12-03T22:55:02.669Z] """
[2024-12-03T22:55:02.669Z] Run an arbitrary command locally
[2024-12-03T22:55:02.669Z]
[2024-12-03T22:55:02.669Z] If the command is grep and matching pattern is not found, then this function
[2024-12-03T22:55:02.669Z] returns "command terminated with exit code 1" in stderr.
[2024-12-03T22:55:02.669Z]
[2024-12-03T22:55:02.669Z] Args:
[2024-12-03T22:55:02.669Z] cmd (str): command to run
[2024-12-03T22:55:02.669Z] secrets (list): A list of secrets to be masked with asterisks
[2024-12-03T22:55:02.669Z] This kwarg is popped in order to not interfere with
[2024-12-03T22:55:02.669Z] subprocess.run(``**kwargs``)
[2024-12-03T22:55:02.669Z] timeout (int): Timeout for the command, defaults to 600 seconds.
[2024-12-03T22:55:02.669Z] ignore_error (bool): True if ignore non zero return code and do not
[2024-12-03T22:55:02.669Z] raise the exception.
[2024-12-03T22:55:02.669Z] threading_lock (threading.RLock): threading.RLock object that is used
[2024-12-03T22:55:02.669Z] for handling concurrent oc commands
[2024-12-03T22:55:02.669Z] silent (bool): If True will silent errors from the server, default false
[2024-12-03T22:55:02.669Z] use_shell (bool): If True will pass the cmd without splitting
[2024-12-03T22:55:02.669Z] cluster_config (MultiClusterConfig): In case of multicluster environment this object
[2024-12-03T22:55:02.669Z] will be non-null
[2024-12-03T22:55:02.669Z] lock_timeout (int): maximum timeout to wait for lock to prevent deadlocks (default 2 hours)
[2024-12-03T22:55:02.669Z]
[2024-12-03T22:55:02.669Z] Raises:
[2024-12-03T22:55:02.669Z] CommandFailed: In case the command execution fails
[2024-12-03T22:55:02.669Z]
[2024-12-03T22:55:02.669Z] Returns:
[2024-12-03T22:55:02.669Z] (CompletedProcess) A CompletedProcess object of the command that was executed
[2024-12-03T22:55:02.669Z] CompletedProcess attributes:
[2024-12-03T22:55:02.669Z] args: The list or str args passed to run().
[2024-12-03T22:55:02.669Z] returncode (str): The exit code of the process, negative for signals.
[2024-12-03T22:55:02.669Z] stdout (str): The standard output (None if not captured).
[2024-12-03T22:55:02.669Z] stderr (str): The standard error (None if not captured).
[2024-12-03T22:55:02.669Z]
[2024-12-03T22:55:02.669Z] """
[2024-12-03T22:55:02.669Z] masked_cmd = mask_secrets(cmd, secrets)
[2024-12-03T22:55:02.669Z] log.info(f"Executing command: {masked_cmd}")
[2024-12-03T22:55:02.669Z] if isinstance(cmd, str) and not kwargs.get("shell"):
[2024-12-03T22:55:02.669Z] cmd = shlex.split(cmd)
[2024-12-03T22:55:02.669Z] if config.RUN.get("custom_kubeconfig_location") and cmd[0] == "oc":
[2024-12-03T22:55:02.669Z] if "--kubeconfig" in cmd:
[2024-12-03T22:55:02.669Z] cmd.pop(2)
[2024-12-03T22:55:02.669Z] cmd.pop(1)
[2024-12-03T22:55:02.669Z] cmd = list_insert_at_position(cmd, 1, ["--kubeconfig"])
[2024-12-03T22:55:02.669Z] cmd = list_insert_at_position(
[2024-12-03T22:55:02.669Z] cmd, 2, [config.RUN["custom_kubeconfig_location"]]
[2024-12-03T22:55:02.669Z] )
[2024-12-03T22:55:02.669Z] if cluster_config and cmd[0] == "oc" and "--kubeconfig" not in cmd:
[2024-12-03T22:55:02.669Z] kubepath = cluster_config.RUN["kubeconfig"]
[2024-12-03T22:55:02.669Z] kube_index = 1
[2024-12-03T22:55:02.669Z] # check if we have an oc plugin in the command
[2024-12-03T22:55:02.669Z] plugin_list = "oc plugin list"
[2024-12-03T22:55:02.669Z] cp = subprocess.run(
[2024-12-03T22:55:02.669Z] shlex.split(plugin_list),
[2024-12-03T22:55:02.669Z] stdout=subprocess.PIPE,
[2024-12-03T22:55:02.669Z] stderr=subprocess.PIPE,
[2024-12-03T22:55:02.669Z] )
[2024-12-03T22:55:02.669Z] subcmd = cmd[1].split("-")
[2024-12-03T22:55:02.669Z] if len(subcmd) > 1:
[2024-12-03T22:55:02.669Z] subcmd = "_".join(subcmd)
[2024-12-03T22:55:02.669Z] if not isinstance(subcmd, str) and isinstance(subcmd, list):
[2024-12-03T22:55:02.669Z] subcmd = str(subcmd[0])
[2024-12-03T22:55:02.669Z]
[2024-12-03T22:55:02.669Z] for l in cp.stdout.decode().splitlines():
[2024-12-03T22:55:02.669Z] if subcmd in l:
[2024-12-03T22:55:02.669Z] # If oc cmdline has plugin name then we need to push the
[2024-12-03T22:55:02.669Z] # --kubeconfig to next index
[2024-12-03T22:55:02.669Z] kube_index = 2
[2024-12-03T22:55:02.669Z] log.info(f"Found oc plugin {subcmd}")
[2024-12-03T22:55:02.669Z] cmd = list_insert_at_position(cmd, kube_index, ["--kubeconfig"])
[2024-12-03T22:55:02.669Z] cmd = list_insert_at_position(cmd, kube_index + 1, [kubepath])
[2024-12-03T22:55:02.669Z] try:
[2024-12-03T22:55:02.669Z] if threading_lock and cmd[0] == "oc":
[2024-12-03T22:55:02.669Z] threading_lock.acquire(timeout=lock_timeout)
[2024-12-03T22:55:02.669Z] completed_process = subprocess.run(
[2024-12-03T22:55:02.669Z] cmd,
[2024-12-03T22:55:02.669Z] stdout=subprocess.PIPE,
[2024-12-03T22:55:02.669Z] stderr=subprocess.PIPE,
[2024-12-03T22:55:02.669Z] stdin=subprocess.PIPE,
[2024-12-03T22:55:02.669Z] timeout=timeout,
[2024-12-03T22:55:02.669Z] **kwargs,
[2024-12-03T22:55:02.669Z] )
[2024-12-03T22:55:02.669Z] finally:
[2024-12-03T22:55:02.669Z] if threading_lock and cmd[0] == "oc":
[2024-12-03T22:55:02.669Z] threading_lock.release()
[2024-12-03T22:55:02.669Z] masked_stdout = mask_secrets(completed_process.stdout.decode(), secrets)
[2024-12-03T22:55:02.669Z] if len(completed_process.stdout) > 0:
[2024-12-03T22:55:02.669Z] log.debug(f"Command stdout: {masked_stdout}")
[2024-12-03T22:55:02.669Z] else:
[2024-12-03T22:55:02.669Z] log.debug("Command stdout is empty")
[2024-12-03T22:55:02.669Z]
[2024-12-03T22:55:02.669Z] masked_stderr = mask_secrets(completed_process.stderr.decode(), secrets)
[2024-12-03T22:55:02.669Z] if len(completed_process.stderr) > 0:
[2024-12-03T22:55:02.669Z] if not silent:
[2024-12-03T22:55:02.669Z] log.warning(f"Command stderr: {masked_stderr}")
[2024-12-03T22:55:02.669Z] else:
[2024-12-03T22:55:02.669Z] log.debug("Command stderr is empty")
[2024-12-03T22:55:02.669Z] log.debug(f"Command return code: {completed_process.returncode}")
[2024-12-03T22:55:02.669Z] if completed_process.returncode and not ignore_error:
[2024-12-03T22:55:02.669Z] masked_stderr = bin_xml_escape(filter_out_emojis(masked_stderr))
[2024-12-03T22:55:02.669Z] if (
[2024-12-03T22:55:02.669Z] "grep" in masked_cmd
[2024-12-03T22:55:02.669Z] and b"command terminated with exit code 1" in completed_process.stderr
[2024-12-03T22:55:02.669Z] ):
[2024-12-03T22:55:02.669Z] log.info(f"No results found for grep command: {masked_cmd}")
[2024-12-03T22:55:02.669Z] else:
[2024-12-03T22:55:02.669Z] > raise CommandFailed(
[2024-12-03T22:55:02.669Z] f"Error during execution of command: {masked_cmd}."
[2024-12-03T22:55:02.669Z] f"\nError is {masked_stderr}"
[2024-12-03T22:55:02.669Z] )
[2024-12-03T22:55:02.669Z] �[1m�[31mE ocs_ci.ocs.exceptions.CommandFailed: Error during execution of command: oc --kubeconfig /home/jenkins/current-cluster-dir/openshift-cluster-dir/auth/kubeconfig get MachineConfigPool worker -o yaml.�[0m
[2024-12-03T22:55:02.669Z] �[1m�[31mE Error is error: the server doesn't have a resource type "MachineConfigPool"�[0m
[2024-12-03T22:55:02.669Z]
[2024-12-03T22:55:02.669Z] �[1m�[31m/home/jenkins/workspace/qe-deploy-ocs-cluster/ocs-ci/ocs_ci/utility/utils.py�[0m:710: CommandFailed
[2024-12-03T22:55:02.669Z]
The text was updated successfully, but these errors were encountered:
ROSA HCP does not have machines and MachineConfigPool. user has access only to worker nodes and rosa machinepool
We need to find a way to replace this call if this is not essential for the test
The text was updated successfully, but these errors were encountered: