Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kiali installation fails with No module named 'kubernetes.dynamic' #4576

Closed
FilipB opened this issue Dec 13, 2021 · 4 comments
Closed

Kiali installation fails with No module named 'kubernetes.dynamic' #4576

FilipB opened this issue Dec 13, 2021 · 4 comments
Assignees

Comments

@FilipB
Copy link
Contributor

FilipB commented Dec 13, 2021

Installation of current Kiali master fails with:

An unhandled exception occurred while running the lookup plugin
'kubernetes.core.k8s'. Error was a <class 'Exception'>, original
message: Requires the Kubernetes Python client. Try `pip install
kubernetes`. Detail: No module named 'kubernetes.dynamic'

Tested in OCP 4.8 and 4.9.

Kiali operator log attached:
kiali-operator-7c55cd898d-q5q2b-operator.log

This issue is not visible when using Kiali operator build '11575aa' so it's probably caused by kiali/kiali-operator#460

@FilipB FilipB added the bug Something isn't working label Dec 13, 2021
@jmazzitelli
Copy link
Collaborator

Did you rebuild the operator? This should be working - I suspect your internal processes are not building this correctly. You need to build with the new base image and you need to install the correct requirements now.

Where did you get your operator image?

(i.e. i don't think this is a bug)

@jmazzitelli
Copy link
Collaborator

$ make container-build-operator
Building container image for Kiali operator
make -C "/home/jmazzite/source/kiali/kiali/src/github.com/kiali/kiali/operator" -e "OPERATOR_QUAY_TAG=quay.io/kiali/kiali-operator:dev" build
make[1]: Entering directory '/home/jmazzite/source/kiali/kiali-operator'
Building container image for Kiali operator using podman
podman build --pull -t quay.io/kiali/kiali-operator:dev --build-arg OPERATOR_BASE_IMAGE_REPO=quay.io/operator-framework/ansible-operator --build-arg OPERATOR_BASE_IMAGE_VERSION=v1.10.1 -f /home/jmazzite/source/kiali/kiali-operator/build/Dockerfile /home/jmazzite/source/kiali/kiali-operator
STEP 1/7: FROM quay.io/operator-framework/ansible-operator:v1.10.1
Trying to pull quay.io/operator-framework/ansible-operator:v1.10.1...
Getting image source signatures
Copying blob c9a48e9c9f73 skipped: already exists  
Copying blob 55eda7743468 skipped: already exists  
Copying blob 56276ed2198b skipped: already exists  
Copying blob 2ff98490394d skipped: already exists  
Copying blob 4b21dcdd136d skipped: already exists  
Copying blob 3a3736cfccbd skipped: already exists  
Copying blob ce77b4f6f73e skipped: already exists  
Copying blob 2c8d2b4f0bb2 [--------------------------------------] 0.0b / 0.0b
Copying config 1193623bf4 done  
Writing manifest to image destination
Storing signatures
STEP 2/7: COPY roles/ ${HOME}/roles/
--> 745a2fcedd4
STEP 3/7: COPY playbooks/ ${HOME}/playbooks/
--> 7b0d26ddc92
STEP 4/7: COPY watches.yaml ${HOME}/watches.yaml
--> 11e5326b3c2
STEP 5/7: COPY requirements.yml ${HOME}/requirements.yml
--> 88b9a3e90b9
STEP 6/7: RUN ansible-galaxy collection install -r ${HOME}/requirements.yml  && chmod -R ug+rwx ${HOME}/.ansible
Process install dependency map
Starting collection install process
Installing 'kubernetes.core:2.1.1' to '/opt/ansible/.ansible/collections/ansible_collections/kubernetes/core'
Installing 'operator_sdk.util:0.2.0' to '/opt/ansible/.ansible/collections/ansible_collections/operator_sdk/util'
--> e306db103a8
STEP 7/7: RUN cp /etc/ansible/ansible.cfg ${HOME}/ansible-profiler.cfg && echo "callback_enabled = profile_tasks" >> ${HOME}/ansible-profiler.cfg && echo "callback_whitelist = profile_tasks" >> ${HOME}/ansible-profiler.cfg
COMMIT quay.io/kiali/kiali-operator:dev
--> 5061e2c26c7
Successfully tagged quay.io/kiali/kiali-operator:dev
5061e2c26c7440555107147dba9f330d07756687268dc6b930b750db9e4dff2f
make[1]: Leaving directory '/home/jmazzite/source/kiali/kiali-operator'

@jmazzitelli
Copy link
Collaborator

this is the important part you are missing in your build:

Starting collection install process
Installing 'kubernetes.core:2.1.1' to '/opt/ansible/.ansible/collections/ansible_collections/kubernetes/core'
Installing 'operator_sdk.util:0.2.0' to '/opt/ansible/.ansible/collections/ansible_collections/operator_sdk/util'

@FilipB
Copy link
Contributor Author

FilipB commented Dec 13, 2021

Of course it's our internal process. We have OPERATOR_SDK_VERSION hardcoded in our job for some reason. Sorry, closing.

@FilipB FilipB closed this as completed Dec 13, 2021
@jmazzitelli jmazzitelli removed the bug Something isn't working label Dec 13, 2021
@kiali kiali locked and limited conversation to collaborators Dec 13, 2021
@jmazzitelli jmazzitelli converted this issue into discussion #4580 Dec 13, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants