Moving oc binary to /usr/bin/oc Extracting cluster data, mtc-apps-deployer, and mtc-python-client. ./ ./aws/ ./aws/mtc-source-cro4/ ./aws/mtc-source-cro4/auth/ ./aws/mtc-source-cro4/auth/kubeconfig ./aws/mtc-source-cro4/auth/kubeadmin-password ./aws/mtc-source-cro4/cluster_data.yaml ./aws/mtc-source-cro4/.clusterapi_output/ ./aws/mtc-source-cro4/.clusterapi_output/envtest.kubeconfig ./aws/mtc-source-cro4/.clusterapi_output/Namespace--openshift-cluster-api-guests.yaml ./aws/mtc-source-cro4/.clusterapi_output/AWSClusterControllerIdentity--default.yaml ./aws/mtc-source-cro4/.clusterapi_output/Cluster-openshift-cluster-api-guests-mtc-source-cro4-mpb67.yaml ./aws/mtc-source-cro4/.clusterapi_output/AWSCluster-openshift-cluster-api-guests-mtc-source-cro4-mpb67.yaml ./aws/mtc-source-cro4/.clusterapi_output/AWSMachine-openshift-cluster-api-guests-mtc-source-cro4-mpb67-bootstrap.yaml ./aws/mtc-source-cro4/.clusterapi_output/AWSMachine-openshift-cluster-api-guests-mtc-source-cro4-mpb67-master-0.yaml ./aws/mtc-source-cro4/.clusterapi_output/AWSMachine-openshift-cluster-api-guests-mtc-source-cro4-mpb67-master-1.yaml ./aws/mtc-source-cro4/.clusterapi_output/AWSMachine-openshift-cluster-api-guests-mtc-source-cro4-mpb67-master-2.yaml ./aws/mtc-source-cro4/.clusterapi_output/Machine-openshift-cluster-api-guests-mtc-source-cro4-mpb67-bootstrap.yaml ./aws/mtc-source-cro4/.clusterapi_output/Machine-openshift-cluster-api-guests-mtc-source-cro4-mpb67-master-0.yaml ./aws/mtc-source-cro4/.clusterapi_output/Machine-openshift-cluster-api-guests-mtc-source-cro4-mpb67-master-1.yaml ./aws/mtc-source-cro4/.clusterapi_output/Machine-openshift-cluster-api-guests-mtc-source-cro4-mpb67-master-2.yaml ./aws/mtc-source-cro4/.clusterapi_output/Secret-openshift-cluster-api-guests-mtc-source-cro4-mpb67-bootstrap.yaml ./aws/mtc-source-cro4/.clusterapi_output/Secret-openshift-cluster-api-guests-mtc-source-cro4-mpb67-master.yaml ./aws/mtc-target-vrkh/ ./aws/mtc-target-vrkh/auth/ ./aws/mtc-target-vrkh/auth/kubeconfig ./aws/mtc-target-vrkh/auth/kubeadmin-password ./aws/mtc-target-vrkh/cluster_data.yaml ./aws/mtc-target-vrkh/.clusterapi_output/ ./aws/mtc-target-vrkh/.clusterapi_output/envtest.kubeconfig ./aws/mtc-target-vrkh/.clusterapi_output/Namespace--openshift-cluster-api-guests.yaml ./aws/mtc-target-vrkh/.clusterapi_output/AWSClusterControllerIdentity--default.yaml ./aws/mtc-target-vrkh/.clusterapi_output/Cluster-openshift-cluster-api-guests-mtc-target-vrkh-bwqcq.yaml ./aws/mtc-target-vrkh/.clusterapi_output/AWSCluster-openshift-cluster-api-guests-mtc-target-vrkh-bwqcq.yaml ./aws/mtc-target-vrkh/.clusterapi_output/AWSMachine-openshift-cluster-api-guests-mtc-target-vrkh-bwqcq-bootstrap.yaml ./aws/mtc-target-vrkh/.clusterapi_output/AWSMachine-openshift-cluster-api-guests-mtc-target-vrkh-bwqcq-master-0.yaml ./aws/mtc-target-vrkh/.clusterapi_output/AWSMachine-openshift-cluster-api-guests-mtc-target-vrkh-bwqcq-master-1.yaml ./aws/mtc-target-vrkh/.clusterapi_output/AWSMachine-openshift-cluster-api-guests-mtc-target-vrkh-bwqcq-master-2.yaml ./aws/mtc-target-vrkh/.clusterapi_output/Machine-openshift-cluster-api-guests-mtc-target-vrkh-bwqcq-bootstrap.yaml ./aws/mtc-target-vrkh/.clusterapi_output/Machine-openshift-cluster-api-guests-mtc-target-vrkh-bwqcq-master-0.yaml ./aws/mtc-target-vrkh/.clusterapi_output/Machine-openshift-cluster-api-guests-mtc-target-vrkh-bwqcq-master-1.yaml ./aws/mtc-target-vrkh/.clusterapi_output/Machine-openshift-cluster-api-guests-mtc-target-vrkh-bwqcq-master-2.yaml ./aws/mtc-target-vrkh/.clusterapi_output/Secret-openshift-cluster-api-guests-mtc-target-vrkh-bwqcq-bootstrap.yaml ./aws/mtc-target-vrkh/.clusterapi_output/Secret-openshift-cluster-api-guests-mtc-target-vrkh-bwqcq-master.yaml Creating Python virtual environment Installing mtc-apps-deployer and mtc-python-client. Collecting pytest (from -r /mtc-e2e-qev2/requirements.txt (line 1)) Downloading pytest-8.3.3-py3-none-any.whl.metadata (7.5 kB) Collecting pytest-rerunfailures (from -r /mtc-e2e-qev2/requirements.txt (line 2)) Downloading pytest_rerunfailures-14.0-py3-none-any.whl.metadata (18 kB) Collecting ansible==4.4.0 (from -r /mtc-e2e-qev2/requirements.txt (line 3)) Downloading ansible-4.4.0.tar.gz (35.4 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 35.4/35.4 MB 54.2 MB/s eta 0:00:00 Installing build dependencies: started Installing build dependencies: finished with status 'done' Getting requirements to build wheel: started Getting requirements to build wheel: finished with status 'done' Preparing metadata (pyproject.toml): started Preparing metadata (pyproject.toml): finished with status 'done' Collecting ansible-runner (from -r /mtc-e2e-qev2/requirements.txt (line 4)) Downloading ansible_runner-2.4.0-py3-none-any.whl.metadata (3.5 kB) Collecting jmespath (from -r /mtc-e2e-qev2/requirements.txt (line 5)) Downloading jmespath-1.0.1-py3-none-any.whl.metadata (7.6 kB) Collecting requests (from -r /mtc-e2e-qev2/requirements.txt (line 6)) Downloading requests-2.32.3-py3-none-any.whl.metadata (4.6 kB) Collecting pre-commit (from -r /mtc-e2e-qev2/requirements.txt (line 7)) Downloading pre_commit-4.0.1-py2.py3-none-any.whl.metadata (1.3 kB) Collecting ansible-core<2.12,>=2.11.3 (from ansible==4.4.0->-r /mtc-e2e-qev2/requirements.txt (line 3)) Downloading ansible-core-2.11.12.tar.gz (7.1 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.1/7.1 MB 117.6 MB/s eta 0:00:00 Installing build dependencies: started Installing build dependencies: finished with status 'done' Getting requirements to build wheel: started Getting requirements to build wheel: finished with status 'done' Preparing metadata (pyproject.toml): started Preparing metadata (pyproject.toml): finished with status 'done' Collecting iniconfig (from pytest->-r /mtc-e2e-qev2/requirements.txt (line 1)) Downloading iniconfig-2.0.0-py3-none-any.whl.metadata (2.6 kB) Collecting packaging (from pytest->-r /mtc-e2e-qev2/requirements.txt (line 1)) Downloading packaging-24.1-py3-none-any.whl.metadata (3.2 kB) Collecting pluggy<2,>=1.5 (from pytest->-r /mtc-e2e-qev2/requirements.txt (line 1)) Downloading pluggy-1.5.0-py3-none-any.whl.metadata (4.8 kB) Collecting pexpect>=4.5 (from ansible-runner->-r /mtc-e2e-qev2/requirements.txt (line 4)) Downloading pexpect-4.9.0-py2.py3-none-any.whl.metadata (2.5 kB) Collecting python-daemon (from ansible-runner->-r /mtc-e2e-qev2/requirements.txt (line 4)) Downloading python_daemon-3.0.1-py3-none-any.whl.metadata (2.2 kB) Collecting pyyaml (from ansible-runner->-r /mtc-e2e-qev2/requirements.txt (line 4)) Downloading PyYAML-6.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (2.1 kB) Collecting charset-normalizer<4,>=2 (from requests->-r /mtc-e2e-qev2/requirements.txt (line 6)) Downloading charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (34 kB) Collecting idna<4,>=2.5 (from requests->-r /mtc-e2e-qev2/requirements.txt (line 6)) Downloading idna-3.10-py3-none-any.whl.metadata (10 kB) Collecting urllib3<3,>=1.21.1 (from requests->-r /mtc-e2e-qev2/requirements.txt (line 6)) Downloading urllib3-2.2.3-py3-none-any.whl.metadata (6.5 kB) Collecting certifi>=2017.4.17 (from requests->-r /mtc-e2e-qev2/requirements.txt (line 6)) Downloading certifi-2024.8.30-py3-none-any.whl.metadata (2.2 kB) Collecting cfgv>=2.0.0 (from pre-commit->-r /mtc-e2e-qev2/requirements.txt (line 7)) Downloading cfgv-3.4.0-py2.py3-none-any.whl.metadata (8.5 kB) Collecting identify>=1.0.0 (from pre-commit->-r /mtc-e2e-qev2/requirements.txt (line 7)) Downloading identify-2.6.1-py2.py3-none-any.whl.metadata (4.4 kB) Collecting nodeenv>=0.11.1 (from pre-commit->-r /mtc-e2e-qev2/requirements.txt (line 7)) Downloading nodeenv-1.9.1-py2.py3-none-any.whl.metadata (21 kB) Collecting virtualenv>=20.10.0 (from pre-commit->-r /mtc-e2e-qev2/requirements.txt (line 7)) Downloading virtualenv-20.26.6-py3-none-any.whl.metadata (4.5 kB) Collecting jinja2 (from ansible-core<2.12,>=2.11.3->ansible==4.4.0->-r /mtc-e2e-qev2/requirements.txt (line 3)) Downloading jinja2-3.1.4-py3-none-any.whl.metadata (2.6 kB) Collecting cryptography (from ansible-core<2.12,>=2.11.3->ansible==4.4.0->-r /mtc-e2e-qev2/requirements.txt (line 3)) Downloading cryptography-43.0.1-cp39-abi3-manylinux_2_28_x86_64.whl.metadata (5.4 kB) Collecting resolvelib<0.6.0,>=0.5.3 (from ansible-core<2.12,>=2.11.3->ansible==4.4.0->-r /mtc-e2e-qev2/requirements.txt (line 3)) Downloading resolvelib-0.5.4-py2.py3-none-any.whl.metadata (3.7 kB) Collecting ptyprocess>=0.5 (from pexpect>=4.5->ansible-runner->-r /mtc-e2e-qev2/requirements.txt (line 4)) Downloading ptyprocess-0.7.0-py2.py3-none-any.whl.metadata (1.3 kB) Collecting distlib<1,>=0.3.7 (from virtualenv>=20.10.0->pre-commit->-r /mtc-e2e-qev2/requirements.txt (line 7)) Downloading distlib-0.3.9-py2.py3-none-any.whl.metadata (5.2 kB) Collecting filelock<4,>=3.12.2 (from virtualenv>=20.10.0->pre-commit->-r /mtc-e2e-qev2/requirements.txt (line 7)) Downloading filelock-3.16.1-py3-none-any.whl.metadata (2.9 kB) Collecting platformdirs<5,>=3.9.1 (from virtualenv>=20.10.0->pre-commit->-r /mtc-e2e-qev2/requirements.txt (line 7)) Downloading platformdirs-4.3.6-py3-none-any.whl.metadata (11 kB) Collecting docutils (from python-daemon->ansible-runner->-r /mtc-e2e-qev2/requirements.txt (line 4)) Downloading docutils-0.21.2-py3-none-any.whl.metadata (2.8 kB) Collecting lockfile>=0.10 (from python-daemon->ansible-runner->-r /mtc-e2e-qev2/requirements.txt (line 4)) Downloading lockfile-0.12.2-py2.py3-none-any.whl.metadata (2.4 kB) Collecting setuptools>=62.4.0 (from python-daemon->ansible-runner->-r /mtc-e2e-qev2/requirements.txt (line 4)) Using cached setuptools-75.1.0-py3-none-any.whl.metadata (6.9 kB) Collecting cffi>=1.12 (from cryptography->ansible-core<2.12,>=2.11.3->ansible==4.4.0->-r /mtc-e2e-qev2/requirements.txt (line 3)) Downloading cffi-1.17.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (1.5 kB) Collecting MarkupSafe>=2.0 (from jinja2->ansible-core<2.12,>=2.11.3->ansible==4.4.0->-r /mtc-e2e-qev2/requirements.txt (line 3)) Downloading MarkupSafe-3.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (4.0 kB) Collecting pycparser (from cffi>=1.12->cryptography->ansible-core<2.12,>=2.11.3->ansible==4.4.0->-r /mtc-e2e-qev2/requirements.txt (line 3)) Downloading pycparser-2.22-py3-none-any.whl.metadata (943 bytes) Downloading pytest-8.3.3-py3-none-any.whl (342 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 342.3/342.3 kB 26.0 MB/s eta 0:00:00 Downloading pytest_rerunfailures-14.0-py3-none-any.whl (12 kB) Downloading ansible_runner-2.4.0-py3-none-any.whl (79 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 79.7/79.7 kB 7.1 MB/s eta 0:00:00 Downloading jmespath-1.0.1-py3-none-any.whl (20 kB) Downloading requests-2.32.3-py3-none-any.whl (64 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 64.9/64.9 kB 10.2 MB/s eta 0:00:00 Downloading pre_commit-4.0.1-py2.py3-none-any.whl (218 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 218.7/218.7 kB 33.6 MB/s eta 0:00:00 Downloading certifi-2024.8.30-py3-none-any.whl (167 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 167.3/167.3 kB 28.4 MB/s eta 0:00:00 Downloading cfgv-3.4.0-py2.py3-none-any.whl (7.2 kB) Downloading charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (142 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 142.6/142.6 kB 26.8 MB/s eta 0:00:00 Downloading identify-2.6.1-py2.py3-none-any.whl (98 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 99.0/99.0 kB 15.6 MB/s eta 0:00:00 Downloading idna-3.10-py3-none-any.whl (70 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 70.4/70.4 kB 12.1 MB/s eta 0:00:00 Downloading nodeenv-1.9.1-py2.py3-none-any.whl (22 kB) Downloading packaging-24.1-py3-none-any.whl (53 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 54.0/54.0 kB 9.3 MB/s eta 0:00:00 Downloading pexpect-4.9.0-py2.py3-none-any.whl (63 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 63.8/63.8 kB 11.8 MB/s eta 0:00:00 Downloading pluggy-1.5.0-py3-none-any.whl (20 kB) Downloading PyYAML-6.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (762 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 763.0/763.0 kB 67.8 MB/s eta 0:00:00 Downloading urllib3-2.2.3-py3-none-any.whl (126 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 126.3/126.3 kB 22.7 MB/s eta 0:00:00 Downloading virtualenv-20.26.6-py3-none-any.whl (6.0 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.0/6.0 MB 114.2 MB/s eta 0:00:00 Downloading iniconfig-2.0.0-py3-none-any.whl (5.9 kB) Downloading python_daemon-3.0.1-py3-none-any.whl (31 kB) Downloading distlib-0.3.9-py2.py3-none-any.whl (468 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 469.0/469.0 kB 50.5 MB/s eta 0:00:00 Downloading filelock-3.16.1-py3-none-any.whl (16 kB) Downloading lockfile-0.12.2-py2.py3-none-any.whl (13 kB) Downloading platformdirs-4.3.6-py3-none-any.whl (18 kB) Downloading ptyprocess-0.7.0-py2.py3-none-any.whl (13 kB) Downloading resolvelib-0.5.4-py2.py3-none-any.whl (12 kB) Using cached setuptools-75.1.0-py3-none-any.whl (1.2 MB) Downloading cryptography-43.0.1-cp39-abi3-manylinux_2_28_x86_64.whl (4.0 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.0/4.0 MB 106.0 MB/s eta 0:00:00 Downloading docutils-0.21.2-py3-none-any.whl (587 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 587.4/587.4 kB 59.9 MB/s eta 0:00:00 Downloading jinja2-3.1.4-py3-none-any.whl (133 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 133.3/133.3 kB 21.8 MB/s eta 0:00:00 Downloading cffi-1.17.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (467 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 467.2/467.2 kB 54.9 MB/s eta 0:00:00 Downloading MarkupSafe-3.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (23 kB) Downloading pycparser-2.22-py3-none-any.whl (117 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 117.6/117.6 kB 22.9 MB/s eta 0:00:00 Building wheels for collected packages: ansible, ansible-core Building wheel for ansible (pyproject.toml): started Building wheel for ansible (pyproject.toml): finished with status 'done' Created wheel for ansible: filename=ansible-4.4.0-py3-none-any.whl size=58221785 sha256=2d792765624be0fcbbfa33c883ec6a841f8c97935462eca4edaaf03bd29d67be Stored in directory: /alabama/.cache/pip/wheels/a9/4b/4c/a8a1d660e94dd77f527528cb79fb998e7fecd5caf8366e1e0d Building wheel for ansible-core (pyproject.toml): started Building wheel for ansible-core (pyproject.toml): finished with status 'done' Created wheel for ansible-core: filename=ansible_core-2.11.12-py3-none-any.whl size=1960955 sha256=c7d78a1a1ad2aa599cd339b6d418a20deadaeb53944aea44bded82e7271e04f5 Stored in directory: /alabama/.cache/pip/wheels/3d/3e/04/62bf38af3a3bb2162e12579c66440d1800e11e1f42572ff9d0 Successfully built ansible ansible-core Installing collected packages: resolvelib, ptyprocess, lockfile, distlib, urllib3, setuptools, pyyaml, pycparser, pluggy, platformdirs, pexpect, packaging, nodeenv, MarkupSafe, jmespath, iniconfig, idna, identify, filelock, docutils, charset-normalizer, cfgv, certifi, virtualenv, requests, python-daemon, pytest, jinja2, cffi, pytest-rerunfailures, pre-commit, cryptography, ansible-runner, ansible-core, ansible Successfully installed MarkupSafe-3.0.1 ansible-4.4.0 ansible-core-2.11.12 ansible-runner-2.4.0 certifi-2024.8.30 cffi-1.17.1 cfgv-3.4.0 charset-normalizer-3.4.0 cryptography-43.0.1 distlib-0.3.9 docutils-0.21.2 filelock-3.16.1 identify-2.6.1 idna-3.10 iniconfig-2.0.0 jinja2-3.1.4 jmespath-1.0.1 lockfile-0.12.2 nodeenv-1.9.1 packaging-24.1 pexpect-4.9.0 platformdirs-4.3.6 pluggy-1.5.0 pre-commit-4.0.1 ptyprocess-0.7.0 pycparser-2.22 pytest-8.3.3 pytest-rerunfailures-14.0 python-daemon-3.0.1 pyyaml-6.0.2 requests-2.32.3 resolvelib-0.5.4 setuptools-65.5.0 urllib3-2.2.3 virtualenv-20.26.6 [notice] A new release of pip is available: 24.0 -> 24.2 [notice] To update, run: pip install --upgrade pip Processing /mtc-apps-deployer Installing build dependencies: started Installing build dependencies: finished with status 'done' Getting requirements to build wheel: started Getting requirements to build wheel: finished with status 'done' Preparing metadata (pyproject.toml): started Preparing metadata (pyproject.toml): finished with status 'done' Building wheels for collected packages: ocpdeployer Building wheel for ocpdeployer (pyproject.toml): started Building wheel for ocpdeployer (pyproject.toml): finished with status 'done' Created wheel for ocpdeployer: filename=ocpdeployer-0.0.1-py2.py3-none-any.whl size=87482 sha256=2f65ac01435e8b2b41921400aed070d8243915a255aadc358a38aed8c1abb095 Stored in directory: /alabama/.cache/pip/wheels/a5/d5/1e/0e1b7c5d0565ce18da090e556f5635431975eb81d49e457e4e Successfully built ocpdeployer Installing collected packages: ocpdeployer Successfully installed ocpdeployer-0.0.1 [notice] A new release of pip is available: 24.0 -> 24.2 [notice] To update, run: pip install --upgrade pip Processing /mtc-python-client Installing build dependencies: started Installing build dependencies: finished with status 'done' Getting requirements to build wheel: started Getting requirements to build wheel: finished with status 'done' Preparing metadata (pyproject.toml): started Preparing metadata (pyproject.toml): finished with status 'done' Collecting suds-py3 (from mtc==0.0.1) Downloading suds_py3-1.4.5.0-py3-none-any.whl.metadata (778 bytes) Requirement already satisfied: requests in /mtc-e2e-qev2/venv/lib/python3.11/site-packages (from mtc==0.0.1) (2.32.3) Requirement already satisfied: jinja2 in /mtc-e2e-qev2/venv/lib/python3.11/site-packages (from mtc==0.0.1) (3.1.4) Collecting kubernetes==11.0.0 (from mtc==0.0.1) Downloading kubernetes-11.0.0-py3-none-any.whl.metadata (1.5 kB) Collecting openshift==0.11.2 (from mtc==0.0.1) Downloading openshift-0.11.2.tar.gz (19 kB) Installing build dependencies: started Installing build dependencies: finished with status 'done' Getting requirements to build wheel: started Getting requirements to build wheel: finished with status 'done' Preparing metadata (pyproject.toml): started Preparing metadata (pyproject.toml): finished with status 'done' Requirement already satisfied: certifi>=14.05.14 in /mtc-e2e-qev2/venv/lib/python3.11/site-packages (from kubernetes==11.0.0->mtc==0.0.1) (2024.8.30) Collecting six>=1.9.0 (from kubernetes==11.0.0->mtc==0.0.1) Downloading six-1.16.0-py2.py3-none-any.whl.metadata (1.8 kB) Collecting python-dateutil>=2.5.3 (from kubernetes==11.0.0->mtc==0.0.1) Downloading python_dateutil-2.9.0.post0-py2.py3-none-any.whl.metadata (8.4 kB) Requirement already satisfied: setuptools>=21.0.0 in /mtc-e2e-qev2/venv/lib/python3.11/site-packages (from kubernetes==11.0.0->mtc==0.0.1) (65.5.0) Requirement already satisfied: pyyaml>=3.12 in /mtc-e2e-qev2/venv/lib/python3.11/site-packages (from kubernetes==11.0.0->mtc==0.0.1) (6.0.2) Collecting google-auth>=1.0.1 (from kubernetes==11.0.0->mtc==0.0.1) Downloading google_auth-2.35.0-py2.py3-none-any.whl.metadata (4.7 kB) Collecting websocket-client!=0.40.0,!=0.41.*,!=0.42.*,>=0.32.0 (from kubernetes==11.0.0->mtc==0.0.1) Downloading websocket_client-1.8.0-py3-none-any.whl.metadata (8.0 kB) Collecting requests-oauthlib (from kubernetes==11.0.0->mtc==0.0.1) Downloading requests_oauthlib-2.0.0-py2.py3-none-any.whl.metadata (11 kB) Requirement already satisfied: urllib3>=1.24.2 in /mtc-e2e-qev2/venv/lib/python3.11/site-packages (from kubernetes==11.0.0->mtc==0.0.1) (2.2.3) Collecting python-string-utils (from openshift==0.11.2->mtc==0.0.1) Downloading python_string_utils-1.0.0-py3-none-any.whl.metadata (12 kB) Collecting ruamel.yaml>=0.15 (from openshift==0.11.2->mtc==0.0.1) Downloading ruamel.yaml-0.18.6-py3-none-any.whl.metadata (23 kB) Requirement already satisfied: MarkupSafe>=2.0 in /mtc-e2e-qev2/venv/lib/python3.11/site-packages (from jinja2->mtc==0.0.1) (3.0.1) Requirement already satisfied: charset-normalizer<4,>=2 in /mtc-e2e-qev2/venv/lib/python3.11/site-packages (from requests->mtc==0.0.1) (3.4.0) Requirement already satisfied: idna<4,>=2.5 in /mtc-e2e-qev2/venv/lib/python3.11/site-packages (from requests->mtc==0.0.1) (3.10) Collecting cachetools<6.0,>=2.0.0 (from google-auth>=1.0.1->kubernetes==11.0.0->mtc==0.0.1) Downloading cachetools-5.5.0-py3-none-any.whl.metadata (5.3 kB) Collecting pyasn1-modules>=0.2.1 (from google-auth>=1.0.1->kubernetes==11.0.0->mtc==0.0.1) Downloading pyasn1_modules-0.4.1-py3-none-any.whl.metadata (3.5 kB) Collecting rsa<5,>=3.1.4 (from google-auth>=1.0.1->kubernetes==11.0.0->mtc==0.0.1) Downloading rsa-4.9-py3-none-any.whl.metadata (4.2 kB) Collecting ruamel.yaml.clib>=0.2.7 (from ruamel.yaml>=0.15->openshift==0.11.2->mtc==0.0.1) Downloading ruamel.yaml.clib-0.2.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl.metadata (2.2 kB) Collecting oauthlib>=3.0.0 (from requests-oauthlib->kubernetes==11.0.0->mtc==0.0.1) Downloading oauthlib-3.2.2-py3-none-any.whl.metadata (7.5 kB) Collecting pyasn1<0.7.0,>=0.4.6 (from pyasn1-modules>=0.2.1->google-auth>=1.0.1->kubernetes==11.0.0->mtc==0.0.1) Downloading pyasn1-0.6.1-py3-none-any.whl.metadata (8.4 kB) Downloading kubernetes-11.0.0-py3-none-any.whl (1.5 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.5/1.5 MB 43.7 MB/s eta 0:00:00 Downloading suds_py3-1.4.5.0-py3-none-any.whl (298 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 298.8/298.8 kB 6.7 MB/s eta 0:00:00 Downloading google_auth-2.35.0-py2.py3-none-any.whl (208 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 209.0/209.0 kB 6.8 MB/s eta 0:00:00 Downloading python_dateutil-2.9.0.post0-py2.py3-none-any.whl (229 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 229.9/229.9 kB 6.9 MB/s eta 0:00:00 Downloading ruamel.yaml-0.18.6-py3-none-any.whl (117 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 117.8/117.8 kB 8.7 MB/s eta 0:00:00 Downloading six-1.16.0-py2.py3-none-any.whl (11 kB) Downloading websocket_client-1.8.0-py3-none-any.whl (58 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 58.8/58.8 kB 7.7 MB/s eta 0:00:00 Downloading python_string_utils-1.0.0-py3-none-any.whl (26 kB) Downloading requests_oauthlib-2.0.0-py2.py3-none-any.whl (24 kB) Downloading cachetools-5.5.0-py3-none-any.whl (9.5 kB) Downloading oauthlib-3.2.2-py3-none-any.whl (151 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 151.7/151.7 kB 15.4 MB/s eta 0:00:00 Downloading pyasn1_modules-0.4.1-py3-none-any.whl (181 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 181.5/181.5 kB 15.1 MB/s eta 0:00:00 Downloading rsa-4.9-py3-none-any.whl (34 kB) Downloading ruamel.yaml.clib-0.2.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (544 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 544.0/544.0 kB 21.0 MB/s eta 0:00:00 Downloading pyasn1-0.6.1-py3-none-any.whl (83 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 83.1/83.1 kB 3.6 MB/s eta 0:00:00 Building wheels for collected packages: mtc, openshift Building wheel for mtc (pyproject.toml): started Building wheel for mtc (pyproject.toml): finished with status 'done' Created wheel for mtc: filename=mtc-0.0.1-py3-none-any.whl size=31168 sha256=7277d129920f72ca3ca1e6750e0ad60ac3129a395808f71d6f2d9fdefae5f4dd Stored in directory: /alabama/.cache/pip/wheels/e1/98/5c/be40f505fcb26ada945b520c235f77481ebe8ad452170000f0 Building wheel for openshift (pyproject.toml): started Building wheel for openshift (pyproject.toml): finished with status 'done' Created wheel for openshift: filename=openshift-0.11.2-py3-none-any.whl size=19905 sha256=66958b598561e635bb73c714cbb3ab607e02ec87929f83f46fcf0a187682e1aa Stored in directory: /alabama/.cache/pip/wheels/56/d5/ca/4237e0b01d25fb1a13f79aaaacf9958447f6dbe824a39cc089 Successfully built mtc openshift Installing collected packages: suds-py3, websocket-client, six, ruamel.yaml.clib, python-string-utils, pyasn1, oauthlib, cachetools, ruamel.yaml, rsa, requests-oauthlib, python-dateutil, pyasn1-modules, google-auth, kubernetes, openshift, mtc Successfully installed cachetools-5.5.0 google-auth-2.35.0 kubernetes-11.0.0 mtc-0.0.1 oauthlib-3.2.2 openshift-0.11.2 pyasn1-0.6.1 pyasn1-modules-0.4.1 python-dateutil-2.9.0.post0 python-string-utils-1.0.0 requests-oauthlib-2.0.0 rsa-4.9 ruamel.yaml-0.18.6 ruamel.yaml.clib-0.2.8 six-1.16.0 suds-py3-1.4.5.0 websocket-client-1.8.0 [notice] A new release of pip is available: 24.0 -> 24.2 [notice] To update, run: pip install --upgrade pip Logging into target cluster. Login successful. You have access to 72 projects, the list has been suppressed. You can list all projects with 'oc projects' Using project "default". clusterrole.rbac.authorization.k8s.io/cluster-admin added: "migration-controller" Executing tests. ============================= test session starts ============================== platform linux -- Python 3.11.10, pytest-8.3.3, pluggy-1.5.0 rootdir: /mtc-e2e-qev2 configfile: pytest.ini plugins: rerunfailures-14.0 collected 6 items mtc-e2e-qev2/mtc_tests/tests/test_interop.py::test_mtc_87_interop ERROR ------------------------------ live log logreport ------------------------------ 03:49:23.104 - INFO: self = args = ('GET', '/apis'), kwargs = {}, serialize_response = True serializer = def inner(self, *args, **kwargs): serialize_response = kwargs.pop('serialize', True) serializer = kwargs.pop('serializer', ResourceInstance) try: > resp = func(self, *args, **kwargs) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py:42: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py:235: in request return self.client.call_api( mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py:340: in call_api return self.__call_api(resource_path, method, mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py:172: in __call_api response_data = self.request( mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py:362: in request return self.rest_client.GET(url, mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/rest.py:237: in GET return self.request("GET", url, _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = method = 'GET' url = 'https://api.mtc-source-cro4.cspilp.interop.ccitredhat.com:6443/apis' query_params = [] headers = {'Accept': 'application/json', 'Content-Type': 'application/json', 'User-Agent': 'OpenAPI-Generator/11.0.0/python', 'authorization': 'Bearer '} body = None, post_params = {}, _preload_content = False, _request_timeout = None def request(self, method, url, query_params=None, headers=None, body=None, post_params=None, _preload_content=True, _request_timeout=None): """Perform requests. :param method: http request method :param url: http request url :param query_params: query parameters in the url :param headers: http request headers :param body: request json body, for `application/json` :param post_params: request post parameters, `application/x-www-form-urlencoded` and `multipart/form-data` :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. """ method = method.upper() assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', 'PATCH', 'OPTIONS'] if post_params and body: raise ValueError( "body parameter cannot be used with post_params parameter." ) post_params = post_params or {} headers = headers or {} timeout = None if _request_timeout: if isinstance(_request_timeout, (int, ) if six.PY3 else (int, long)): # noqa: E501,F821 timeout = urllib3.Timeout(total=_request_timeout) elif (isinstance(_request_timeout, tuple) and len(_request_timeout) == 2): timeout = urllib3.Timeout( connect=_request_timeout[0], read=_request_timeout[1]) if 'Content-Type' not in headers: headers['Content-Type'] = 'application/json' try: # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: if query_params: url += '?' + urlencode(query_params) if re.search('json', headers['Content-Type'], re.IGNORECASE): if headers['Content-Type'] == 'application/json-patch+json': if not isinstance(body, list): headers['Content-Type'] = \ 'application/strategic-merge-patch+json' request_body = None if body is not None: request_body = json.dumps(body) r = self.pool_manager.request( method, url, body=request_body, preload_content=_preload_content, timeout=timeout, headers=headers) elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 r = self.pool_manager.request( method, url, fields=post_params, encode_multipart=False, preload_content=_preload_content, timeout=timeout, headers=headers) elif headers['Content-Type'] == 'multipart/form-data': # must del headers['Content-Type'], or the correct # Content-Type which generated by urllib3 will be # overwritten. del headers['Content-Type'] r = self.pool_manager.request( method, url, fields=post_params, encode_multipart=True, preload_content=_preload_content, timeout=timeout, headers=headers) # Pass a `string` parameter directly in the body to support # other content types than Json when `body` argument is # provided in serialized form elif isinstance(body, str): request_body = body r = self.pool_manager.request( method, url, body=request_body, preload_content=_preload_content, timeout=timeout, headers=headers) else: # Cannot generate the request from given parameters msg = """Cannot prepare a request message for provided arguments. Please check that your arguments match declared content type.""" raise ApiException(status=0, reason=msg) # For `GET`, `HEAD` else: r = self.pool_manager.request(method, url, fields=query_params, preload_content=_preload_content, timeout=timeout, headers=headers) except urllib3.exceptions.SSLError as e: msg = "{0}\n{1}".format(type(e).__name__, str(e)) raise ApiException(status=0, reason=msg) if _preload_content: r = RESTResponse(r) # In the python 3, the response.data is bytes. # we need to decode it to string. if six.PY3: r.data = r.data.decode('utf8') # log response body logger.debug("response body: %s", r.data) if not 200 <= r.status <= 299: > raise ApiException(http_resp=r) E kubernetes.client.rest.ApiException: (403) E Reason: Forbidden E HTTP response headers: HTTPHeaderDict({'Audit-Id': 'ef2dc559-4847-4160-b34b-2bd8e86eae3b', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains; preload', 'X-Content-Type-Options': 'nosniff', 'X-Kubernetes-Pf-Flowschema-Uid': 'a538c251-7c72-4f62-a4d9-bb550595341f', 'X-Kubernetes-Pf-Prioritylevel-Uid': '36f43f03-b585-4e6c-b971-978beb3d6968', 'Date': 'Mon, 14 Oct 2024 03:49:22 GMT', 'Content-Length': '189'}) E HTTP response body: b'{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"forbidden: User \\"system:anonymous\\" cannot get path \\"/apis\\"","reason":"Forbidden","details":{},"code":403}\n' mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/rest.py:231: ApiException During handling of the above exception, another exception occurred: mtc = pytestconfig = <_pytest.config.Config object at 0x7fc01af64910> request = > @pytest.fixture def src_cluster(mtc, pytestconfig, request): '''This fixture returns always and OpenshiftCluster object connected to the source cluster ''' controller_is_source = pytestconfig.getoption('--controller-is-source') if controller_is_source: src = mtc.get_local_clusters()[0] else: > src = mtc.get_remote_clusters()[0] mtc-e2e-qev2/mtc_tests/fixtures/clusters.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ mtc-e2e-qev2/venv/lib/python3.11/site-packages/mtc/client.py:137: in get_remote_clusters remote_clusters.append(self.get_cluster_by_migcluster(mc, as_helper, as_user_pass)) mtc-e2e-qev2/venv/lib/python3.11/site-packages/mtc/client.py:173: in get_cluster_by_migcluster return self.get_cluster_as_helper_by_migcluster(migcluster) mtc-e2e-qev2/venv/lib/python3.11/site-packages/mtc/client.py:231: in get_cluster_as_helper_by_migcluster default_openshift_cluster = self.get_cluster_as_default_by_migcluster(migcluster) mtc-e2e-qev2/venv/lib/python3.11/site-packages/mtc/client.py:273: in get_cluster_as_default_by_migcluster openshift_cluster.connect_with_token(host, api_key) mtc-e2e-qev2/venv/lib/python3.11/site-packages/mtc/openshift.py:81: in connect_with_token self.client = DynamicClient(kubernetes.client.ApiClient(configuration)) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py:71: in __init__ self.__discoverer = discoverer(self, cache_file) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/discovery.py:259: in __init__ Discoverer.__init__(self, client, cache_file) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/discovery.py:31: in __init__ self.__init_cache() mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/discovery.py:79: in __init_cache self.discover() mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/discovery.py:263: in discover self.__resources = self.parse_api_groups(request_resources=False) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/discovery.py:131: in parse_api_groups groups_response = self.client.request('GET', '/{}'.format(DISCOVERY_PREFIX)).groups _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = args = ('GET', '/apis'), kwargs = {}, serialize_response = True serializer = def inner(self, *args, **kwargs): serialize_response = kwargs.pop('serialize', True) serializer = kwargs.pop('serializer', ResourceInstance) try: resp = func(self, *args, **kwargs) except ApiException as e: > raise api_exception(e) E openshift.dynamic.exceptions.ForbiddenError: 403 E Reason: Forbidden E HTTP response headers: HTTPHeaderDict({'Audit-Id': 'ef2dc559-4847-4160-b34b-2bd8e86eae3b', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains; preload', 'X-Content-Type-Options': 'nosniff', 'X-Kubernetes-Pf-Flowschema-Uid': 'a538c251-7c72-4f62-a4d9-bb550595341f', 'X-Kubernetes-Pf-Prioritylevel-Uid': '36f43f03-b585-4e6c-b971-978beb3d6968', 'Date': 'Mon, 14 Oct 2024 03:49:22 GMT', 'Content-Length': '189'}) E HTTP response body: b'{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"forbidden: User \\"system:anonymous\\" cannot get path \\"/apis\\"","reason":"Forbidden","details":{},"code":403}\n' E Original traceback: E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py", line 42, in inner E resp = func(self, *args, **kwargs) E ^^^^^^^^^^^^^^^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py", line 235, in request E return self.client.call_api( E ^^^^^^^^^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py", line 340, in call_api E return self.__call_api(resource_path, method, E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py", line 172, in __call_api E response_data = self.request( E ^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py", line 362, in request E return self.rest_client.GET(url, E ^^^^^^^^^^^^^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/rest.py", line 237, in GET E return self.request("GET", url, E ^^^^^^^^^^^^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/rest.py", line 231, in request E raise ApiException(http_resp=r) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py:44: ForbiddenError ------------------------------ live log logreport ------------------------------ 03:49:23.104 - INFO: mtc-e2e-qev2/mtc_tests/tests/test_interop.py::test_mtc_98_interop ERROR ------------------------------ live log logreport ------------------------------ 03:49:23.413 - INFO: self = args = ('GET', '/apis'), kwargs = {}, serialize_response = True serializer = def inner(self, *args, **kwargs): serialize_response = kwargs.pop('serialize', True) serializer = kwargs.pop('serializer', ResourceInstance) try: > resp = func(self, *args, **kwargs) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py:42: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py:235: in request return self.client.call_api( mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py:340: in call_api return self.__call_api(resource_path, method, mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py:172: in __call_api response_data = self.request( mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py:362: in request return self.rest_client.GET(url, mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/rest.py:237: in GET return self.request("GET", url, _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = method = 'GET' url = 'https://api.mtc-source-cro4.cspilp.interop.ccitredhat.com:6443/apis' query_params = [] headers = {'Accept': 'application/json', 'Content-Type': 'application/json', 'User-Agent': 'OpenAPI-Generator/11.0.0/python', 'authorization': 'Bearer '} body = None, post_params = {}, _preload_content = False, _request_timeout = None def request(self, method, url, query_params=None, headers=None, body=None, post_params=None, _preload_content=True, _request_timeout=None): """Perform requests. :param method: http request method :param url: http request url :param query_params: query parameters in the url :param headers: http request headers :param body: request json body, for `application/json` :param post_params: request post parameters, `application/x-www-form-urlencoded` and `multipart/form-data` :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. """ method = method.upper() assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', 'PATCH', 'OPTIONS'] if post_params and body: raise ValueError( "body parameter cannot be used with post_params parameter." ) post_params = post_params or {} headers = headers or {} timeout = None if _request_timeout: if isinstance(_request_timeout, (int, ) if six.PY3 else (int, long)): # noqa: E501,F821 timeout = urllib3.Timeout(total=_request_timeout) elif (isinstance(_request_timeout, tuple) and len(_request_timeout) == 2): timeout = urllib3.Timeout( connect=_request_timeout[0], read=_request_timeout[1]) if 'Content-Type' not in headers: headers['Content-Type'] = 'application/json' try: # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: if query_params: url += '?' + urlencode(query_params) if re.search('json', headers['Content-Type'], re.IGNORECASE): if headers['Content-Type'] == 'application/json-patch+json': if not isinstance(body, list): headers['Content-Type'] = \ 'application/strategic-merge-patch+json' request_body = None if body is not None: request_body = json.dumps(body) r = self.pool_manager.request( method, url, body=request_body, preload_content=_preload_content, timeout=timeout, headers=headers) elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 r = self.pool_manager.request( method, url, fields=post_params, encode_multipart=False, preload_content=_preload_content, timeout=timeout, headers=headers) elif headers['Content-Type'] == 'multipart/form-data': # must del headers['Content-Type'], or the correct # Content-Type which generated by urllib3 will be # overwritten. del headers['Content-Type'] r = self.pool_manager.request( method, url, fields=post_params, encode_multipart=True, preload_content=_preload_content, timeout=timeout, headers=headers) # Pass a `string` parameter directly in the body to support # other content types than Json when `body` argument is # provided in serialized form elif isinstance(body, str): request_body = body r = self.pool_manager.request( method, url, body=request_body, preload_content=_preload_content, timeout=timeout, headers=headers) else: # Cannot generate the request from given parameters msg = """Cannot prepare a request message for provided arguments. Please check that your arguments match declared content type.""" raise ApiException(status=0, reason=msg) # For `GET`, `HEAD` else: r = self.pool_manager.request(method, url, fields=query_params, preload_content=_preload_content, timeout=timeout, headers=headers) except urllib3.exceptions.SSLError as e: msg = "{0}\n{1}".format(type(e).__name__, str(e)) raise ApiException(status=0, reason=msg) if _preload_content: r = RESTResponse(r) # In the python 3, the response.data is bytes. # we need to decode it to string. if six.PY3: r.data = r.data.decode('utf8') # log response body logger.debug("response body: %s", r.data) if not 200 <= r.status <= 299: > raise ApiException(http_resp=r) E kubernetes.client.rest.ApiException: (403) E Reason: Forbidden E HTTP response headers: HTTPHeaderDict({'Audit-Id': 'b0619406-0dbe-40b8-9bd5-13b8636ef873', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains; preload', 'X-Content-Type-Options': 'nosniff', 'X-Kubernetes-Pf-Flowschema-Uid': 'a538c251-7c72-4f62-a4d9-bb550595341f', 'X-Kubernetes-Pf-Prioritylevel-Uid': '36f43f03-b585-4e6c-b971-978beb3d6968', 'Date': 'Mon, 14 Oct 2024 03:49:23 GMT', 'Content-Length': '189'}) E HTTP response body: b'{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"forbidden: User \\"system:anonymous\\" cannot get path \\"/apis\\"","reason":"Forbidden","details":{},"code":403}\n' mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/rest.py:231: ApiException During handling of the above exception, another exception occurred: mtc = pytestconfig = <_pytest.config.Config object at 0x7fc01af64910> request = > @pytest.fixture def src_cluster(mtc, pytestconfig, request): '''This fixture returns always and OpenshiftCluster object connected to the source cluster ''' controller_is_source = pytestconfig.getoption('--controller-is-source') if controller_is_source: src = mtc.get_local_clusters()[0] else: > src = mtc.get_remote_clusters()[0] mtc-e2e-qev2/mtc_tests/fixtures/clusters.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ mtc-e2e-qev2/venv/lib/python3.11/site-packages/mtc/client.py:137: in get_remote_clusters remote_clusters.append(self.get_cluster_by_migcluster(mc, as_helper, as_user_pass)) mtc-e2e-qev2/venv/lib/python3.11/site-packages/mtc/client.py:173: in get_cluster_by_migcluster return self.get_cluster_as_helper_by_migcluster(migcluster) mtc-e2e-qev2/venv/lib/python3.11/site-packages/mtc/client.py:231: in get_cluster_as_helper_by_migcluster default_openshift_cluster = self.get_cluster_as_default_by_migcluster(migcluster) mtc-e2e-qev2/venv/lib/python3.11/site-packages/mtc/client.py:273: in get_cluster_as_default_by_migcluster openshift_cluster.connect_with_token(host, api_key) mtc-e2e-qev2/venv/lib/python3.11/site-packages/mtc/openshift.py:81: in connect_with_token self.client = DynamicClient(kubernetes.client.ApiClient(configuration)) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py:71: in __init__ self.__discoverer = discoverer(self, cache_file) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/discovery.py:259: in __init__ Discoverer.__init__(self, client, cache_file) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/discovery.py:31: in __init__ self.__init_cache() mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/discovery.py:79: in __init_cache self.discover() mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/discovery.py:263: in discover self.__resources = self.parse_api_groups(request_resources=False) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/discovery.py:131: in parse_api_groups groups_response = self.client.request('GET', '/{}'.format(DISCOVERY_PREFIX)).groups _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = args = ('GET', '/apis'), kwargs = {}, serialize_response = True serializer = def inner(self, *args, **kwargs): serialize_response = kwargs.pop('serialize', True) serializer = kwargs.pop('serializer', ResourceInstance) try: resp = func(self, *args, **kwargs) except ApiException as e: > raise api_exception(e) E openshift.dynamic.exceptions.ForbiddenError: 403 E Reason: Forbidden E HTTP response headers: HTTPHeaderDict({'Audit-Id': 'b0619406-0dbe-40b8-9bd5-13b8636ef873', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains; preload', 'X-Content-Type-Options': 'nosniff', 'X-Kubernetes-Pf-Flowschema-Uid': 'a538c251-7c72-4f62-a4d9-bb550595341f', 'X-Kubernetes-Pf-Prioritylevel-Uid': '36f43f03-b585-4e6c-b971-978beb3d6968', 'Date': 'Mon, 14 Oct 2024 03:49:23 GMT', 'Content-Length': '189'}) E HTTP response body: b'{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"forbidden: User \\"system:anonymous\\" cannot get path \\"/apis\\"","reason":"Forbidden","details":{},"code":403}\n' E Original traceback: E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py", line 42, in inner E resp = func(self, *args, **kwargs) E ^^^^^^^^^^^^^^^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py", line 235, in request E return self.client.call_api( E ^^^^^^^^^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py", line 340, in call_api E return self.__call_api(resource_path, method, E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py", line 172, in __call_api E response_data = self.request( E ^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py", line 362, in request E return self.rest_client.GET(url, E ^^^^^^^^^^^^^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/rest.py", line 237, in GET E return self.request("GET", url, E ^^^^^^^^^^^^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/rest.py", line 231, in request E raise ApiException(http_resp=r) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py:44: ForbiddenError ------------------------------ live log logreport ------------------------------ 03:49:23.413 - INFO: mtc-e2e-qev2/mtc_tests/tests/test_interop.py::test_mtc_101_interop ERROR ------------------------------ live log logreport ------------------------------ 03:49:23.744 - INFO: self = args = ('GET', '/apis'), kwargs = {}, serialize_response = True serializer = def inner(self, *args, **kwargs): serialize_response = kwargs.pop('serialize', True) serializer = kwargs.pop('serializer', ResourceInstance) try: > resp = func(self, *args, **kwargs) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py:42: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py:235: in request return self.client.call_api( mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py:340: in call_api return self.__call_api(resource_path, method, mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py:172: in __call_api response_data = self.request( mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py:362: in request return self.rest_client.GET(url, mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/rest.py:237: in GET return self.request("GET", url, _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = method = 'GET' url = 'https://api.mtc-source-cro4.cspilp.interop.ccitredhat.com:6443/apis' query_params = [] headers = {'Accept': 'application/json', 'Content-Type': 'application/json', 'User-Agent': 'OpenAPI-Generator/11.0.0/python', 'authorization': 'Bearer '} body = None, post_params = {}, _preload_content = False, _request_timeout = None def request(self, method, url, query_params=None, headers=None, body=None, post_params=None, _preload_content=True, _request_timeout=None): """Perform requests. :param method: http request method :param url: http request url :param query_params: query parameters in the url :param headers: http request headers :param body: request json body, for `application/json` :param post_params: request post parameters, `application/x-www-form-urlencoded` and `multipart/form-data` :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. """ method = method.upper() assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', 'PATCH', 'OPTIONS'] if post_params and body: raise ValueError( "body parameter cannot be used with post_params parameter." ) post_params = post_params or {} headers = headers or {} timeout = None if _request_timeout: if isinstance(_request_timeout, (int, ) if six.PY3 else (int, long)): # noqa: E501,F821 timeout = urllib3.Timeout(total=_request_timeout) elif (isinstance(_request_timeout, tuple) and len(_request_timeout) == 2): timeout = urllib3.Timeout( connect=_request_timeout[0], read=_request_timeout[1]) if 'Content-Type' not in headers: headers['Content-Type'] = 'application/json' try: # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: if query_params: url += '?' + urlencode(query_params) if re.search('json', headers['Content-Type'], re.IGNORECASE): if headers['Content-Type'] == 'application/json-patch+json': if not isinstance(body, list): headers['Content-Type'] = \ 'application/strategic-merge-patch+json' request_body = None if body is not None: request_body = json.dumps(body) r = self.pool_manager.request( method, url, body=request_body, preload_content=_preload_content, timeout=timeout, headers=headers) elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 r = self.pool_manager.request( method, url, fields=post_params, encode_multipart=False, preload_content=_preload_content, timeout=timeout, headers=headers) elif headers['Content-Type'] == 'multipart/form-data': # must del headers['Content-Type'], or the correct # Content-Type which generated by urllib3 will be # overwritten. del headers['Content-Type'] r = self.pool_manager.request( method, url, fields=post_params, encode_multipart=True, preload_content=_preload_content, timeout=timeout, headers=headers) # Pass a `string` parameter directly in the body to support # other content types than Json when `body` argument is # provided in serialized form elif isinstance(body, str): request_body = body r = self.pool_manager.request( method, url, body=request_body, preload_content=_preload_content, timeout=timeout, headers=headers) else: # Cannot generate the request from given parameters msg = """Cannot prepare a request message for provided arguments. Please check that your arguments match declared content type.""" raise ApiException(status=0, reason=msg) # For `GET`, `HEAD` else: r = self.pool_manager.request(method, url, fields=query_params, preload_content=_preload_content, timeout=timeout, headers=headers) except urllib3.exceptions.SSLError as e: msg = "{0}\n{1}".format(type(e).__name__, str(e)) raise ApiException(status=0, reason=msg) if _preload_content: r = RESTResponse(r) # In the python 3, the response.data is bytes. # we need to decode it to string. if six.PY3: r.data = r.data.decode('utf8') # log response body logger.debug("response body: %s", r.data) if not 200 <= r.status <= 299: > raise ApiException(http_resp=r) E kubernetes.client.rest.ApiException: (403) E Reason: Forbidden E HTTP response headers: HTTPHeaderDict({'Audit-Id': 'eb1ca456-438a-4615-ac0f-07e3f1d750ce', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains; preload', 'X-Content-Type-Options': 'nosniff', 'X-Kubernetes-Pf-Flowschema-Uid': 'a538c251-7c72-4f62-a4d9-bb550595341f', 'X-Kubernetes-Pf-Prioritylevel-Uid': '36f43f03-b585-4e6c-b971-978beb3d6968', 'Date': 'Mon, 14 Oct 2024 03:49:23 GMT', 'Content-Length': '189'}) E HTTP response body: b'{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"forbidden: User \\"system:anonymous\\" cannot get path \\"/apis\\"","reason":"Forbidden","details":{},"code":403}\n' mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/rest.py:231: ApiException During handling of the above exception, another exception occurred: mtc = pytestconfig = <_pytest.config.Config object at 0x7fc01af64910> request = > @pytest.fixture def src_cluster(mtc, pytestconfig, request): '''This fixture returns always and OpenshiftCluster object connected to the source cluster ''' controller_is_source = pytestconfig.getoption('--controller-is-source') if controller_is_source: src = mtc.get_local_clusters()[0] else: > src = mtc.get_remote_clusters()[0] mtc-e2e-qev2/mtc_tests/fixtures/clusters.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ mtc-e2e-qev2/venv/lib/python3.11/site-packages/mtc/client.py:137: in get_remote_clusters remote_clusters.append(self.get_cluster_by_migcluster(mc, as_helper, as_user_pass)) mtc-e2e-qev2/venv/lib/python3.11/site-packages/mtc/client.py:173: in get_cluster_by_migcluster return self.get_cluster_as_helper_by_migcluster(migcluster) mtc-e2e-qev2/venv/lib/python3.11/site-packages/mtc/client.py:231: in get_cluster_as_helper_by_migcluster default_openshift_cluster = self.get_cluster_as_default_by_migcluster(migcluster) mtc-e2e-qev2/venv/lib/python3.11/site-packages/mtc/client.py:273: in get_cluster_as_default_by_migcluster openshift_cluster.connect_with_token(host, api_key) mtc-e2e-qev2/venv/lib/python3.11/site-packages/mtc/openshift.py:81: in connect_with_token self.client = DynamicClient(kubernetes.client.ApiClient(configuration)) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py:71: in __init__ self.__discoverer = discoverer(self, cache_file) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/discovery.py:259: in __init__ Discoverer.__init__(self, client, cache_file) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/discovery.py:31: in __init__ self.__init_cache() mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/discovery.py:79: in __init_cache self.discover() mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/discovery.py:263: in discover self.__resources = self.parse_api_groups(request_resources=False) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/discovery.py:131: in parse_api_groups groups_response = self.client.request('GET', '/{}'.format(DISCOVERY_PREFIX)).groups _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = args = ('GET', '/apis'), kwargs = {}, serialize_response = True serializer = def inner(self, *args, **kwargs): serialize_response = kwargs.pop('serialize', True) serializer = kwargs.pop('serializer', ResourceInstance) try: resp = func(self, *args, **kwargs) except ApiException as e: > raise api_exception(e) E openshift.dynamic.exceptions.ForbiddenError: 403 E Reason: Forbidden E HTTP response headers: HTTPHeaderDict({'Audit-Id': 'eb1ca456-438a-4615-ac0f-07e3f1d750ce', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains; preload', 'X-Content-Type-Options': 'nosniff', 'X-Kubernetes-Pf-Flowschema-Uid': 'a538c251-7c72-4f62-a4d9-bb550595341f', 'X-Kubernetes-Pf-Prioritylevel-Uid': '36f43f03-b585-4e6c-b971-978beb3d6968', 'Date': 'Mon, 14 Oct 2024 03:49:23 GMT', 'Content-Length': '189'}) E HTTP response body: b'{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"forbidden: User \\"system:anonymous\\" cannot get path \\"/apis\\"","reason":"Forbidden","details":{},"code":403}\n' E Original traceback: E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py", line 42, in inner E resp = func(self, *args, **kwargs) E ^^^^^^^^^^^^^^^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py", line 235, in request E return self.client.call_api( E ^^^^^^^^^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py", line 340, in call_api E return self.__call_api(resource_path, method, E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py", line 172, in __call_api E response_data = self.request( E ^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py", line 362, in request E return self.rest_client.GET(url, E ^^^^^^^^^^^^^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/rest.py", line 237, in GET E return self.request("GET", url, E ^^^^^^^^^^^^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/rest.py", line 231, in request E raise ApiException(http_resp=r) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py:44: ForbiddenError ------------------------------ live log logreport ------------------------------ 03:49:23.745 - INFO: mtc-e2e-qev2/mtc_tests/tests/test_interop.py::test_mtc_116_interop ERROR ------------------------------ live log logreport ------------------------------ 03:49:24.033 - INFO: self = args = ('GET', '/apis'), kwargs = {}, serialize_response = True serializer = def inner(self, *args, **kwargs): serialize_response = kwargs.pop('serialize', True) serializer = kwargs.pop('serializer', ResourceInstance) try: > resp = func(self, *args, **kwargs) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py:42: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py:235: in request return self.client.call_api( mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py:340: in call_api return self.__call_api(resource_path, method, mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py:172: in __call_api response_data = self.request( mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py:362: in request return self.rest_client.GET(url, mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/rest.py:237: in GET return self.request("GET", url, _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = method = 'GET' url = 'https://api.mtc-source-cro4.cspilp.interop.ccitredhat.com:6443/apis' query_params = [] headers = {'Accept': 'application/json', 'Content-Type': 'application/json', 'User-Agent': 'OpenAPI-Generator/11.0.0/python', 'authorization': 'Bearer '} body = None, post_params = {}, _preload_content = False, _request_timeout = None def request(self, method, url, query_params=None, headers=None, body=None, post_params=None, _preload_content=True, _request_timeout=None): """Perform requests. :param method: http request method :param url: http request url :param query_params: query parameters in the url :param headers: http request headers :param body: request json body, for `application/json` :param post_params: request post parameters, `application/x-www-form-urlencoded` and `multipart/form-data` :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. """ method = method.upper() assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', 'PATCH', 'OPTIONS'] if post_params and body: raise ValueError( "body parameter cannot be used with post_params parameter." ) post_params = post_params or {} headers = headers or {} timeout = None if _request_timeout: if isinstance(_request_timeout, (int, ) if six.PY3 else (int, long)): # noqa: E501,F821 timeout = urllib3.Timeout(total=_request_timeout) elif (isinstance(_request_timeout, tuple) and len(_request_timeout) == 2): timeout = urllib3.Timeout( connect=_request_timeout[0], read=_request_timeout[1]) if 'Content-Type' not in headers: headers['Content-Type'] = 'application/json' try: # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: if query_params: url += '?' + urlencode(query_params) if re.search('json', headers['Content-Type'], re.IGNORECASE): if headers['Content-Type'] == 'application/json-patch+json': if not isinstance(body, list): headers['Content-Type'] = \ 'application/strategic-merge-patch+json' request_body = None if body is not None: request_body = json.dumps(body) r = self.pool_manager.request( method, url, body=request_body, preload_content=_preload_content, timeout=timeout, headers=headers) elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 r = self.pool_manager.request( method, url, fields=post_params, encode_multipart=False, preload_content=_preload_content, timeout=timeout, headers=headers) elif headers['Content-Type'] == 'multipart/form-data': # must del headers['Content-Type'], or the correct # Content-Type which generated by urllib3 will be # overwritten. del headers['Content-Type'] r = self.pool_manager.request( method, url, fields=post_params, encode_multipart=True, preload_content=_preload_content, timeout=timeout, headers=headers) # Pass a `string` parameter directly in the body to support # other content types than Json when `body` argument is # provided in serialized form elif isinstance(body, str): request_body = body r = self.pool_manager.request( method, url, body=request_body, preload_content=_preload_content, timeout=timeout, headers=headers) else: # Cannot generate the request from given parameters msg = """Cannot prepare a request message for provided arguments. Please check that your arguments match declared content type.""" raise ApiException(status=0, reason=msg) # For `GET`, `HEAD` else: r = self.pool_manager.request(method, url, fields=query_params, preload_content=_preload_content, timeout=timeout, headers=headers) except urllib3.exceptions.SSLError as e: msg = "{0}\n{1}".format(type(e).__name__, str(e)) raise ApiException(status=0, reason=msg) if _preload_content: r = RESTResponse(r) # In the python 3, the response.data is bytes. # we need to decode it to string. if six.PY3: r.data = r.data.decode('utf8') # log response body logger.debug("response body: %s", r.data) if not 200 <= r.status <= 299: > raise ApiException(http_resp=r) E kubernetes.client.rest.ApiException: (403) E Reason: Forbidden E HTTP response headers: HTTPHeaderDict({'Audit-Id': '51de98e9-387a-458a-8303-933f12920498', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains; preload', 'X-Content-Type-Options': 'nosniff', 'X-Kubernetes-Pf-Flowschema-Uid': 'a538c251-7c72-4f62-a4d9-bb550595341f', 'X-Kubernetes-Pf-Prioritylevel-Uid': '36f43f03-b585-4e6c-b971-978beb3d6968', 'Date': 'Mon, 14 Oct 2024 03:49:23 GMT', 'Content-Length': '189'}) E HTTP response body: b'{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"forbidden: User \\"system:anonymous\\" cannot get path \\"/apis\\"","reason":"Forbidden","details":{},"code":403}\n' mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/rest.py:231: ApiException During handling of the above exception, another exception occurred: mtc = pytestconfig = <_pytest.config.Config object at 0x7fc01af64910> request = > @pytest.fixture def src_cluster(mtc, pytestconfig, request): '''This fixture returns always and OpenshiftCluster object connected to the source cluster ''' controller_is_source = pytestconfig.getoption('--controller-is-source') if controller_is_source: src = mtc.get_local_clusters()[0] else: > src = mtc.get_remote_clusters()[0] mtc-e2e-qev2/mtc_tests/fixtures/clusters.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ mtc-e2e-qev2/venv/lib/python3.11/site-packages/mtc/client.py:137: in get_remote_clusters remote_clusters.append(self.get_cluster_by_migcluster(mc, as_helper, as_user_pass)) mtc-e2e-qev2/venv/lib/python3.11/site-packages/mtc/client.py:173: in get_cluster_by_migcluster return self.get_cluster_as_helper_by_migcluster(migcluster) mtc-e2e-qev2/venv/lib/python3.11/site-packages/mtc/client.py:231: in get_cluster_as_helper_by_migcluster default_openshift_cluster = self.get_cluster_as_default_by_migcluster(migcluster) mtc-e2e-qev2/venv/lib/python3.11/site-packages/mtc/client.py:273: in get_cluster_as_default_by_migcluster openshift_cluster.connect_with_token(host, api_key) mtc-e2e-qev2/venv/lib/python3.11/site-packages/mtc/openshift.py:81: in connect_with_token self.client = DynamicClient(kubernetes.client.ApiClient(configuration)) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py:71: in __init__ self.__discoverer = discoverer(self, cache_file) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/discovery.py:259: in __init__ Discoverer.__init__(self, client, cache_file) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/discovery.py:31: in __init__ self.__init_cache() mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/discovery.py:79: in __init_cache self.discover() mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/discovery.py:263: in discover self.__resources = self.parse_api_groups(request_resources=False) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/discovery.py:131: in parse_api_groups groups_response = self.client.request('GET', '/{}'.format(DISCOVERY_PREFIX)).groups _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = args = ('GET', '/apis'), kwargs = {}, serialize_response = True serializer = def inner(self, *args, **kwargs): serialize_response = kwargs.pop('serialize', True) serializer = kwargs.pop('serializer', ResourceInstance) try: resp = func(self, *args, **kwargs) except ApiException as e: > raise api_exception(e) E openshift.dynamic.exceptions.ForbiddenError: 403 E Reason: Forbidden E HTTP response headers: HTTPHeaderDict({'Audit-Id': '51de98e9-387a-458a-8303-933f12920498', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains; preload', 'X-Content-Type-Options': 'nosniff', 'X-Kubernetes-Pf-Flowschema-Uid': 'a538c251-7c72-4f62-a4d9-bb550595341f', 'X-Kubernetes-Pf-Prioritylevel-Uid': '36f43f03-b585-4e6c-b971-978beb3d6968', 'Date': 'Mon, 14 Oct 2024 03:49:23 GMT', 'Content-Length': '189'}) E HTTP response body: b'{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"forbidden: User \\"system:anonymous\\" cannot get path \\"/apis\\"","reason":"Forbidden","details":{},"code":403}\n' E Original traceback: E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py", line 42, in inner E resp = func(self, *args, **kwargs) E ^^^^^^^^^^^^^^^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py", line 235, in request E return self.client.call_api( E ^^^^^^^^^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py", line 340, in call_api E return self.__call_api(resource_path, method, E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py", line 172, in __call_api E response_data = self.request( E ^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py", line 362, in request E return self.rest_client.GET(url, E ^^^^^^^^^^^^^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/rest.py", line 237, in GET E return self.request("GET", url, E ^^^^^^^^^^^^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/rest.py", line 231, in request E raise ApiException(http_resp=r) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py:44: ForbiddenError ------------------------------ live log logreport ------------------------------ 03:49:24.033 - INFO: mtc-e2e-qev2/mtc_tests/tests/test_interop.py::test_mtc_147_interop ERROR ------------------------------ live log logreport ------------------------------ 03:49:24.351 - INFO: self = args = ('GET', '/apis'), kwargs = {}, serialize_response = True serializer = def inner(self, *args, **kwargs): serialize_response = kwargs.pop('serialize', True) serializer = kwargs.pop('serializer', ResourceInstance) try: > resp = func(self, *args, **kwargs) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py:42: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py:235: in request return self.client.call_api( mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py:340: in call_api return self.__call_api(resource_path, method, mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py:172: in __call_api response_data = self.request( mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py:362: in request return self.rest_client.GET(url, mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/rest.py:237: in GET return self.request("GET", url, _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = method = 'GET' url = 'https://api.mtc-source-cro4.cspilp.interop.ccitredhat.com:6443/apis' query_params = [] headers = {'Accept': 'application/json', 'Content-Type': 'application/json', 'User-Agent': 'OpenAPI-Generator/11.0.0/python', 'authorization': 'Bearer '} body = None, post_params = {}, _preload_content = False, _request_timeout = None def request(self, method, url, query_params=None, headers=None, body=None, post_params=None, _preload_content=True, _request_timeout=None): """Perform requests. :param method: http request method :param url: http request url :param query_params: query parameters in the url :param headers: http request headers :param body: request json body, for `application/json` :param post_params: request post parameters, `application/x-www-form-urlencoded` and `multipart/form-data` :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. """ method = method.upper() assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', 'PATCH', 'OPTIONS'] if post_params and body: raise ValueError( "body parameter cannot be used with post_params parameter." ) post_params = post_params or {} headers = headers or {} timeout = None if _request_timeout: if isinstance(_request_timeout, (int, ) if six.PY3 else (int, long)): # noqa: E501,F821 timeout = urllib3.Timeout(total=_request_timeout) elif (isinstance(_request_timeout, tuple) and len(_request_timeout) == 2): timeout = urllib3.Timeout( connect=_request_timeout[0], read=_request_timeout[1]) if 'Content-Type' not in headers: headers['Content-Type'] = 'application/json' try: # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: if query_params: url += '?' + urlencode(query_params) if re.search('json', headers['Content-Type'], re.IGNORECASE): if headers['Content-Type'] == 'application/json-patch+json': if not isinstance(body, list): headers['Content-Type'] = \ 'application/strategic-merge-patch+json' request_body = None if body is not None: request_body = json.dumps(body) r = self.pool_manager.request( method, url, body=request_body, preload_content=_preload_content, timeout=timeout, headers=headers) elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 r = self.pool_manager.request( method, url, fields=post_params, encode_multipart=False, preload_content=_preload_content, timeout=timeout, headers=headers) elif headers['Content-Type'] == 'multipart/form-data': # must del headers['Content-Type'], or the correct # Content-Type which generated by urllib3 will be # overwritten. del headers['Content-Type'] r = self.pool_manager.request( method, url, fields=post_params, encode_multipart=True, preload_content=_preload_content, timeout=timeout, headers=headers) # Pass a `string` parameter directly in the body to support # other content types than Json when `body` argument is # provided in serialized form elif isinstance(body, str): request_body = body r = self.pool_manager.request( method, url, body=request_body, preload_content=_preload_content, timeout=timeout, headers=headers) else: # Cannot generate the request from given parameters msg = """Cannot prepare a request message for provided arguments. Please check that your arguments match declared content type.""" raise ApiException(status=0, reason=msg) # For `GET`, `HEAD` else: r = self.pool_manager.request(method, url, fields=query_params, preload_content=_preload_content, timeout=timeout, headers=headers) except urllib3.exceptions.SSLError as e: msg = "{0}\n{1}".format(type(e).__name__, str(e)) raise ApiException(status=0, reason=msg) if _preload_content: r = RESTResponse(r) # In the python 3, the response.data is bytes. # we need to decode it to string. if six.PY3: r.data = r.data.decode('utf8') # log response body logger.debug("response body: %s", r.data) if not 200 <= r.status <= 299: > raise ApiException(http_resp=r) E kubernetes.client.rest.ApiException: (403) E Reason: Forbidden E HTTP response headers: HTTPHeaderDict({'Audit-Id': '6c909479-3d66-4f8c-b67a-96d4034a5b1a', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains; preload', 'X-Content-Type-Options': 'nosniff', 'X-Kubernetes-Pf-Flowschema-Uid': 'a538c251-7c72-4f62-a4d9-bb550595341f', 'X-Kubernetes-Pf-Prioritylevel-Uid': '36f43f03-b585-4e6c-b971-978beb3d6968', 'Date': 'Mon, 14 Oct 2024 03:49:24 GMT', 'Content-Length': '189'}) E HTTP response body: b'{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"forbidden: User \\"system:anonymous\\" cannot get path \\"/apis\\"","reason":"Forbidden","details":{},"code":403}\n' mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/rest.py:231: ApiException During handling of the above exception, another exception occurred: mtc = pytestconfig = <_pytest.config.Config object at 0x7fc01af64910> request = > @pytest.fixture def src_cluster(mtc, pytestconfig, request): '''This fixture returns always and OpenshiftCluster object connected to the source cluster ''' controller_is_source = pytestconfig.getoption('--controller-is-source') if controller_is_source: src = mtc.get_local_clusters()[0] else: > src = mtc.get_remote_clusters()[0] mtc-e2e-qev2/mtc_tests/fixtures/clusters.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ mtc-e2e-qev2/venv/lib/python3.11/site-packages/mtc/client.py:137: in get_remote_clusters remote_clusters.append(self.get_cluster_by_migcluster(mc, as_helper, as_user_pass)) mtc-e2e-qev2/venv/lib/python3.11/site-packages/mtc/client.py:173: in get_cluster_by_migcluster return self.get_cluster_as_helper_by_migcluster(migcluster) mtc-e2e-qev2/venv/lib/python3.11/site-packages/mtc/client.py:231: in get_cluster_as_helper_by_migcluster default_openshift_cluster = self.get_cluster_as_default_by_migcluster(migcluster) mtc-e2e-qev2/venv/lib/python3.11/site-packages/mtc/client.py:273: in get_cluster_as_default_by_migcluster openshift_cluster.connect_with_token(host, api_key) mtc-e2e-qev2/venv/lib/python3.11/site-packages/mtc/openshift.py:81: in connect_with_token self.client = DynamicClient(kubernetes.client.ApiClient(configuration)) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py:71: in __init__ self.__discoverer = discoverer(self, cache_file) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/discovery.py:259: in __init__ Discoverer.__init__(self, client, cache_file) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/discovery.py:31: in __init__ self.__init_cache() mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/discovery.py:79: in __init_cache self.discover() mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/discovery.py:263: in discover self.__resources = self.parse_api_groups(request_resources=False) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/discovery.py:131: in parse_api_groups groups_response = self.client.request('GET', '/{}'.format(DISCOVERY_PREFIX)).groups _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = args = ('GET', '/apis'), kwargs = {}, serialize_response = True serializer = def inner(self, *args, **kwargs): serialize_response = kwargs.pop('serialize', True) serializer = kwargs.pop('serializer', ResourceInstance) try: resp = func(self, *args, **kwargs) except ApiException as e: > raise api_exception(e) E openshift.dynamic.exceptions.ForbiddenError: 403 E Reason: Forbidden E HTTP response headers: HTTPHeaderDict({'Audit-Id': '6c909479-3d66-4f8c-b67a-96d4034a5b1a', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains; preload', 'X-Content-Type-Options': 'nosniff', 'X-Kubernetes-Pf-Flowschema-Uid': 'a538c251-7c72-4f62-a4d9-bb550595341f', 'X-Kubernetes-Pf-Prioritylevel-Uid': '36f43f03-b585-4e6c-b971-978beb3d6968', 'Date': 'Mon, 14 Oct 2024 03:49:24 GMT', 'Content-Length': '189'}) E HTTP response body: b'{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"forbidden: User \\"system:anonymous\\" cannot get path \\"/apis\\"","reason":"Forbidden","details":{},"code":403}\n' E Original traceback: E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py", line 42, in inner E resp = func(self, *args, **kwargs) E ^^^^^^^^^^^^^^^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py", line 235, in request E return self.client.call_api( E ^^^^^^^^^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py", line 340, in call_api E return self.__call_api(resource_path, method, E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py", line 172, in __call_api E response_data = self.request( E ^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py", line 362, in request E return self.rest_client.GET(url, E ^^^^^^^^^^^^^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/rest.py", line 237, in GET E return self.request("GET", url, E ^^^^^^^^^^^^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/rest.py", line 231, in request E raise ApiException(http_resp=r) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py:44: ForbiddenError ------------------------------ live log logreport ------------------------------ 03:49:24.352 - INFO: mtc-e2e-qev2/mtc_tests/tests/test_interop.py::test_mtc_172_interop ERROR ------------------------------ live log logreport ------------------------------ 03:49:24.648 - INFO: self = args = ('GET', '/apis'), kwargs = {}, serialize_response = True serializer = def inner(self, *args, **kwargs): serialize_response = kwargs.pop('serialize', True) serializer = kwargs.pop('serializer', ResourceInstance) try: > resp = func(self, *args, **kwargs) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py:42: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py:235: in request return self.client.call_api( mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py:340: in call_api return self.__call_api(resource_path, method, mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py:172: in __call_api response_data = self.request( mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py:362: in request return self.rest_client.GET(url, mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/rest.py:237: in GET return self.request("GET", url, _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = method = 'GET' url = 'https://api.mtc-source-cro4.cspilp.interop.ccitredhat.com:6443/apis' query_params = [] headers = {'Accept': 'application/json', 'Content-Type': 'application/json', 'User-Agent': 'OpenAPI-Generator/11.0.0/python', 'authorization': 'Bearer '} body = None, post_params = {}, _preload_content = False, _request_timeout = None def request(self, method, url, query_params=None, headers=None, body=None, post_params=None, _preload_content=True, _request_timeout=None): """Perform requests. :param method: http request method :param url: http request url :param query_params: query parameters in the url :param headers: http request headers :param body: request json body, for `application/json` :param post_params: request post parameters, `application/x-www-form-urlencoded` and `multipart/form-data` :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. """ method = method.upper() assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', 'PATCH', 'OPTIONS'] if post_params and body: raise ValueError( "body parameter cannot be used with post_params parameter." ) post_params = post_params or {} headers = headers or {} timeout = None if _request_timeout: if isinstance(_request_timeout, (int, ) if six.PY3 else (int, long)): # noqa: E501,F821 timeout = urllib3.Timeout(total=_request_timeout) elif (isinstance(_request_timeout, tuple) and len(_request_timeout) == 2): timeout = urllib3.Timeout( connect=_request_timeout[0], read=_request_timeout[1]) if 'Content-Type' not in headers: headers['Content-Type'] = 'application/json' try: # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: if query_params: url += '?' + urlencode(query_params) if re.search('json', headers['Content-Type'], re.IGNORECASE): if headers['Content-Type'] == 'application/json-patch+json': if not isinstance(body, list): headers['Content-Type'] = \ 'application/strategic-merge-patch+json' request_body = None if body is not None: request_body = json.dumps(body) r = self.pool_manager.request( method, url, body=request_body, preload_content=_preload_content, timeout=timeout, headers=headers) elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 r = self.pool_manager.request( method, url, fields=post_params, encode_multipart=False, preload_content=_preload_content, timeout=timeout, headers=headers) elif headers['Content-Type'] == 'multipart/form-data': # must del headers['Content-Type'], or the correct # Content-Type which generated by urllib3 will be # overwritten. del headers['Content-Type'] r = self.pool_manager.request( method, url, fields=post_params, encode_multipart=True, preload_content=_preload_content, timeout=timeout, headers=headers) # Pass a `string` parameter directly in the body to support # other content types than Json when `body` argument is # provided in serialized form elif isinstance(body, str): request_body = body r = self.pool_manager.request( method, url, body=request_body, preload_content=_preload_content, timeout=timeout, headers=headers) else: # Cannot generate the request from given parameters msg = """Cannot prepare a request message for provided arguments. Please check that your arguments match declared content type.""" raise ApiException(status=0, reason=msg) # For `GET`, `HEAD` else: r = self.pool_manager.request(method, url, fields=query_params, preload_content=_preload_content, timeout=timeout, headers=headers) except urllib3.exceptions.SSLError as e: msg = "{0}\n{1}".format(type(e).__name__, str(e)) raise ApiException(status=0, reason=msg) if _preload_content: r = RESTResponse(r) # In the python 3, the response.data is bytes. # we need to decode it to string. if six.PY3: r.data = r.data.decode('utf8') # log response body logger.debug("response body: %s", r.data) if not 200 <= r.status <= 299: > raise ApiException(http_resp=r) E kubernetes.client.rest.ApiException: (403) E Reason: Forbidden E HTTP response headers: HTTPHeaderDict({'Audit-Id': 'f58bd391-04c2-4ccf-9746-2877708438a2', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains; preload', 'X-Content-Type-Options': 'nosniff', 'X-Kubernetes-Pf-Flowschema-Uid': 'a538c251-7c72-4f62-a4d9-bb550595341f', 'X-Kubernetes-Pf-Prioritylevel-Uid': '36f43f03-b585-4e6c-b971-978beb3d6968', 'Date': 'Mon, 14 Oct 2024 03:49:24 GMT', 'Content-Length': '189'}) E HTTP response body: b'{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"forbidden: User \\"system:anonymous\\" cannot get path \\"/apis\\"","reason":"Forbidden","details":{},"code":403}\n' mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/rest.py:231: ApiException During handling of the above exception, another exception occurred: mtc = pytestconfig = <_pytest.config.Config object at 0x7fc01af64910> request = > @pytest.fixture def src_cluster(mtc, pytestconfig, request): '''This fixture returns always and OpenshiftCluster object connected to the source cluster ''' controller_is_source = pytestconfig.getoption('--controller-is-source') if controller_is_source: src = mtc.get_local_clusters()[0] else: > src = mtc.get_remote_clusters()[0] mtc-e2e-qev2/mtc_tests/fixtures/clusters.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ mtc-e2e-qev2/venv/lib/python3.11/site-packages/mtc/client.py:137: in get_remote_clusters remote_clusters.append(self.get_cluster_by_migcluster(mc, as_helper, as_user_pass)) mtc-e2e-qev2/venv/lib/python3.11/site-packages/mtc/client.py:173: in get_cluster_by_migcluster return self.get_cluster_as_helper_by_migcluster(migcluster) mtc-e2e-qev2/venv/lib/python3.11/site-packages/mtc/client.py:231: in get_cluster_as_helper_by_migcluster default_openshift_cluster = self.get_cluster_as_default_by_migcluster(migcluster) mtc-e2e-qev2/venv/lib/python3.11/site-packages/mtc/client.py:273: in get_cluster_as_default_by_migcluster openshift_cluster.connect_with_token(host, api_key) mtc-e2e-qev2/venv/lib/python3.11/site-packages/mtc/openshift.py:81: in connect_with_token self.client = DynamicClient(kubernetes.client.ApiClient(configuration)) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py:71: in __init__ self.__discoverer = discoverer(self, cache_file) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/discovery.py:259: in __init__ Discoverer.__init__(self, client, cache_file) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/discovery.py:31: in __init__ self.__init_cache() mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/discovery.py:79: in __init_cache self.discover() mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/discovery.py:263: in discover self.__resources = self.parse_api_groups(request_resources=False) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/discovery.py:131: in parse_api_groups groups_response = self.client.request('GET', '/{}'.format(DISCOVERY_PREFIX)).groups _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = args = ('GET', '/apis'), kwargs = {}, serialize_response = True serializer = def inner(self, *args, **kwargs): serialize_response = kwargs.pop('serialize', True) serializer = kwargs.pop('serializer', ResourceInstance) try: resp = func(self, *args, **kwargs) except ApiException as e: > raise api_exception(e) E openshift.dynamic.exceptions.ForbiddenError: 403 E Reason: Forbidden E HTTP response headers: HTTPHeaderDict({'Audit-Id': 'f58bd391-04c2-4ccf-9746-2877708438a2', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains; preload', 'X-Content-Type-Options': 'nosniff', 'X-Kubernetes-Pf-Flowschema-Uid': 'a538c251-7c72-4f62-a4d9-bb550595341f', 'X-Kubernetes-Pf-Prioritylevel-Uid': '36f43f03-b585-4e6c-b971-978beb3d6968', 'Date': 'Mon, 14 Oct 2024 03:49:24 GMT', 'Content-Length': '189'}) E HTTP response body: b'{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"forbidden: User \\"system:anonymous\\" cannot get path \\"/apis\\"","reason":"Forbidden","details":{},"code":403}\n' E Original traceback: E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py", line 42, in inner E resp = func(self, *args, **kwargs) E ^^^^^^^^^^^^^^^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py", line 235, in request E return self.client.call_api( E ^^^^^^^^^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py", line 340, in call_api E return self.__call_api(resource_path, method, E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py", line 172, in __call_api E response_data = self.request( E ^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py", line 362, in request E return self.rest_client.GET(url, E ^^^^^^^^^^^^^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/rest.py", line 237, in GET E return self.request("GET", url, E ^^^^^^^^^^^^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/rest.py", line 231, in request E raise ApiException(http_resp=r) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py:44: ForbiddenError ------------------------------ live log logreport ------------------------------ 03:49:24.649 - INFO: ==================================== ERRORS ==================================== ____________________ ERROR at setup of test_mtc_87_interop _____________________ self = args = ('GET', '/apis'), kwargs = {}, serialize_response = True serializer = def inner(self, *args, **kwargs): serialize_response = kwargs.pop('serialize', True) serializer = kwargs.pop('serializer', ResourceInstance) try: > resp = func(self, *args, **kwargs) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py:42: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py:235: in request return self.client.call_api( mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py:340: in call_api return self.__call_api(resource_path, method, mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py:172: in __call_api response_data = self.request( mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py:362: in request return self.rest_client.GET(url, mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/rest.py:237: in GET return self.request("GET", url, _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = method = 'GET' url = 'https://api.mtc-source-cro4.cspilp.interop.ccitredhat.com:6443/apis' query_params = [] headers = {'Accept': 'application/json', 'Content-Type': 'application/json', 'User-Agent': 'OpenAPI-Generator/11.0.0/python', 'authorization': 'Bearer '} body = None, post_params = {}, _preload_content = False, _request_timeout = None def request(self, method, url, query_params=None, headers=None, body=None, post_params=None, _preload_content=True, _request_timeout=None): """Perform requests. :param method: http request method :param url: http request url :param query_params: query parameters in the url :param headers: http request headers :param body: request json body, for `application/json` :param post_params: request post parameters, `application/x-www-form-urlencoded` and `multipart/form-data` :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. """ method = method.upper() assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', 'PATCH', 'OPTIONS'] if post_params and body: raise ValueError( "body parameter cannot be used with post_params parameter." ) post_params = post_params or {} headers = headers or {} timeout = None if _request_timeout: if isinstance(_request_timeout, (int, ) if six.PY3 else (int, long)): # noqa: E501,F821 timeout = urllib3.Timeout(total=_request_timeout) elif (isinstance(_request_timeout, tuple) and len(_request_timeout) == 2): timeout = urllib3.Timeout( connect=_request_timeout[0], read=_request_timeout[1]) if 'Content-Type' not in headers: headers['Content-Type'] = 'application/json' try: # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: if query_params: url += '?' + urlencode(query_params) if re.search('json', headers['Content-Type'], re.IGNORECASE): if headers['Content-Type'] == 'application/json-patch+json': if not isinstance(body, list): headers['Content-Type'] = \ 'application/strategic-merge-patch+json' request_body = None if body is not None: request_body = json.dumps(body) r = self.pool_manager.request( method, url, body=request_body, preload_content=_preload_content, timeout=timeout, headers=headers) elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 r = self.pool_manager.request( method, url, fields=post_params, encode_multipart=False, preload_content=_preload_content, timeout=timeout, headers=headers) elif headers['Content-Type'] == 'multipart/form-data': # must del headers['Content-Type'], or the correct # Content-Type which generated by urllib3 will be # overwritten. del headers['Content-Type'] r = self.pool_manager.request( method, url, fields=post_params, encode_multipart=True, preload_content=_preload_content, timeout=timeout, headers=headers) # Pass a `string` parameter directly in the body to support # other content types than Json when `body` argument is # provided in serialized form elif isinstance(body, str): request_body = body r = self.pool_manager.request( method, url, body=request_body, preload_content=_preload_content, timeout=timeout, headers=headers) else: # Cannot generate the request from given parameters msg = """Cannot prepare a request message for provided arguments. Please check that your arguments match declared content type.""" raise ApiException(status=0, reason=msg) # For `GET`, `HEAD` else: r = self.pool_manager.request(method, url, fields=query_params, preload_content=_preload_content, timeout=timeout, headers=headers) except urllib3.exceptions.SSLError as e: msg = "{0}\n{1}".format(type(e).__name__, str(e)) raise ApiException(status=0, reason=msg) if _preload_content: r = RESTResponse(r) # In the python 3, the response.data is bytes. # we need to decode it to string. if six.PY3: r.data = r.data.decode('utf8') # log response body logger.debug("response body: %s", r.data) if not 200 <= r.status <= 299: > raise ApiException(http_resp=r) E kubernetes.client.rest.ApiException: (403) E Reason: Forbidden E HTTP response headers: HTTPHeaderDict({'Audit-Id': 'ef2dc559-4847-4160-b34b-2bd8e86eae3b', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains; preload', 'X-Content-Type-Options': 'nosniff', 'X-Kubernetes-Pf-Flowschema-Uid': 'a538c251-7c72-4f62-a4d9-bb550595341f', 'X-Kubernetes-Pf-Prioritylevel-Uid': '36f43f03-b585-4e6c-b971-978beb3d6968', 'Date': 'Mon, 14 Oct 2024 03:49:22 GMT', 'Content-Length': '189'}) E HTTP response body: b'{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"forbidden: User \\"system:anonymous\\" cannot get path \\"/apis\\"","reason":"Forbidden","details":{},"code":403}\n' mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/rest.py:231: ApiException During handling of the above exception, another exception occurred: mtc = pytestconfig = <_pytest.config.Config object at 0x7fc01af64910> request = > @pytest.fixture def src_cluster(mtc, pytestconfig, request): '''This fixture returns always and OpenshiftCluster object connected to the source cluster ''' controller_is_source = pytestconfig.getoption('--controller-is-source') if controller_is_source: src = mtc.get_local_clusters()[0] else: > src = mtc.get_remote_clusters()[0] mtc-e2e-qev2/mtc_tests/fixtures/clusters.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ mtc-e2e-qev2/venv/lib/python3.11/site-packages/mtc/client.py:137: in get_remote_clusters remote_clusters.append(self.get_cluster_by_migcluster(mc, as_helper, as_user_pass)) mtc-e2e-qev2/venv/lib/python3.11/site-packages/mtc/client.py:173: in get_cluster_by_migcluster return self.get_cluster_as_helper_by_migcluster(migcluster) mtc-e2e-qev2/venv/lib/python3.11/site-packages/mtc/client.py:231: in get_cluster_as_helper_by_migcluster default_openshift_cluster = self.get_cluster_as_default_by_migcluster(migcluster) mtc-e2e-qev2/venv/lib/python3.11/site-packages/mtc/client.py:273: in get_cluster_as_default_by_migcluster openshift_cluster.connect_with_token(host, api_key) mtc-e2e-qev2/venv/lib/python3.11/site-packages/mtc/openshift.py:81: in connect_with_token self.client = DynamicClient(kubernetes.client.ApiClient(configuration)) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py:71: in __init__ self.__discoverer = discoverer(self, cache_file) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/discovery.py:259: in __init__ Discoverer.__init__(self, client, cache_file) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/discovery.py:31: in __init__ self.__init_cache() mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/discovery.py:79: in __init_cache self.discover() mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/discovery.py:263: in discover self.__resources = self.parse_api_groups(request_resources=False) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/discovery.py:131: in parse_api_groups groups_response = self.client.request('GET', '/{}'.format(DISCOVERY_PREFIX)).groups _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = args = ('GET', '/apis'), kwargs = {}, serialize_response = True serializer = def inner(self, *args, **kwargs): serialize_response = kwargs.pop('serialize', True) serializer = kwargs.pop('serializer', ResourceInstance) try: resp = func(self, *args, **kwargs) except ApiException as e: > raise api_exception(e) E openshift.dynamic.exceptions.ForbiddenError: 403 E Reason: Forbidden E HTTP response headers: HTTPHeaderDict({'Audit-Id': 'ef2dc559-4847-4160-b34b-2bd8e86eae3b', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains; preload', 'X-Content-Type-Options': 'nosniff', 'X-Kubernetes-Pf-Flowschema-Uid': 'a538c251-7c72-4f62-a4d9-bb550595341f', 'X-Kubernetes-Pf-Prioritylevel-Uid': '36f43f03-b585-4e6c-b971-978beb3d6968', 'Date': 'Mon, 14 Oct 2024 03:49:22 GMT', 'Content-Length': '189'}) E HTTP response body: b'{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"forbidden: User \\"system:anonymous\\" cannot get path \\"/apis\\"","reason":"Forbidden","details":{},"code":403}\n' E Original traceback: E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py", line 42, in inner E resp = func(self, *args, **kwargs) E ^^^^^^^^^^^^^^^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py", line 235, in request E return self.client.call_api( E ^^^^^^^^^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py", line 340, in call_api E return self.__call_api(resource_path, method, E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py", line 172, in __call_api E response_data = self.request( E ^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py", line 362, in request E return self.rest_client.GET(url, E ^^^^^^^^^^^^^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/rest.py", line 237, in GET E return self.request("GET", url, E ^^^^^^^^^^^^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/rest.py", line 231, in request E raise ApiException(http_resp=r) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py:44: ForbiddenError ____________________ ERROR at setup of test_mtc_98_interop _____________________ self = args = ('GET', '/apis'), kwargs = {}, serialize_response = True serializer = def inner(self, *args, **kwargs): serialize_response = kwargs.pop('serialize', True) serializer = kwargs.pop('serializer', ResourceInstance) try: > resp = func(self, *args, **kwargs) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py:42: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py:235: in request return self.client.call_api( mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py:340: in call_api return self.__call_api(resource_path, method, mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py:172: in __call_api response_data = self.request( mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py:362: in request return self.rest_client.GET(url, mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/rest.py:237: in GET return self.request("GET", url, _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = method = 'GET' url = 'https://api.mtc-source-cro4.cspilp.interop.ccitredhat.com:6443/apis' query_params = [] headers = {'Accept': 'application/json', 'Content-Type': 'application/json', 'User-Agent': 'OpenAPI-Generator/11.0.0/python', 'authorization': 'Bearer '} body = None, post_params = {}, _preload_content = False, _request_timeout = None def request(self, method, url, query_params=None, headers=None, body=None, post_params=None, _preload_content=True, _request_timeout=None): """Perform requests. :param method: http request method :param url: http request url :param query_params: query parameters in the url :param headers: http request headers :param body: request json body, for `application/json` :param post_params: request post parameters, `application/x-www-form-urlencoded` and `multipart/form-data` :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. """ method = method.upper() assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', 'PATCH', 'OPTIONS'] if post_params and body: raise ValueError( "body parameter cannot be used with post_params parameter." ) post_params = post_params or {} headers = headers or {} timeout = None if _request_timeout: if isinstance(_request_timeout, (int, ) if six.PY3 else (int, long)): # noqa: E501,F821 timeout = urllib3.Timeout(total=_request_timeout) elif (isinstance(_request_timeout, tuple) and len(_request_timeout) == 2): timeout = urllib3.Timeout( connect=_request_timeout[0], read=_request_timeout[1]) if 'Content-Type' not in headers: headers['Content-Type'] = 'application/json' try: # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: if query_params: url += '?' + urlencode(query_params) if re.search('json', headers['Content-Type'], re.IGNORECASE): if headers['Content-Type'] == 'application/json-patch+json': if not isinstance(body, list): headers['Content-Type'] = \ 'application/strategic-merge-patch+json' request_body = None if body is not None: request_body = json.dumps(body) r = self.pool_manager.request( method, url, body=request_body, preload_content=_preload_content, timeout=timeout, headers=headers) elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 r = self.pool_manager.request( method, url, fields=post_params, encode_multipart=False, preload_content=_preload_content, timeout=timeout, headers=headers) elif headers['Content-Type'] == 'multipart/form-data': # must del headers['Content-Type'], or the correct # Content-Type which generated by urllib3 will be # overwritten. del headers['Content-Type'] r = self.pool_manager.request( method, url, fields=post_params, encode_multipart=True, preload_content=_preload_content, timeout=timeout, headers=headers) # Pass a `string` parameter directly in the body to support # other content types than Json when `body` argument is # provided in serialized form elif isinstance(body, str): request_body = body r = self.pool_manager.request( method, url, body=request_body, preload_content=_preload_content, timeout=timeout, headers=headers) else: # Cannot generate the request from given parameters msg = """Cannot prepare a request message for provided arguments. Please check that your arguments match declared content type.""" raise ApiException(status=0, reason=msg) # For `GET`, `HEAD` else: r = self.pool_manager.request(method, url, fields=query_params, preload_content=_preload_content, timeout=timeout, headers=headers) except urllib3.exceptions.SSLError as e: msg = "{0}\n{1}".format(type(e).__name__, str(e)) raise ApiException(status=0, reason=msg) if _preload_content: r = RESTResponse(r) # In the python 3, the response.data is bytes. # we need to decode it to string. if six.PY3: r.data = r.data.decode('utf8') # log response body logger.debug("response body: %s", r.data) if not 200 <= r.status <= 299: > raise ApiException(http_resp=r) E kubernetes.client.rest.ApiException: (403) E Reason: Forbidden E HTTP response headers: HTTPHeaderDict({'Audit-Id': 'b0619406-0dbe-40b8-9bd5-13b8636ef873', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains; preload', 'X-Content-Type-Options': 'nosniff', 'X-Kubernetes-Pf-Flowschema-Uid': 'a538c251-7c72-4f62-a4d9-bb550595341f', 'X-Kubernetes-Pf-Prioritylevel-Uid': '36f43f03-b585-4e6c-b971-978beb3d6968', 'Date': 'Mon, 14 Oct 2024 03:49:23 GMT', 'Content-Length': '189'}) E HTTP response body: b'{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"forbidden: User \\"system:anonymous\\" cannot get path \\"/apis\\"","reason":"Forbidden","details":{},"code":403}\n' mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/rest.py:231: ApiException During handling of the above exception, another exception occurred: mtc = pytestconfig = <_pytest.config.Config object at 0x7fc01af64910> request = > @pytest.fixture def src_cluster(mtc, pytestconfig, request): '''This fixture returns always and OpenshiftCluster object connected to the source cluster ''' controller_is_source = pytestconfig.getoption('--controller-is-source') if controller_is_source: src = mtc.get_local_clusters()[0] else: > src = mtc.get_remote_clusters()[0] mtc-e2e-qev2/mtc_tests/fixtures/clusters.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ mtc-e2e-qev2/venv/lib/python3.11/site-packages/mtc/client.py:137: in get_remote_clusters remote_clusters.append(self.get_cluster_by_migcluster(mc, as_helper, as_user_pass)) mtc-e2e-qev2/venv/lib/python3.11/site-packages/mtc/client.py:173: in get_cluster_by_migcluster return self.get_cluster_as_helper_by_migcluster(migcluster) mtc-e2e-qev2/venv/lib/python3.11/site-packages/mtc/client.py:231: in get_cluster_as_helper_by_migcluster default_openshift_cluster = self.get_cluster_as_default_by_migcluster(migcluster) mtc-e2e-qev2/venv/lib/python3.11/site-packages/mtc/client.py:273: in get_cluster_as_default_by_migcluster openshift_cluster.connect_with_token(host, api_key) mtc-e2e-qev2/venv/lib/python3.11/site-packages/mtc/openshift.py:81: in connect_with_token self.client = DynamicClient(kubernetes.client.ApiClient(configuration)) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py:71: in __init__ self.__discoverer = discoverer(self, cache_file) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/discovery.py:259: in __init__ Discoverer.__init__(self, client, cache_file) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/discovery.py:31: in __init__ self.__init_cache() mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/discovery.py:79: in __init_cache self.discover() mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/discovery.py:263: in discover self.__resources = self.parse_api_groups(request_resources=False) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/discovery.py:131: in parse_api_groups groups_response = self.client.request('GET', '/{}'.format(DISCOVERY_PREFIX)).groups _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = args = ('GET', '/apis'), kwargs = {}, serialize_response = True serializer = def inner(self, *args, **kwargs): serialize_response = kwargs.pop('serialize', True) serializer = kwargs.pop('serializer', ResourceInstance) try: resp = func(self, *args, **kwargs) except ApiException as e: > raise api_exception(e) E openshift.dynamic.exceptions.ForbiddenError: 403 E Reason: Forbidden E HTTP response headers: HTTPHeaderDict({'Audit-Id': 'b0619406-0dbe-40b8-9bd5-13b8636ef873', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains; preload', 'X-Content-Type-Options': 'nosniff', 'X-Kubernetes-Pf-Flowschema-Uid': 'a538c251-7c72-4f62-a4d9-bb550595341f', 'X-Kubernetes-Pf-Prioritylevel-Uid': '36f43f03-b585-4e6c-b971-978beb3d6968', 'Date': 'Mon, 14 Oct 2024 03:49:23 GMT', 'Content-Length': '189'}) E HTTP response body: b'{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"forbidden: User \\"system:anonymous\\" cannot get path \\"/apis\\"","reason":"Forbidden","details":{},"code":403}\n' E Original traceback: E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py", line 42, in inner E resp = func(self, *args, **kwargs) E ^^^^^^^^^^^^^^^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py", line 235, in request E return self.client.call_api( E ^^^^^^^^^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py", line 340, in call_api E return self.__call_api(resource_path, method, E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py", line 172, in __call_api E response_data = self.request( E ^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py", line 362, in request E return self.rest_client.GET(url, E ^^^^^^^^^^^^^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/rest.py", line 237, in GET E return self.request("GET", url, E ^^^^^^^^^^^^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/rest.py", line 231, in request E raise ApiException(http_resp=r) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py:44: ForbiddenError ____________________ ERROR at setup of test_mtc_101_interop ____________________ self = args = ('GET', '/apis'), kwargs = {}, serialize_response = True serializer = def inner(self, *args, **kwargs): serialize_response = kwargs.pop('serialize', True) serializer = kwargs.pop('serializer', ResourceInstance) try: > resp = func(self, *args, **kwargs) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py:42: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py:235: in request return self.client.call_api( mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py:340: in call_api return self.__call_api(resource_path, method, mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py:172: in __call_api response_data = self.request( mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py:362: in request return self.rest_client.GET(url, mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/rest.py:237: in GET return self.request("GET", url, _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = method = 'GET' url = 'https://api.mtc-source-cro4.cspilp.interop.ccitredhat.com:6443/apis' query_params = [] headers = {'Accept': 'application/json', 'Content-Type': 'application/json', 'User-Agent': 'OpenAPI-Generator/11.0.0/python', 'authorization': 'Bearer '} body = None, post_params = {}, _preload_content = False, _request_timeout = None def request(self, method, url, query_params=None, headers=None, body=None, post_params=None, _preload_content=True, _request_timeout=None): """Perform requests. :param method: http request method :param url: http request url :param query_params: query parameters in the url :param headers: http request headers :param body: request json body, for `application/json` :param post_params: request post parameters, `application/x-www-form-urlencoded` and `multipart/form-data` :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. """ method = method.upper() assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', 'PATCH', 'OPTIONS'] if post_params and body: raise ValueError( "body parameter cannot be used with post_params parameter." ) post_params = post_params or {} headers = headers or {} timeout = None if _request_timeout: if isinstance(_request_timeout, (int, ) if six.PY3 else (int, long)): # noqa: E501,F821 timeout = urllib3.Timeout(total=_request_timeout) elif (isinstance(_request_timeout, tuple) and len(_request_timeout) == 2): timeout = urllib3.Timeout( connect=_request_timeout[0], read=_request_timeout[1]) if 'Content-Type' not in headers: headers['Content-Type'] = 'application/json' try: # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: if query_params: url += '?' + urlencode(query_params) if re.search('json', headers['Content-Type'], re.IGNORECASE): if headers['Content-Type'] == 'application/json-patch+json': if not isinstance(body, list): headers['Content-Type'] = \ 'application/strategic-merge-patch+json' request_body = None if body is not None: request_body = json.dumps(body) r = self.pool_manager.request( method, url, body=request_body, preload_content=_preload_content, timeout=timeout, headers=headers) elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 r = self.pool_manager.request( method, url, fields=post_params, encode_multipart=False, preload_content=_preload_content, timeout=timeout, headers=headers) elif headers['Content-Type'] == 'multipart/form-data': # must del headers['Content-Type'], or the correct # Content-Type which generated by urllib3 will be # overwritten. del headers['Content-Type'] r = self.pool_manager.request( method, url, fields=post_params, encode_multipart=True, preload_content=_preload_content, timeout=timeout, headers=headers) # Pass a `string` parameter directly in the body to support # other content types than Json when `body` argument is # provided in serialized form elif isinstance(body, str): request_body = body r = self.pool_manager.request( method, url, body=request_body, preload_content=_preload_content, timeout=timeout, headers=headers) else: # Cannot generate the request from given parameters msg = """Cannot prepare a request message for provided arguments. Please check that your arguments match declared content type.""" raise ApiException(status=0, reason=msg) # For `GET`, `HEAD` else: r = self.pool_manager.request(method, url, fields=query_params, preload_content=_preload_content, timeout=timeout, headers=headers) except urllib3.exceptions.SSLError as e: msg = "{0}\n{1}".format(type(e).__name__, str(e)) raise ApiException(status=0, reason=msg) if _preload_content: r = RESTResponse(r) # In the python 3, the response.data is bytes. # we need to decode it to string. if six.PY3: r.data = r.data.decode('utf8') # log response body logger.debug("response body: %s", r.data) if not 200 <= r.status <= 299: > raise ApiException(http_resp=r) E kubernetes.client.rest.ApiException: (403) E Reason: Forbidden E HTTP response headers: HTTPHeaderDict({'Audit-Id': 'eb1ca456-438a-4615-ac0f-07e3f1d750ce', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains; preload', 'X-Content-Type-Options': 'nosniff', 'X-Kubernetes-Pf-Flowschema-Uid': 'a538c251-7c72-4f62-a4d9-bb550595341f', 'X-Kubernetes-Pf-Prioritylevel-Uid': '36f43f03-b585-4e6c-b971-978beb3d6968', 'Date': 'Mon, 14 Oct 2024 03:49:23 GMT', 'Content-Length': '189'}) E HTTP response body: b'{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"forbidden: User \\"system:anonymous\\" cannot get path \\"/apis\\"","reason":"Forbidden","details":{},"code":403}\n' mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/rest.py:231: ApiException During handling of the above exception, another exception occurred: mtc = pytestconfig = <_pytest.config.Config object at 0x7fc01af64910> request = > @pytest.fixture def src_cluster(mtc, pytestconfig, request): '''This fixture returns always and OpenshiftCluster object connected to the source cluster ''' controller_is_source = pytestconfig.getoption('--controller-is-source') if controller_is_source: src = mtc.get_local_clusters()[0] else: > src = mtc.get_remote_clusters()[0] mtc-e2e-qev2/mtc_tests/fixtures/clusters.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ mtc-e2e-qev2/venv/lib/python3.11/site-packages/mtc/client.py:137: in get_remote_clusters remote_clusters.append(self.get_cluster_by_migcluster(mc, as_helper, as_user_pass)) mtc-e2e-qev2/venv/lib/python3.11/site-packages/mtc/client.py:173: in get_cluster_by_migcluster return self.get_cluster_as_helper_by_migcluster(migcluster) mtc-e2e-qev2/venv/lib/python3.11/site-packages/mtc/client.py:231: in get_cluster_as_helper_by_migcluster default_openshift_cluster = self.get_cluster_as_default_by_migcluster(migcluster) mtc-e2e-qev2/venv/lib/python3.11/site-packages/mtc/client.py:273: in get_cluster_as_default_by_migcluster openshift_cluster.connect_with_token(host, api_key) mtc-e2e-qev2/venv/lib/python3.11/site-packages/mtc/openshift.py:81: in connect_with_token self.client = DynamicClient(kubernetes.client.ApiClient(configuration)) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py:71: in __init__ self.__discoverer = discoverer(self, cache_file) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/discovery.py:259: in __init__ Discoverer.__init__(self, client, cache_file) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/discovery.py:31: in __init__ self.__init_cache() mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/discovery.py:79: in __init_cache self.discover() mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/discovery.py:263: in discover self.__resources = self.parse_api_groups(request_resources=False) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/discovery.py:131: in parse_api_groups groups_response = self.client.request('GET', '/{}'.format(DISCOVERY_PREFIX)).groups _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = args = ('GET', '/apis'), kwargs = {}, serialize_response = True serializer = def inner(self, *args, **kwargs): serialize_response = kwargs.pop('serialize', True) serializer = kwargs.pop('serializer', ResourceInstance) try: resp = func(self, *args, **kwargs) except ApiException as e: > raise api_exception(e) E openshift.dynamic.exceptions.ForbiddenError: 403 E Reason: Forbidden E HTTP response headers: HTTPHeaderDict({'Audit-Id': 'eb1ca456-438a-4615-ac0f-07e3f1d750ce', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains; preload', 'X-Content-Type-Options': 'nosniff', 'X-Kubernetes-Pf-Flowschema-Uid': 'a538c251-7c72-4f62-a4d9-bb550595341f', 'X-Kubernetes-Pf-Prioritylevel-Uid': '36f43f03-b585-4e6c-b971-978beb3d6968', 'Date': 'Mon, 14 Oct 2024 03:49:23 GMT', 'Content-Length': '189'}) E HTTP response body: b'{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"forbidden: User \\"system:anonymous\\" cannot get path \\"/apis\\"","reason":"Forbidden","details":{},"code":403}\n' E Original traceback: E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py", line 42, in inner E resp = func(self, *args, **kwargs) E ^^^^^^^^^^^^^^^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py", line 235, in request E return self.client.call_api( E ^^^^^^^^^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py", line 340, in call_api E return self.__call_api(resource_path, method, E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py", line 172, in __call_api E response_data = self.request( E ^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py", line 362, in request E return self.rest_client.GET(url, E ^^^^^^^^^^^^^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/rest.py", line 237, in GET E return self.request("GET", url, E ^^^^^^^^^^^^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/rest.py", line 231, in request E raise ApiException(http_resp=r) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py:44: ForbiddenError ____________________ ERROR at setup of test_mtc_116_interop ____________________ self = args = ('GET', '/apis'), kwargs = {}, serialize_response = True serializer = def inner(self, *args, **kwargs): serialize_response = kwargs.pop('serialize', True) serializer = kwargs.pop('serializer', ResourceInstance) try: > resp = func(self, *args, **kwargs) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py:42: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py:235: in request return self.client.call_api( mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py:340: in call_api return self.__call_api(resource_path, method, mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py:172: in __call_api response_data = self.request( mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py:362: in request return self.rest_client.GET(url, mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/rest.py:237: in GET return self.request("GET", url, _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = method = 'GET' url = 'https://api.mtc-source-cro4.cspilp.interop.ccitredhat.com:6443/apis' query_params = [] headers = {'Accept': 'application/json', 'Content-Type': 'application/json', 'User-Agent': 'OpenAPI-Generator/11.0.0/python', 'authorization': 'Bearer '} body = None, post_params = {}, _preload_content = False, _request_timeout = None def request(self, method, url, query_params=None, headers=None, body=None, post_params=None, _preload_content=True, _request_timeout=None): """Perform requests. :param method: http request method :param url: http request url :param query_params: query parameters in the url :param headers: http request headers :param body: request json body, for `application/json` :param post_params: request post parameters, `application/x-www-form-urlencoded` and `multipart/form-data` :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. """ method = method.upper() assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', 'PATCH', 'OPTIONS'] if post_params and body: raise ValueError( "body parameter cannot be used with post_params parameter." ) post_params = post_params or {} headers = headers or {} timeout = None if _request_timeout: if isinstance(_request_timeout, (int, ) if six.PY3 else (int, long)): # noqa: E501,F821 timeout = urllib3.Timeout(total=_request_timeout) elif (isinstance(_request_timeout, tuple) and len(_request_timeout) == 2): timeout = urllib3.Timeout( connect=_request_timeout[0], read=_request_timeout[1]) if 'Content-Type' not in headers: headers['Content-Type'] = 'application/json' try: # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: if query_params: url += '?' + urlencode(query_params) if re.search('json', headers['Content-Type'], re.IGNORECASE): if headers['Content-Type'] == 'application/json-patch+json': if not isinstance(body, list): headers['Content-Type'] = \ 'application/strategic-merge-patch+json' request_body = None if body is not None: request_body = json.dumps(body) r = self.pool_manager.request( method, url, body=request_body, preload_content=_preload_content, timeout=timeout, headers=headers) elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 r = self.pool_manager.request( method, url, fields=post_params, encode_multipart=False, preload_content=_preload_content, timeout=timeout, headers=headers) elif headers['Content-Type'] == 'multipart/form-data': # must del headers['Content-Type'], or the correct # Content-Type which generated by urllib3 will be # overwritten. del headers['Content-Type'] r = self.pool_manager.request( method, url, fields=post_params, encode_multipart=True, preload_content=_preload_content, timeout=timeout, headers=headers) # Pass a `string` parameter directly in the body to support # other content types than Json when `body` argument is # provided in serialized form elif isinstance(body, str): request_body = body r = self.pool_manager.request( method, url, body=request_body, preload_content=_preload_content, timeout=timeout, headers=headers) else: # Cannot generate the request from given parameters msg = """Cannot prepare a request message for provided arguments. Please check that your arguments match declared content type.""" raise ApiException(status=0, reason=msg) # For `GET`, `HEAD` else: r = self.pool_manager.request(method, url, fields=query_params, preload_content=_preload_content, timeout=timeout, headers=headers) except urllib3.exceptions.SSLError as e: msg = "{0}\n{1}".format(type(e).__name__, str(e)) raise ApiException(status=0, reason=msg) if _preload_content: r = RESTResponse(r) # In the python 3, the response.data is bytes. # we need to decode it to string. if six.PY3: r.data = r.data.decode('utf8') # log response body logger.debug("response body: %s", r.data) if not 200 <= r.status <= 299: > raise ApiException(http_resp=r) E kubernetes.client.rest.ApiException: (403) E Reason: Forbidden E HTTP response headers: HTTPHeaderDict({'Audit-Id': '51de98e9-387a-458a-8303-933f12920498', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains; preload', 'X-Content-Type-Options': 'nosniff', 'X-Kubernetes-Pf-Flowschema-Uid': 'a538c251-7c72-4f62-a4d9-bb550595341f', 'X-Kubernetes-Pf-Prioritylevel-Uid': '36f43f03-b585-4e6c-b971-978beb3d6968', 'Date': 'Mon, 14 Oct 2024 03:49:23 GMT', 'Content-Length': '189'}) E HTTP response body: b'{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"forbidden: User \\"system:anonymous\\" cannot get path \\"/apis\\"","reason":"Forbidden","details":{},"code":403}\n' mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/rest.py:231: ApiException During handling of the above exception, another exception occurred: mtc = pytestconfig = <_pytest.config.Config object at 0x7fc01af64910> request = > @pytest.fixture def src_cluster(mtc, pytestconfig, request): '''This fixture returns always and OpenshiftCluster object connected to the source cluster ''' controller_is_source = pytestconfig.getoption('--controller-is-source') if controller_is_source: src = mtc.get_local_clusters()[0] else: > src = mtc.get_remote_clusters()[0] mtc-e2e-qev2/mtc_tests/fixtures/clusters.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ mtc-e2e-qev2/venv/lib/python3.11/site-packages/mtc/client.py:137: in get_remote_clusters remote_clusters.append(self.get_cluster_by_migcluster(mc, as_helper, as_user_pass)) mtc-e2e-qev2/venv/lib/python3.11/site-packages/mtc/client.py:173: in get_cluster_by_migcluster return self.get_cluster_as_helper_by_migcluster(migcluster) mtc-e2e-qev2/venv/lib/python3.11/site-packages/mtc/client.py:231: in get_cluster_as_helper_by_migcluster default_openshift_cluster = self.get_cluster_as_default_by_migcluster(migcluster) mtc-e2e-qev2/venv/lib/python3.11/site-packages/mtc/client.py:273: in get_cluster_as_default_by_migcluster openshift_cluster.connect_with_token(host, api_key) mtc-e2e-qev2/venv/lib/python3.11/site-packages/mtc/openshift.py:81: in connect_with_token self.client = DynamicClient(kubernetes.client.ApiClient(configuration)) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py:71: in __init__ self.__discoverer = discoverer(self, cache_file) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/discovery.py:259: in __init__ Discoverer.__init__(self, client, cache_file) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/discovery.py:31: in __init__ self.__init_cache() mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/discovery.py:79: in __init_cache self.discover() mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/discovery.py:263: in discover self.__resources = self.parse_api_groups(request_resources=False) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/discovery.py:131: in parse_api_groups groups_response = self.client.request('GET', '/{}'.format(DISCOVERY_PREFIX)).groups _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = args = ('GET', '/apis'), kwargs = {}, serialize_response = True serializer = def inner(self, *args, **kwargs): serialize_response = kwargs.pop('serialize', True) serializer = kwargs.pop('serializer', ResourceInstance) try: resp = func(self, *args, **kwargs) except ApiException as e: > raise api_exception(e) E openshift.dynamic.exceptions.ForbiddenError: 403 E Reason: Forbidden E HTTP response headers: HTTPHeaderDict({'Audit-Id': '51de98e9-387a-458a-8303-933f12920498', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains; preload', 'X-Content-Type-Options': 'nosniff', 'X-Kubernetes-Pf-Flowschema-Uid': 'a538c251-7c72-4f62-a4d9-bb550595341f', 'X-Kubernetes-Pf-Prioritylevel-Uid': '36f43f03-b585-4e6c-b971-978beb3d6968', 'Date': 'Mon, 14 Oct 2024 03:49:23 GMT', 'Content-Length': '189'}) E HTTP response body: b'{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"forbidden: User \\"system:anonymous\\" cannot get path \\"/apis\\"","reason":"Forbidden","details":{},"code":403}\n' E Original traceback: E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py", line 42, in inner E resp = func(self, *args, **kwargs) E ^^^^^^^^^^^^^^^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py", line 235, in request E return self.client.call_api( E ^^^^^^^^^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py", line 340, in call_api E return self.__call_api(resource_path, method, E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py", line 172, in __call_api E response_data = self.request( E ^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py", line 362, in request E return self.rest_client.GET(url, E ^^^^^^^^^^^^^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/rest.py", line 237, in GET E return self.request("GET", url, E ^^^^^^^^^^^^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/rest.py", line 231, in request E raise ApiException(http_resp=r) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py:44: ForbiddenError ____________________ ERROR at setup of test_mtc_147_interop ____________________ self = args = ('GET', '/apis'), kwargs = {}, serialize_response = True serializer = def inner(self, *args, **kwargs): serialize_response = kwargs.pop('serialize', True) serializer = kwargs.pop('serializer', ResourceInstance) try: > resp = func(self, *args, **kwargs) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py:42: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py:235: in request return self.client.call_api( mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py:340: in call_api return self.__call_api(resource_path, method, mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py:172: in __call_api response_data = self.request( mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py:362: in request return self.rest_client.GET(url, mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/rest.py:237: in GET return self.request("GET", url, _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = method = 'GET' url = 'https://api.mtc-source-cro4.cspilp.interop.ccitredhat.com:6443/apis' query_params = [] headers = {'Accept': 'application/json', 'Content-Type': 'application/json', 'User-Agent': 'OpenAPI-Generator/11.0.0/python', 'authorization': 'Bearer '} body = None, post_params = {}, _preload_content = False, _request_timeout = None def request(self, method, url, query_params=None, headers=None, body=None, post_params=None, _preload_content=True, _request_timeout=None): """Perform requests. :param method: http request method :param url: http request url :param query_params: query parameters in the url :param headers: http request headers :param body: request json body, for `application/json` :param post_params: request post parameters, `application/x-www-form-urlencoded` and `multipart/form-data` :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. """ method = method.upper() assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', 'PATCH', 'OPTIONS'] if post_params and body: raise ValueError( "body parameter cannot be used with post_params parameter." ) post_params = post_params or {} headers = headers or {} timeout = None if _request_timeout: if isinstance(_request_timeout, (int, ) if six.PY3 else (int, long)): # noqa: E501,F821 timeout = urllib3.Timeout(total=_request_timeout) elif (isinstance(_request_timeout, tuple) and len(_request_timeout) == 2): timeout = urllib3.Timeout( connect=_request_timeout[0], read=_request_timeout[1]) if 'Content-Type' not in headers: headers['Content-Type'] = 'application/json' try: # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: if query_params: url += '?' + urlencode(query_params) if re.search('json', headers['Content-Type'], re.IGNORECASE): if headers['Content-Type'] == 'application/json-patch+json': if not isinstance(body, list): headers['Content-Type'] = \ 'application/strategic-merge-patch+json' request_body = None if body is not None: request_body = json.dumps(body) r = self.pool_manager.request( method, url, body=request_body, preload_content=_preload_content, timeout=timeout, headers=headers) elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 r = self.pool_manager.request( method, url, fields=post_params, encode_multipart=False, preload_content=_preload_content, timeout=timeout, headers=headers) elif headers['Content-Type'] == 'multipart/form-data': # must del headers['Content-Type'], or the correct # Content-Type which generated by urllib3 will be # overwritten. del headers['Content-Type'] r = self.pool_manager.request( method, url, fields=post_params, encode_multipart=True, preload_content=_preload_content, timeout=timeout, headers=headers) # Pass a `string` parameter directly in the body to support # other content types than Json when `body` argument is # provided in serialized form elif isinstance(body, str): request_body = body r = self.pool_manager.request( method, url, body=request_body, preload_content=_preload_content, timeout=timeout, headers=headers) else: # Cannot generate the request from given parameters msg = """Cannot prepare a request message for provided arguments. Please check that your arguments match declared content type.""" raise ApiException(status=0, reason=msg) # For `GET`, `HEAD` else: r = self.pool_manager.request(method, url, fields=query_params, preload_content=_preload_content, timeout=timeout, headers=headers) except urllib3.exceptions.SSLError as e: msg = "{0}\n{1}".format(type(e).__name__, str(e)) raise ApiException(status=0, reason=msg) if _preload_content: r = RESTResponse(r) # In the python 3, the response.data is bytes. # we need to decode it to string. if six.PY3: r.data = r.data.decode('utf8') # log response body logger.debug("response body: %s", r.data) if not 200 <= r.status <= 299: > raise ApiException(http_resp=r) E kubernetes.client.rest.ApiException: (403) E Reason: Forbidden E HTTP response headers: HTTPHeaderDict({'Audit-Id': '6c909479-3d66-4f8c-b67a-96d4034a5b1a', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains; preload', 'X-Content-Type-Options': 'nosniff', 'X-Kubernetes-Pf-Flowschema-Uid': 'a538c251-7c72-4f62-a4d9-bb550595341f', 'X-Kubernetes-Pf-Prioritylevel-Uid': '36f43f03-b585-4e6c-b971-978beb3d6968', 'Date': 'Mon, 14 Oct 2024 03:49:24 GMT', 'Content-Length': '189'}) E HTTP response body: b'{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"forbidden: User \\"system:anonymous\\" cannot get path \\"/apis\\"","reason":"Forbidden","details":{},"code":403}\n' mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/rest.py:231: ApiException During handling of the above exception, another exception occurred: mtc = pytestconfig = <_pytest.config.Config object at 0x7fc01af64910> request = > @pytest.fixture def src_cluster(mtc, pytestconfig, request): '''This fixture returns always and OpenshiftCluster object connected to the source cluster ''' controller_is_source = pytestconfig.getoption('--controller-is-source') if controller_is_source: src = mtc.get_local_clusters()[0] else: > src = mtc.get_remote_clusters()[0] mtc-e2e-qev2/mtc_tests/fixtures/clusters.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ mtc-e2e-qev2/venv/lib/python3.11/site-packages/mtc/client.py:137: in get_remote_clusters remote_clusters.append(self.get_cluster_by_migcluster(mc, as_helper, as_user_pass)) mtc-e2e-qev2/venv/lib/python3.11/site-packages/mtc/client.py:173: in get_cluster_by_migcluster return self.get_cluster_as_helper_by_migcluster(migcluster) mtc-e2e-qev2/venv/lib/python3.11/site-packages/mtc/client.py:231: in get_cluster_as_helper_by_migcluster default_openshift_cluster = self.get_cluster_as_default_by_migcluster(migcluster) mtc-e2e-qev2/venv/lib/python3.11/site-packages/mtc/client.py:273: in get_cluster_as_default_by_migcluster openshift_cluster.connect_with_token(host, api_key) mtc-e2e-qev2/venv/lib/python3.11/site-packages/mtc/openshift.py:81: in connect_with_token self.client = DynamicClient(kubernetes.client.ApiClient(configuration)) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py:71: in __init__ self.__discoverer = discoverer(self, cache_file) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/discovery.py:259: in __init__ Discoverer.__init__(self, client, cache_file) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/discovery.py:31: in __init__ self.__init_cache() mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/discovery.py:79: in __init_cache self.discover() mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/discovery.py:263: in discover self.__resources = self.parse_api_groups(request_resources=False) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/discovery.py:131: in parse_api_groups groups_response = self.client.request('GET', '/{}'.format(DISCOVERY_PREFIX)).groups _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = args = ('GET', '/apis'), kwargs = {}, serialize_response = True serializer = def inner(self, *args, **kwargs): serialize_response = kwargs.pop('serialize', True) serializer = kwargs.pop('serializer', ResourceInstance) try: resp = func(self, *args, **kwargs) except ApiException as e: > raise api_exception(e) E openshift.dynamic.exceptions.ForbiddenError: 403 E Reason: Forbidden E HTTP response headers: HTTPHeaderDict({'Audit-Id': '6c909479-3d66-4f8c-b67a-96d4034a5b1a', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains; preload', 'X-Content-Type-Options': 'nosniff', 'X-Kubernetes-Pf-Flowschema-Uid': 'a538c251-7c72-4f62-a4d9-bb550595341f', 'X-Kubernetes-Pf-Prioritylevel-Uid': '36f43f03-b585-4e6c-b971-978beb3d6968', 'Date': 'Mon, 14 Oct 2024 03:49:24 GMT', 'Content-Length': '189'}) E HTTP response body: b'{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"forbidden: User \\"system:anonymous\\" cannot get path \\"/apis\\"","reason":"Forbidden","details":{},"code":403}\n' E Original traceback: E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py", line 42, in inner E resp = func(self, *args, **kwargs) E ^^^^^^^^^^^^^^^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py", line 235, in request E return self.client.call_api( E ^^^^^^^^^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py", line 340, in call_api E return self.__call_api(resource_path, method, E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py", line 172, in __call_api E response_data = self.request( E ^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py", line 362, in request E return self.rest_client.GET(url, E ^^^^^^^^^^^^^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/rest.py", line 237, in GET E return self.request("GET", url, E ^^^^^^^^^^^^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/rest.py", line 231, in request E raise ApiException(http_resp=r) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py:44: ForbiddenError ____________________ ERROR at setup of test_mtc_172_interop ____________________ self = args = ('GET', '/apis'), kwargs = {}, serialize_response = True serializer = def inner(self, *args, **kwargs): serialize_response = kwargs.pop('serialize', True) serializer = kwargs.pop('serializer', ResourceInstance) try: > resp = func(self, *args, **kwargs) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py:42: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py:235: in request return self.client.call_api( mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py:340: in call_api return self.__call_api(resource_path, method, mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py:172: in __call_api response_data = self.request( mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py:362: in request return self.rest_client.GET(url, mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/rest.py:237: in GET return self.request("GET", url, _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = method = 'GET' url = 'https://api.mtc-source-cro4.cspilp.interop.ccitredhat.com:6443/apis' query_params = [] headers = {'Accept': 'application/json', 'Content-Type': 'application/json', 'User-Agent': 'OpenAPI-Generator/11.0.0/python', 'authorization': 'Bearer '} body = None, post_params = {}, _preload_content = False, _request_timeout = None def request(self, method, url, query_params=None, headers=None, body=None, post_params=None, _preload_content=True, _request_timeout=None): """Perform requests. :param method: http request method :param url: http request url :param query_params: query parameters in the url :param headers: http request headers :param body: request json body, for `application/json` :param post_params: request post parameters, `application/x-www-form-urlencoded` and `multipart/form-data` :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. """ method = method.upper() assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', 'PATCH', 'OPTIONS'] if post_params and body: raise ValueError( "body parameter cannot be used with post_params parameter." ) post_params = post_params or {} headers = headers or {} timeout = None if _request_timeout: if isinstance(_request_timeout, (int, ) if six.PY3 else (int, long)): # noqa: E501,F821 timeout = urllib3.Timeout(total=_request_timeout) elif (isinstance(_request_timeout, tuple) and len(_request_timeout) == 2): timeout = urllib3.Timeout( connect=_request_timeout[0], read=_request_timeout[1]) if 'Content-Type' not in headers: headers['Content-Type'] = 'application/json' try: # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: if query_params: url += '?' + urlencode(query_params) if re.search('json', headers['Content-Type'], re.IGNORECASE): if headers['Content-Type'] == 'application/json-patch+json': if not isinstance(body, list): headers['Content-Type'] = \ 'application/strategic-merge-patch+json' request_body = None if body is not None: request_body = json.dumps(body) r = self.pool_manager.request( method, url, body=request_body, preload_content=_preload_content, timeout=timeout, headers=headers) elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 r = self.pool_manager.request( method, url, fields=post_params, encode_multipart=False, preload_content=_preload_content, timeout=timeout, headers=headers) elif headers['Content-Type'] == 'multipart/form-data': # must del headers['Content-Type'], or the correct # Content-Type which generated by urllib3 will be # overwritten. del headers['Content-Type'] r = self.pool_manager.request( method, url, fields=post_params, encode_multipart=True, preload_content=_preload_content, timeout=timeout, headers=headers) # Pass a `string` parameter directly in the body to support # other content types than Json when `body` argument is # provided in serialized form elif isinstance(body, str): request_body = body r = self.pool_manager.request( method, url, body=request_body, preload_content=_preload_content, timeout=timeout, headers=headers) else: # Cannot generate the request from given parameters msg = """Cannot prepare a request message for provided arguments. Please check that your arguments match declared content type.""" raise ApiException(status=0, reason=msg) # For `GET`, `HEAD` else: r = self.pool_manager.request(method, url, fields=query_params, preload_content=_preload_content, timeout=timeout, headers=headers) except urllib3.exceptions.SSLError as e: msg = "{0}\n{1}".format(type(e).__name__, str(e)) raise ApiException(status=0, reason=msg) if _preload_content: r = RESTResponse(r) # In the python 3, the response.data is bytes. # we need to decode it to string. if six.PY3: r.data = r.data.decode('utf8') # log response body logger.debug("response body: %s", r.data) if not 200 <= r.status <= 299: > raise ApiException(http_resp=r) E kubernetes.client.rest.ApiException: (403) E Reason: Forbidden E HTTP response headers: HTTPHeaderDict({'Audit-Id': 'f58bd391-04c2-4ccf-9746-2877708438a2', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains; preload', 'X-Content-Type-Options': 'nosniff', 'X-Kubernetes-Pf-Flowschema-Uid': 'a538c251-7c72-4f62-a4d9-bb550595341f', 'X-Kubernetes-Pf-Prioritylevel-Uid': '36f43f03-b585-4e6c-b971-978beb3d6968', 'Date': 'Mon, 14 Oct 2024 03:49:24 GMT', 'Content-Length': '189'}) E HTTP response body: b'{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"forbidden: User \\"system:anonymous\\" cannot get path \\"/apis\\"","reason":"Forbidden","details":{},"code":403}\n' mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/rest.py:231: ApiException During handling of the above exception, another exception occurred: mtc = pytestconfig = <_pytest.config.Config object at 0x7fc01af64910> request = > @pytest.fixture def src_cluster(mtc, pytestconfig, request): '''This fixture returns always and OpenshiftCluster object connected to the source cluster ''' controller_is_source = pytestconfig.getoption('--controller-is-source') if controller_is_source: src = mtc.get_local_clusters()[0] else: > src = mtc.get_remote_clusters()[0] mtc-e2e-qev2/mtc_tests/fixtures/clusters.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ mtc-e2e-qev2/venv/lib/python3.11/site-packages/mtc/client.py:137: in get_remote_clusters remote_clusters.append(self.get_cluster_by_migcluster(mc, as_helper, as_user_pass)) mtc-e2e-qev2/venv/lib/python3.11/site-packages/mtc/client.py:173: in get_cluster_by_migcluster return self.get_cluster_as_helper_by_migcluster(migcluster) mtc-e2e-qev2/venv/lib/python3.11/site-packages/mtc/client.py:231: in get_cluster_as_helper_by_migcluster default_openshift_cluster = self.get_cluster_as_default_by_migcluster(migcluster) mtc-e2e-qev2/venv/lib/python3.11/site-packages/mtc/client.py:273: in get_cluster_as_default_by_migcluster openshift_cluster.connect_with_token(host, api_key) mtc-e2e-qev2/venv/lib/python3.11/site-packages/mtc/openshift.py:81: in connect_with_token self.client = DynamicClient(kubernetes.client.ApiClient(configuration)) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py:71: in __init__ self.__discoverer = discoverer(self, cache_file) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/discovery.py:259: in __init__ Discoverer.__init__(self, client, cache_file) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/discovery.py:31: in __init__ self.__init_cache() mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/discovery.py:79: in __init_cache self.discover() mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/discovery.py:263: in discover self.__resources = self.parse_api_groups(request_resources=False) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/discovery.py:131: in parse_api_groups groups_response = self.client.request('GET', '/{}'.format(DISCOVERY_PREFIX)).groups _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = args = ('GET', '/apis'), kwargs = {}, serialize_response = True serializer = def inner(self, *args, **kwargs): serialize_response = kwargs.pop('serialize', True) serializer = kwargs.pop('serializer', ResourceInstance) try: resp = func(self, *args, **kwargs) except ApiException as e: > raise api_exception(e) E openshift.dynamic.exceptions.ForbiddenError: 403 E Reason: Forbidden E HTTP response headers: HTTPHeaderDict({'Audit-Id': 'f58bd391-04c2-4ccf-9746-2877708438a2', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains; preload', 'X-Content-Type-Options': 'nosniff', 'X-Kubernetes-Pf-Flowschema-Uid': 'a538c251-7c72-4f62-a4d9-bb550595341f', 'X-Kubernetes-Pf-Prioritylevel-Uid': '36f43f03-b585-4e6c-b971-978beb3d6968', 'Date': 'Mon, 14 Oct 2024 03:49:24 GMT', 'Content-Length': '189'}) E HTTP response body: b'{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"forbidden: User \\"system:anonymous\\" cannot get path \\"/apis\\"","reason":"Forbidden","details":{},"code":403}\n' E Original traceback: E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py", line 42, in inner E resp = func(self, *args, **kwargs) E ^^^^^^^^^^^^^^^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py", line 235, in request E return self.client.call_api( E ^^^^^^^^^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py", line 340, in call_api E return self.__call_api(resource_path, method, E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py", line 172, in __call_api E response_data = self.request( E ^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py", line 362, in request E return self.rest_client.GET(url, E ^^^^^^^^^^^^^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/rest.py", line 237, in GET E return self.request("GET", url, E ^^^^^^^^^^^^^^^^^^^^^^^^ E E File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/rest.py", line 231, in request E raise ApiException(http_resp=r) mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py:44: ForbiddenError =============================== warnings summary =============================== mtc_tests/tests/test_interop.py: 19 warnings /mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/rest.py:308: DeprecationWarning: HTTPResponse.getheaders() is deprecated and will be removed in urllib3 v2.1.0. Instead access HTTPResponse.headers directly. self.headers = http_resp.getheaders() -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html -------------- generated xml file: /mtc-e2e-qev2/junit-report.xml -------------- =========================== short test summary info ============================ ERROR mtc-e2e-qev2/mtc_tests/tests/test_interop.py::test_mtc_87_interop - openshift.dynamic.exceptions.ForbiddenError: 403 Reason: Forbidden HTTP response headers: HTTPHeaderDict({'Audit-Id': 'ef2dc559-4847-4160-b34b-2bd8e86eae3b', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains; preload', 'X-Content-Type-Options': 'nosniff', 'X-Kubernetes-Pf-Flowschema-Uid': 'a538c251-7c72-4f62-a4d9-bb550595341f', 'X-Kubernetes-Pf-Prioritylevel-Uid': '36f43f03-b585-4e6c-b971-978beb3d6968', 'Date': 'Mon, 14 Oct 2024 03:49:22 GMT', 'Content-Length': '189'}) HTTP response body: b'{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"forbidden: User \\"system:anonymous\\" cannot get path \\"/apis\\"","reason":"Forbidden","details":{},"code":403}\n' Original traceback: File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py", line 42, in inner resp = func(self, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py", line 235, in request return self.client.call_api( ^^^^^^^^^^^^^^^^^^^^^ File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py", line 340, in call_api return self.__call_api(resource_path, method, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py", line 172, in __call_api response_data = self.request( ^^^^^^^^^^^^^ File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py", line 362, in request return self.rest_client.GET(url, ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/rest.py", line 237, in GET return self.request("GET", url, ^^^^^^^^^^^^^^^^^^^^^^^^ File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/rest.py", line 231, in request raise ApiException(http_resp=r) ERROR mtc-e2e-qev2/mtc_tests/tests/test_interop.py::test_mtc_98_interop - openshift.dynamic.exceptions.ForbiddenError: 403 Reason: Forbidden HTTP response headers: HTTPHeaderDict({'Audit-Id': 'b0619406-0dbe-40b8-9bd5-13b8636ef873', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains; preload', 'X-Content-Type-Options': 'nosniff', 'X-Kubernetes-Pf-Flowschema-Uid': 'a538c251-7c72-4f62-a4d9-bb550595341f', 'X-Kubernetes-Pf-Prioritylevel-Uid': '36f43f03-b585-4e6c-b971-978beb3d6968', 'Date': 'Mon, 14 Oct 2024 03:49:23 GMT', 'Content-Length': '189'}) HTTP response body: b'{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"forbidden: User \\"system:anonymous\\" cannot get path \\"/apis\\"","reason":"Forbidden","details":{},"code":403}\n' Original traceback: File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py", line 42, in inner resp = func(self, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py", line 235, in request return self.client.call_api( ^^^^^^^^^^^^^^^^^^^^^ File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py", line 340, in call_api return self.__call_api(resource_path, method, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py", line 172, in __call_api response_data = self.request( ^^^^^^^^^^^^^ File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py", line 362, in request return self.rest_client.GET(url, ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/rest.py", line 237, in GET return self.request("GET", url, ^^^^^^^^^^^^^^^^^^^^^^^^ File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/rest.py", line 231, in request raise ApiException(http_resp=r) ERROR mtc-e2e-qev2/mtc_tests/tests/test_interop.py::test_mtc_101_interop - openshift.dynamic.exceptions.ForbiddenError: 403 Reason: Forbidden HTTP response headers: HTTPHeaderDict({'Audit-Id': 'eb1ca456-438a-4615-ac0f-07e3f1d750ce', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains; preload', 'X-Content-Type-Options': 'nosniff', 'X-Kubernetes-Pf-Flowschema-Uid': 'a538c251-7c72-4f62-a4d9-bb550595341f', 'X-Kubernetes-Pf-Prioritylevel-Uid': '36f43f03-b585-4e6c-b971-978beb3d6968', 'Date': 'Mon, 14 Oct 2024 03:49:23 GMT', 'Content-Length': '189'}) HTTP response body: b'{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"forbidden: User \\"system:anonymous\\" cannot get path \\"/apis\\"","reason":"Forbidden","details":{},"code":403}\n' Original traceback: File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py", line 42, in inner resp = func(self, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py", line 235, in request return self.client.call_api( ^^^^^^^^^^^^^^^^^^^^^ File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py", line 340, in call_api return self.__call_api(resource_path, method, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py", line 172, in __call_api response_data = self.request( ^^^^^^^^^^^^^ File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py", line 362, in request return self.rest_client.GET(url, ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/rest.py", line 237, in GET return self.request("GET", url, ^^^^^^^^^^^^^^^^^^^^^^^^ File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/rest.py", line 231, in request raise ApiException(http_resp=r) ERROR mtc-e2e-qev2/mtc_tests/tests/test_interop.py::test_mtc_116_interop - openshift.dynamic.exceptions.ForbiddenError: 403 Reason: Forbidden HTTP response headers: HTTPHeaderDict({'Audit-Id': '51de98e9-387a-458a-8303-933f12920498', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains; preload', 'X-Content-Type-Options': 'nosniff', 'X-Kubernetes-Pf-Flowschema-Uid': 'a538c251-7c72-4f62-a4d9-bb550595341f', 'X-Kubernetes-Pf-Prioritylevel-Uid': '36f43f03-b585-4e6c-b971-978beb3d6968', 'Date': 'Mon, 14 Oct 2024 03:49:23 GMT', 'Content-Length': '189'}) HTTP response body: b'{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"forbidden: User \\"system:anonymous\\" cannot get path \\"/apis\\"","reason":"Forbidden","details":{},"code":403}\n' Original traceback: File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py", line 42, in inner resp = func(self, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py", line 235, in request return self.client.call_api( ^^^^^^^^^^^^^^^^^^^^^ File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py", line 340, in call_api return self.__call_api(resource_path, method, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py", line 172, in __call_api response_data = self.request( ^^^^^^^^^^^^^ File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py", line 362, in request return self.rest_client.GET(url, ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/rest.py", line 237, in GET return self.request("GET", url, ^^^^^^^^^^^^^^^^^^^^^^^^ File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/rest.py", line 231, in request raise ApiException(http_resp=r) ERROR mtc-e2e-qev2/mtc_tests/tests/test_interop.py::test_mtc_147_interop - openshift.dynamic.exceptions.ForbiddenError: 403 Reason: Forbidden HTTP response headers: HTTPHeaderDict({'Audit-Id': '6c909479-3d66-4f8c-b67a-96d4034a5b1a', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains; preload', 'X-Content-Type-Options': 'nosniff', 'X-Kubernetes-Pf-Flowschema-Uid': 'a538c251-7c72-4f62-a4d9-bb550595341f', 'X-Kubernetes-Pf-Prioritylevel-Uid': '36f43f03-b585-4e6c-b971-978beb3d6968', 'Date': 'Mon, 14 Oct 2024 03:49:24 GMT', 'Content-Length': '189'}) HTTP response body: b'{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"forbidden: User \\"system:anonymous\\" cannot get path \\"/apis\\"","reason":"Forbidden","details":{},"code":403}\n' Original traceback: File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py", line 42, in inner resp = func(self, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py", line 235, in request return self.client.call_api( ^^^^^^^^^^^^^^^^^^^^^ File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py", line 340, in call_api return self.__call_api(resource_path, method, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py", line 172, in __call_api response_data = self.request( ^^^^^^^^^^^^^ File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py", line 362, in request return self.rest_client.GET(url, ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/rest.py", line 237, in GET return self.request("GET", url, ^^^^^^^^^^^^^^^^^^^^^^^^ File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/rest.py", line 231, in request raise ApiException(http_resp=r) ERROR mtc-e2e-qev2/mtc_tests/tests/test_interop.py::test_mtc_172_interop - openshift.dynamic.exceptions.ForbiddenError: 403 Reason: Forbidden HTTP response headers: HTTPHeaderDict({'Audit-Id': 'f58bd391-04c2-4ccf-9746-2877708438a2', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains; preload', 'X-Content-Type-Options': 'nosniff', 'X-Kubernetes-Pf-Flowschema-Uid': 'a538c251-7c72-4f62-a4d9-bb550595341f', 'X-Kubernetes-Pf-Prioritylevel-Uid': '36f43f03-b585-4e6c-b971-978beb3d6968', 'Date': 'Mon, 14 Oct 2024 03:49:24 GMT', 'Content-Length': '189'}) HTTP response body: b'{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"forbidden: User \\"system:anonymous\\" cannot get path \\"/apis\\"","reason":"Forbidden","details":{},"code":403}\n' Original traceback: File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py", line 42, in inner resp = func(self, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/openshift/dynamic/client.py", line 235, in request return self.client.call_api( ^^^^^^^^^^^^^^^^^^^^^ File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py", line 340, in call_api return self.__call_api(resource_path, method, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py", line 172, in __call_api response_data = self.request( ^^^^^^^^^^^^^ File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/api_client.py", line 362, in request return self.rest_client.GET(url, ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/rest.py", line 237, in GET return self.request("GET", url, ^^^^^^^^^^^^^^^^^^^^^^^^ File "/mtc-e2e-qev2/venv/lib/python3.11/site-packages/kubernetes/client/rest.py", line 231, in request raise ApiException(http_resp=r) ======================== 19 warnings, 6 errors in 3.10s ======================== Copying /mtc-e2e-qev2/junit-report.xml to /logs/artifacts/junit_mtc_interop_results.xml...