Moving oc binary to /usr/bin/oc Extracting cluster data, mtc-apps-deployer, and mtc-python-client. ./ ./aws/ ./aws/mtc-source-c2hl/ ./aws/mtc-source-c2hl/auth/ ./aws/mtc-source-c2hl/auth/kubeconfig ./aws/mtc-source-c2hl/auth/kubeadmin-password ./aws/mtc-source-c2hl/cluster_data.yaml ./aws/mtc-source-c2hl/.clusterapi_output/ ./aws/mtc-source-c2hl/.clusterapi_output/envtest.kubeconfig ./aws/mtc-source-c2hl/.clusterapi_output/Namespace--openshift-cluster-api-guests.yaml ./aws/mtc-source-c2hl/.clusterapi_output/AWSClusterControllerIdentity--default.yaml ./aws/mtc-source-c2hl/.clusterapi_output/Cluster-openshift-cluster-api-guests-mtc-source-c2hl-p86f4.yaml ./aws/mtc-source-c2hl/.clusterapi_output/AWSCluster-openshift-cluster-api-guests-mtc-source-c2hl-p86f4.yaml ./aws/mtc-source-c2hl/.clusterapi_output/AWSMachine-openshift-cluster-api-guests-mtc-source-c2hl-p86f4-bootstrap.yaml ./aws/mtc-source-c2hl/.clusterapi_output/AWSMachine-openshift-cluster-api-guests-mtc-source-c2hl-p86f4-master-0.yaml ./aws/mtc-source-c2hl/.clusterapi_output/AWSMachine-openshift-cluster-api-guests-mtc-source-c2hl-p86f4-master-1.yaml ./aws/mtc-source-c2hl/.clusterapi_output/AWSMachine-openshift-cluster-api-guests-mtc-source-c2hl-p86f4-master-2.yaml ./aws/mtc-source-c2hl/.clusterapi_output/Machine-openshift-cluster-api-guests-mtc-source-c2hl-p86f4-bootstrap.yaml ./aws/mtc-source-c2hl/.clusterapi_output/Machine-openshift-cluster-api-guests-mtc-source-c2hl-p86f4-master-0.yaml ./aws/mtc-source-c2hl/.clusterapi_output/Machine-openshift-cluster-api-guests-mtc-source-c2hl-p86f4-master-1.yaml ./aws/mtc-source-c2hl/.clusterapi_output/Machine-openshift-cluster-api-guests-mtc-source-c2hl-p86f4-master-2.yaml ./aws/mtc-source-c2hl/.clusterapi_output/Secret-openshift-cluster-api-guests-mtc-source-c2hl-p86f4-bootstrap.yaml ./aws/mtc-source-c2hl/.clusterapi_output/Secret-openshift-cluster-api-guests-mtc-source-c2hl-p86f4-master.yaml ./aws/mtc-target-kavp/ ./aws/mtc-target-kavp/auth/ ./aws/mtc-target-kavp/auth/kubeconfig ./aws/mtc-target-kavp/auth/kubeadmin-password ./aws/mtc-target-kavp/cluster_data.yaml ./aws/mtc-target-kavp/.clusterapi_output/ ./aws/mtc-target-kavp/.clusterapi_output/envtest.kubeconfig ./aws/mtc-target-kavp/.clusterapi_output/Namespace--openshift-cluster-api-guests.yaml ./aws/mtc-target-kavp/.clusterapi_output/AWSClusterControllerIdentity--default.yaml ./aws/mtc-target-kavp/.clusterapi_output/Cluster-openshift-cluster-api-guests-mtc-target-kavp-gqd8s.yaml ./aws/mtc-target-kavp/.clusterapi_output/AWSCluster-openshift-cluster-api-guests-mtc-target-kavp-gqd8s.yaml ./aws/mtc-target-kavp/.clusterapi_output/AWSMachine-openshift-cluster-api-guests-mtc-target-kavp-gqd8s-bootstrap.yaml ./aws/mtc-target-kavp/.clusterapi_output/AWSMachine-openshift-cluster-api-guests-mtc-target-kavp-gqd8s-master-0.yaml ./aws/mtc-target-kavp/.clusterapi_output/AWSMachine-openshift-cluster-api-guests-mtc-target-kavp-gqd8s-master-1.yaml ./aws/mtc-target-kavp/.clusterapi_output/AWSMachine-openshift-cluster-api-guests-mtc-target-kavp-gqd8s-master-2.yaml ./aws/mtc-target-kavp/.clusterapi_output/Machine-openshift-cluster-api-guests-mtc-target-kavp-gqd8s-bootstrap.yaml ./aws/mtc-target-kavp/.clusterapi_output/Machine-openshift-cluster-api-guests-mtc-target-kavp-gqd8s-master-0.yaml ./aws/mtc-target-kavp/.clusterapi_output/Machine-openshift-cluster-api-guests-mtc-target-kavp-gqd8s-master-1.yaml ./aws/mtc-target-kavp/.clusterapi_output/Machine-openshift-cluster-api-guests-mtc-target-kavp-gqd8s-master-2.yaml ./aws/mtc-target-kavp/.clusterapi_output/Secret-openshift-cluster-api-guests-mtc-target-kavp-gqd8s-bootstrap.yaml ./aws/mtc-target-kavp/.clusterapi_output/Secret-openshift-cluster-api-guests-mtc-target-kavp-gqd8s-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.2.2-py3-none-any.whl.metadata (7.6 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 38.4 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-3.7.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 67.4 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.0,>=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.1-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.3.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (33 kB) Collecting idna<4,>=2.5 (from requests->-r /mtc-e2e-qev2/requirements.txt (line 6)) Downloading idna-3.7-py3-none-any.whl.metadata (9.9 kB) Collecting urllib3<3,>=1.21.1 (from requests->-r /mtc-e2e-qev2/requirements.txt (line 6)) Downloading urllib3-2.2.2-py3-none-any.whl.metadata (6.4 kB) Collecting certifi>=2017.4.17 (from requests->-r /mtc-e2e-qev2/requirements.txt (line 6)) Downloading certifi-2024.7.4-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.0-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.3-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-42.0.8-cp39-abi3-manylinux_2_28_x86_64.whl.metadata (5.3 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.8-py2.py3-none-any.whl.metadata (5.1 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.15.4-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.2.2-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-70.3.0-py3-none-any.whl.metadata (5.8 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.16.0-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-2.1.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (3.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.2.2-py3-none-any.whl (339 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 339.9/339.9 kB 24.7 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 6.8 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 6.1 MB/s eta 0:00:00 Downloading pre_commit-3.7.1-py2.py3-none-any.whl (204 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 204.3/204.3 kB 16.3 MB/s eta 0:00:00 Downloading certifi-2024.7.4-py3-none-any.whl (162 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 163.0/163.0 kB 12.7 MB/s eta 0:00:00 Downloading cfgv-3.4.0-py2.py3-none-any.whl (7.2 kB) Downloading charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (140 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 140.3/140.3 kB 12.1 MB/s eta 0:00:00 Downloading identify-2.6.0-py2.py3-none-any.whl (98 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 99.0/99.0 kB 7.4 MB/s eta 0:00:00 Downloading idna-3.7-py3-none-any.whl (66 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 66.8/66.8 kB 3.9 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 3.7 MB/s eta 0:00:00 Downloading pexpect-4.9.0-py2.py3-none-any.whl (63 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 63.8/63.8 kB 5.0 MB/s eta 0:00:00 Downloading pluggy-1.5.0-py3-none-any.whl (20 kB) Downloading PyYAML-6.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (757 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 757.7/757.7 kB 26.0 MB/s eta 0:00:00 Downloading urllib3-2.2.2-py3-none-any.whl (121 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 121.4/121.4 kB 4.1 MB/s eta 0:00:00 Downloading virtualenv-20.26.3-py3-none-any.whl (5.7 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.7/5.7 MB 84.4 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.8-py2.py3-none-any.whl (468 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 468.9/468.9 kB 14.9 MB/s eta 0:00:00 Downloading filelock-3.15.4-py3-none-any.whl (16 kB) Downloading lockfile-0.12.2-py2.py3-none-any.whl (13 kB) Downloading platformdirs-4.2.2-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-70.3.0-py3-none-any.whl (931 kB) Downloading cryptography-42.0.8-cp39-abi3-manylinux_2_28_x86_64.whl (3.9 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 59.1 MB/s eta 0:00:00 Downloading docutils-0.21.2-py3-none-any.whl (587 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 587.4/587.4 kB 10.2 MB/s eta 0:00:00 Downloading jinja2-3.1.4-py3-none-any.whl (133 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 133.3/133.3 kB 8.9 MB/s eta 0:00:00 Downloading cffi-1.16.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (464 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 464.8/464.8 kB 28.2 MB/s eta 0:00:00 Downloading MarkupSafe-2.1.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (28 kB) Downloading pycparser-2.22-py3-none-any.whl (117 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 117.6/117.6 kB 3.3 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=05396272594c20d3723db60232576ab58974d7383114e5c92831dff66c3031cf 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=1960954 sha256=8c0557eeda216f054baf529b54b5a4491fcaaeaf42cd55f65a294ab7de6c9c10 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-2.1.5 ansible-4.4.0 ansible-core-2.11.12 ansible-runner-2.4.0 certifi-2024.7.4 cffi-1.16.0 cfgv-3.4.0 charset-normalizer-3.3.2 cryptography-42.0.8 distlib-0.3.8 docutils-0.21.2 filelock-3.15.4 identify-2.6.0 idna-3.7 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.2.2 pluggy-1.5.0 pre-commit-3.7.1 ptyprocess-0.7.0 pycparser-2.22 pytest-8.2.2 pytest-rerunfailures-14.0 python-daemon-3.0.1 pyyaml-6.0.1 requests-2.32.3 resolvelib-0.5.4 setuptools-65.5.0 urllib3-2.2.2 virtualenv-20.26.3 [notice] A new release of pip is available: 24.0 -> 24.1.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=87483 sha256=31517cf8f39452141cd7a1c9ad5f1df550541d1a863b1b79010b77eba35eca9b 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.1.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.7.4) 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.1) Collecting google-auth>=1.0.1 (from kubernetes==11.0.0->mtc==0.0.1) Downloading google_auth-2.32.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.2) 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) (2.1.5) Requirement already satisfied: charset-normalizer<4,>=2 in /mtc-e2e-qev2/venv/lib/python3.11/site-packages (from requests->mtc==0.0.1) (3.3.2) Requirement already satisfied: idna<4,>=2.5 in /mtc-e2e-qev2/venv/lib/python3.11/site-packages (from requests->mtc==0.0.1) (3.7) Collecting cachetools<6.0,>=2.0.0 (from google-auth>=1.0.1->kubernetes==11.0.0->mtc==0.0.1) Downloading cachetools-5.3.3-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.0-py3-none-any.whl.metadata (3.4 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.0-py2.py3-none-any.whl.metadata (8.3 kB) Downloading kubernetes-11.0.0-py3-none-any.whl (1.5 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.5/1.5 MB 26.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 8.0 MB/s eta 0:00:00 Downloading google_auth-2.32.0-py2.py3-none-any.whl (195 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 195.5/195.5 kB 5.5 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 5.5 MB/s eta 0:00:00 Downloading ruamel.yaml-0.18.6-py3-none-any.whl (117 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 117.8/117.8 kB 4.4 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 1.8 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.3.3-py3-none-any.whl (9.3 kB) Downloading oauthlib-3.2.2-py3-none-any.whl (151 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 151.7/151.7 kB 4.6 MB/s eta 0:00:00 Downloading pyasn1_modules-0.4.0-py3-none-any.whl (181 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 181.2/181.2 kB 4.9 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 16.5 MB/s eta 0:00:00 Downloading pyasn1-0.6.0-py2.py3-none-any.whl (85 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 85.3/85.3 kB 2.4 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=31167 sha256=17b1a7ef45e4f2c20feee5897e82517a18e3084c9954b8bd9b6c09e4edf6e664 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=bc9b9fd155a04f909ea96d53f6bfb854f89ad40414a6c9fba8ff40f41eb2b924 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.3.3 google-auth-2.32.0 kubernetes-11.0.0 mtc-0.0.1 oauthlib-3.2.2 openshift-0.11.2 pyasn1-0.6.0 pyasn1-modules-0.4.0 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.1.2 [notice] To update, run: pip install --upgrade pip Logging into target cluster. Login successful. You have access to 71 projects, the list has been suppressed. You can list all projects with 'oc projects' Using project "default". Executing tests. ============================= test session starts ============================== platform linux -- Python 3.11.9, pytest-8.2.2, 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 ------------------------------ 17:11:45.090 - 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-c2hl.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': '6c5ab39d-1127-4c36-b07f-731e57ad5448', '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': '65323c06-a6a6-4041-9103-f9d7a1de6f9e', 'X-Kubernetes-Pf-Prioritylevel-Uid': '657271c7-6f1a-4fd5-ac0c-4ef79cc320b5', 'Date': 'Tue, 09 Jul 2024 17:11:44 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 0x7f12e9ac5490> 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': '6c5ab39d-1127-4c36-b07f-731e57ad5448', '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': '65323c06-a6a6-4041-9103-f9d7a1de6f9e', 'X-Kubernetes-Pf-Prioritylevel-Uid': '657271c7-6f1a-4fd5-ac0c-4ef79cc320b5', 'Date': 'Tue, 09 Jul 2024 17:11:44 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 ------------------------------ 17:11:45.090 - INFO: mtc-e2e-qev2/mtc_tests/tests/test_interop.py::test_mtc_98_interop ERROR ------------------------------ live log logreport ------------------------------ 17:11:45.404 - 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-c2hl.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': '141fd7d6-e96d-4187-b803-5e9addc92933', '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': '65323c06-a6a6-4041-9103-f9d7a1de6f9e', 'X-Kubernetes-Pf-Prioritylevel-Uid': '657271c7-6f1a-4fd5-ac0c-4ef79cc320b5', 'Date': 'Tue, 09 Jul 2024 17:11:45 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 0x7f12e9ac5490> 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': '141fd7d6-e96d-4187-b803-5e9addc92933', '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': '65323c06-a6a6-4041-9103-f9d7a1de6f9e', 'X-Kubernetes-Pf-Prioritylevel-Uid': '657271c7-6f1a-4fd5-ac0c-4ef79cc320b5', 'Date': 'Tue, 09 Jul 2024 17:11:45 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 ------------------------------ 17:11:45.405 - INFO: mtc-e2e-qev2/mtc_tests/tests/test_interop.py::test_mtc_101_interop ERROR ------------------------------ live log logreport ------------------------------ 17:11:45.680 - 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-c2hl.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': 'cca5fdb8-1c15-4302-95d0-72370d72fbd8', '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': '65323c06-a6a6-4041-9103-f9d7a1de6f9e', 'X-Kubernetes-Pf-Prioritylevel-Uid': '657271c7-6f1a-4fd5-ac0c-4ef79cc320b5', 'Date': 'Tue, 09 Jul 2024 17:11:45 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 0x7f12e9ac5490> 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': 'cca5fdb8-1c15-4302-95d0-72370d72fbd8', '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': '65323c06-a6a6-4041-9103-f9d7a1de6f9e', 'X-Kubernetes-Pf-Prioritylevel-Uid': '657271c7-6f1a-4fd5-ac0c-4ef79cc320b5', 'Date': 'Tue, 09 Jul 2024 17:11:45 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 ------------------------------ 17:11:45.681 - INFO: mtc-e2e-qev2/mtc_tests/tests/test_interop.py::test_mtc_116_interop ERROR ------------------------------ live log logreport ------------------------------ 17:11:45.946 - 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-c2hl.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': '5d571377-add9-4cf8-8190-7be89bd2d0da', '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': '65323c06-a6a6-4041-9103-f9d7a1de6f9e', 'X-Kubernetes-Pf-Prioritylevel-Uid': '657271c7-6f1a-4fd5-ac0c-4ef79cc320b5', 'Date': 'Tue, 09 Jul 2024 17:11:45 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 0x7f12e9ac5490> 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': '5d571377-add9-4cf8-8190-7be89bd2d0da', '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': '65323c06-a6a6-4041-9103-f9d7a1de6f9e', 'X-Kubernetes-Pf-Prioritylevel-Uid': '657271c7-6f1a-4fd5-ac0c-4ef79cc320b5', 'Date': 'Tue, 09 Jul 2024 17:11:45 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 ------------------------------ 17:11:45.946 - INFO: mtc-e2e-qev2/mtc_tests/tests/test_interop.py::test_mtc_147_interop ERROR ------------------------------ live log logreport ------------------------------ 17:11:46.251 - 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-c2hl.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': 'de638736-790d-4233-9e70-802ea98379d7', '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': '65323c06-a6a6-4041-9103-f9d7a1de6f9e', 'X-Kubernetes-Pf-Prioritylevel-Uid': '657271c7-6f1a-4fd5-ac0c-4ef79cc320b5', 'Date': 'Tue, 09 Jul 2024 17:11:46 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 0x7f12e9ac5490> 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': 'de638736-790d-4233-9e70-802ea98379d7', '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': '65323c06-a6a6-4041-9103-f9d7a1de6f9e', 'X-Kubernetes-Pf-Prioritylevel-Uid': '657271c7-6f1a-4fd5-ac0c-4ef79cc320b5', 'Date': 'Tue, 09 Jul 2024 17:11:46 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 ------------------------------ 17:11:46.252 - INFO: mtc-e2e-qev2/mtc_tests/tests/test_interop.py::test_mtc_172_interop ERROR ------------------------------ live log logreport ------------------------------ 17:11:46.525 - 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-c2hl.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': '4af8a58e-571e-490b-a8da-c67565fae8a8', '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': '65323c06-a6a6-4041-9103-f9d7a1de6f9e', 'X-Kubernetes-Pf-Prioritylevel-Uid': '657271c7-6f1a-4fd5-ac0c-4ef79cc320b5', 'Date': 'Tue, 09 Jul 2024 17:11:46 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 0x7f12e9ac5490> 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': '4af8a58e-571e-490b-a8da-c67565fae8a8', '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': '65323c06-a6a6-4041-9103-f9d7a1de6f9e', 'X-Kubernetes-Pf-Prioritylevel-Uid': '657271c7-6f1a-4fd5-ac0c-4ef79cc320b5', 'Date': 'Tue, 09 Jul 2024 17:11:46 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 ------------------------------ 17:11:46.526 - 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-c2hl.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': '6c5ab39d-1127-4c36-b07f-731e57ad5448', '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': '65323c06-a6a6-4041-9103-f9d7a1de6f9e', 'X-Kubernetes-Pf-Prioritylevel-Uid': '657271c7-6f1a-4fd5-ac0c-4ef79cc320b5', 'Date': 'Tue, 09 Jul 2024 17:11:44 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 0x7f12e9ac5490> 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': '6c5ab39d-1127-4c36-b07f-731e57ad5448', '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': '65323c06-a6a6-4041-9103-f9d7a1de6f9e', 'X-Kubernetes-Pf-Prioritylevel-Uid': '657271c7-6f1a-4fd5-ac0c-4ef79cc320b5', 'Date': 'Tue, 09 Jul 2024 17:11:44 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-c2hl.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': '141fd7d6-e96d-4187-b803-5e9addc92933', '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': '65323c06-a6a6-4041-9103-f9d7a1de6f9e', 'X-Kubernetes-Pf-Prioritylevel-Uid': '657271c7-6f1a-4fd5-ac0c-4ef79cc320b5', 'Date': 'Tue, 09 Jul 2024 17:11:45 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 0x7f12e9ac5490> 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': '141fd7d6-e96d-4187-b803-5e9addc92933', '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': '65323c06-a6a6-4041-9103-f9d7a1de6f9e', 'X-Kubernetes-Pf-Prioritylevel-Uid': '657271c7-6f1a-4fd5-ac0c-4ef79cc320b5', 'Date': 'Tue, 09 Jul 2024 17:11:45 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-c2hl.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': 'cca5fdb8-1c15-4302-95d0-72370d72fbd8', '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': '65323c06-a6a6-4041-9103-f9d7a1de6f9e', 'X-Kubernetes-Pf-Prioritylevel-Uid': '657271c7-6f1a-4fd5-ac0c-4ef79cc320b5', 'Date': 'Tue, 09 Jul 2024 17:11:45 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 0x7f12e9ac5490> 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': 'cca5fdb8-1c15-4302-95d0-72370d72fbd8', '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': '65323c06-a6a6-4041-9103-f9d7a1de6f9e', 'X-Kubernetes-Pf-Prioritylevel-Uid': '657271c7-6f1a-4fd5-ac0c-4ef79cc320b5', 'Date': 'Tue, 09 Jul 2024 17:11:45 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-c2hl.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': '5d571377-add9-4cf8-8190-7be89bd2d0da', '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': '65323c06-a6a6-4041-9103-f9d7a1de6f9e', 'X-Kubernetes-Pf-Prioritylevel-Uid': '657271c7-6f1a-4fd5-ac0c-4ef79cc320b5', 'Date': 'Tue, 09 Jul 2024 17:11:45 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 0x7f12e9ac5490> 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': '5d571377-add9-4cf8-8190-7be89bd2d0da', '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': '65323c06-a6a6-4041-9103-f9d7a1de6f9e', 'X-Kubernetes-Pf-Prioritylevel-Uid': '657271c7-6f1a-4fd5-ac0c-4ef79cc320b5', 'Date': 'Tue, 09 Jul 2024 17:11:45 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-c2hl.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': 'de638736-790d-4233-9e70-802ea98379d7', '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': '65323c06-a6a6-4041-9103-f9d7a1de6f9e', 'X-Kubernetes-Pf-Prioritylevel-Uid': '657271c7-6f1a-4fd5-ac0c-4ef79cc320b5', 'Date': 'Tue, 09 Jul 2024 17:11:46 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 0x7f12e9ac5490> 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': 'de638736-790d-4233-9e70-802ea98379d7', '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': '65323c06-a6a6-4041-9103-f9d7a1de6f9e', 'X-Kubernetes-Pf-Prioritylevel-Uid': '657271c7-6f1a-4fd5-ac0c-4ef79cc320b5', 'Date': 'Tue, 09 Jul 2024 17:11:46 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-c2hl.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': '4af8a58e-571e-490b-a8da-c67565fae8a8', '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': '65323c06-a6a6-4041-9103-f9d7a1de6f9e', 'X-Kubernetes-Pf-Prioritylevel-Uid': '657271c7-6f1a-4fd5-ac0c-4ef79cc320b5', 'Date': 'Tue, 09 Jul 2024 17:11:46 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 0x7f12e9ac5490> 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': '4af8a58e-571e-490b-a8da-c67565fae8a8', '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': '65323c06-a6a6-4041-9103-f9d7a1de6f9e', 'X-Kubernetes-Pf-Prioritylevel-Uid': '657271c7-6f1a-4fd5-ac0c-4ef79cc320b5', 'Date': 'Tue, 09 Jul 2024 17:11:46 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': '6c5ab39d-1127-4c36-b07f-731e57ad5448', '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': '65323c06-a6a6-4041-9103-f9d7a1de6f9e', 'X-Kubernetes-Pf-Prioritylevel-Uid': '657271c7-6f1a-4fd5-ac0c-4ef79cc320b5', 'Date': 'Tue, 09 Jul 2024 17:11:44 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': '141fd7d6-e96d-4187-b803-5e9addc92933', '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': '65323c06-a6a6-4041-9103-f9d7a1de6f9e', 'X-Kubernetes-Pf-Prioritylevel-Uid': '657271c7-6f1a-4fd5-ac0c-4ef79cc320b5', 'Date': 'Tue, 09 Jul 2024 17:11:45 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': 'cca5fdb8-1c15-4302-95d0-72370d72fbd8', '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': '65323c06-a6a6-4041-9103-f9d7a1de6f9e', 'X-Kubernetes-Pf-Prioritylevel-Uid': '657271c7-6f1a-4fd5-ac0c-4ef79cc320b5', 'Date': 'Tue, 09 Jul 2024 17:11:45 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': '5d571377-add9-4cf8-8190-7be89bd2d0da', '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': '65323c06-a6a6-4041-9103-f9d7a1de6f9e', 'X-Kubernetes-Pf-Prioritylevel-Uid': '657271c7-6f1a-4fd5-ac0c-4ef79cc320b5', 'Date': 'Tue, 09 Jul 2024 17:11:45 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': 'de638736-790d-4233-9e70-802ea98379d7', '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': '65323c06-a6a6-4041-9103-f9d7a1de6f9e', 'X-Kubernetes-Pf-Prioritylevel-Uid': '657271c7-6f1a-4fd5-ac0c-4ef79cc320b5', 'Date': 'Tue, 09 Jul 2024 17:11:46 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': '4af8a58e-571e-490b-a8da-c67565fae8a8', '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': '65323c06-a6a6-4041-9103-f9d7a1de6f9e', 'X-Kubernetes-Pf-Prioritylevel-Uid': '657271c7-6f1a-4fd5-ac0c-4ef79cc320b5', 'Date': 'Tue, 09 Jul 2024 17:11:46 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 2.87s ======================== Copying /mtc-e2e-qev2/junit-report.xml to /logs/artifacts/junit_mtc_interop_results.xml...