Skip to content

Bug: Failed to import the required Python library (openshift) on keydb-operator #148

@Elyytscha

Description

@Elyytscha

Describe the bug
Cr is failing with following error in the status:

Failed to import the required Python library (openshift) on keydb-operator-controller-manager-7b45b6dcd9-6h2zd's Python /usr/bin/python3. Please read the module documentation and install it in the appropriate location. If the required library is installed, but Ansible is using the wrong Python interpreter, please consult the documentation on ansible_python_interpreter
Failed to import the required Python library (openshift) on keydb-operator-controller-manager-7b45b6dcd9-6h2zd's Python /usr/bin/python3. Please read the module documentation and install it in the appropriate location. If the required library is installed, but Ansible is using the wrong Python interpreter, please consult the documentation on ansible_python_interpreter


TASK [set status] ********************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ModuleNotFoundError: No module named 'openshift'
fatal: [localhost]: FAILED! => {"changed": false, "error": "No module named 'openshift'", "msg": "Failed to import the required Python library (openshift) on keydb-operator-controller-manager-7b45b6dcd9-6h2zd's Python /usr/bin/python3. Please read the module documentation and install it in the appropriate location. If the required library is installed, but Ansible is using the wrong Python interpreter, please consult the documentation on ansible_python_interpreter"}
-------------------------------------------------------------------------------
{"level":"error","ts":"2024-09-25T21:03:29Z","logger":"runner","msg":"\u001b[0;34mansible-playbook [core 2.15.6]\u001b[0m\r\n\u001b[0;34m config file = /etc/ansible/ansible.cfg\u001b[0m\r\n\u001b[0;34m configured module search path = ['/usr/share/ansible/openshift']\u001b[0m\r\n\u001b[0;34m ansible python module location = /usr/local/lib/python3.9/site-packages/ansible\u001b[0m\r\n\u001b[0;34m ansible collection location = /opt/ansible/.ansible/collections:/usr/share/ansible/collections\u001b[0m\r\n\u001b[0;34m executable location = /usr/local/bin/ansible-playbook\u001b[0m\r\n\u001b[0;34m python version = 3.9.18 (main, Sep 22 2023, 17:58:34) [GCC 8.5.0 20210514 (Red Hat 8.5.0-20)] (/usr/bin/python3)\u001b[0m\r\n\u001b[0;34m jinja version = 3.1.2\u001b[0m\r\n\u001b[0;34m libyaml = True\u001b[0m\r\n\u001b[0;34mUsing /etc/ansible/ansible.cfg as config file\u001b[0m\r\n\u001b[0;34mstatically imported: /opt/ansible/.ansible/collections/ansible_collections/krestomatio/k8s/roles/v1alpha1/database/keydb/ta...
----- Ansible Task Status Event StdOut (keydb.krestomat.io/v1alpha1, Kind=Keydb, keydb/keydb) -----
PLAY RECAP *********************************************************************
localhost : ok=24 changed=0 unreachable=0 failed=1 skipped=6 rescued=1 ignored=0

To Reproduce
Steps to reproduce the behavior:

  1. install operator via olm
  2. create default cr as stated in the docs.

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
image

Please tell us about your environment:

  • Operating System: SCOS
  • Where is this running Onprem
  • Storage being used rook.io
  • Container Image Tag:
  • Platform (Docker, Kubernetes, OpenShift): OKD
  • Platform Version: 4.16

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions