Skip to content
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

You need to install "jmespath" prior to running json_query filter #9826

Closed
taraszka opened this issue Feb 23, 2023 · 6 comments
Closed

You need to install "jmespath" prior to running json_query filter #9826

taraszka opened this issue Feb 23, 2023 · 6 comments
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@taraszka
Copy link

Environment:

  • Cloud provider or hardware configuration:
    N/A

  • OS (printf "$(uname -srm)\n$(cat /etc/os-release)\n"):

root@7c34f70f4218:/kubespray# printf "$(uname -srm)\n$(cat /etc/os-release)\n"
Linux 5.19.0-31-generic x86_64
NAME="Ubuntu"
VERSION="20.04.4 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.4 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
  • Version of Ansible (ansible --version):
ansible [core 2.12.5]
  config file = None
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.8/dist-packages/ansible
  ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/local/bin/ansible
  python version = 3.8.10 (default, Nov 14 2022, 12:59:47) [GCC 9.4.0]
  jinja version = 2.11.3
  libyaml = True
  • Version of Python (python --version):
root@7c34f70f4218:/kubespray# python --version
bash: python: command not found
root@7c34f70f4218:/kubespray# python3 --version
Python 3.8.10
root@7c34f70f4218:/kubespray# 

Kubespray version (commit) (git rev-parse --short HEAD):
quay.io/kubespray/kubespray:v2.21.0

Network plugin used:
N/A

Full inventory with variables (ansible -i inventory/sample/inventory.ini all -m debug -a "var=hostvars[inventory_hostname]"):

N/A

Command used to invoke ansible:
/usr/local/bin/ansible-playbook -i /inventory/hosts.yaml --become --become-user=root cluster.yml -u root

Output of ansible run:

(...)
You need to install "jmespath" prior to running json_query filter

Anything else do we need to know:
The python3-jmespath package seems missing in the docker container version of Kubespray.
Running: apt-get update && apt-get install -y python3-jmespath resolve this issue.

@taraszka taraszka added the kind/bug Categorizes issue or PR as related to a bug. label Feb 23, 2023
@taraszka
Copy link
Author

Okay, I see it is fixed here: eb56130

It would be nice to include this fix in the next release. Or maybe even release a bug fix of v2.21.x that is fixing it. Let's say v2.21.1 🙏

@floryut
Copy link
Member

floryut commented Feb 24, 2023

Okay, I see it is fixed here: eb56130

It would be nice to include this fix in the next release. Or maybe even release a bug fix of v2.21.x that is fixing it. Let's say v2.21.1 🙏

2.21.1 is the goal indeed, I was supposed to do that a few weeks back but I guess work my daily work took me more time than expected 😅
I'll try to do that soon

@alex-old-user
Copy link

hi @floryut I had the same issue with the docker image and I took requirements-2.12.txt from v2.21.0
pip showed me that other requirements weren't satisfied as well

cat requirements.txt 
ansible==5.7.1
ansible-core==2.12.5
cryptography==3.4.8
jinja2==2.11.3
netaddr==0.7.19
pbr==5.4.4
jmespath==0.9.5
ruamel.yaml==0.16.10
ruamel.yaml.clib==0.2.7
MarkupSafe==1.1.1

pip install -r requirements.txt 
Requirement already satisfied: ansible==5.7.1 in /usr/local/lib/python3.8/dist-packages (from -r requirements.txt (line 1)) (5.7.1)
Requirement already satisfied: ansible-core==2.12.5 in /usr/local/lib/python3.8/dist-packages (from -r requirements.txt (line 2)) (2.12.5)
Requirement already satisfied: cryptography==3.4.8 in /usr/local/lib/python3.8/dist-packages (from -r requirements.txt (line 3)) (3.4.8)
Requirement already satisfied: jinja2==2.11.3 in /usr/local/lib/python3.8/dist-packages (from -r requirements.txt (line 4)) (2.11.3)
Requirement already satisfied: netaddr==0.7.19 in /usr/local/lib/python3.8/dist-packages (from -r requirements.txt (line 5)) (0.7.19)
Collecting pbr==5.4.4
  Downloading pbr-5.4.4-py2.py3-none-any.whl (110 kB)
     |████████████████████████████████| 110 kB 505 kB/s 
Collecting jmespath==0.9.5
  Downloading jmespath-0.9.5-py2.py3-none-any.whl (24 kB)
Collecting ruamel.yaml==0.16.10
  Downloading ruamel.yaml-0.16.10-py2.py3-none-any.whl (111 kB)
     |████████████████████████████████| 111 kB 1.5 MB/s 
Collecting ruamel.yaml.clib==0.2.7
  Downloading ruamel.yaml.clib-0.2.7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (555 kB)
     |████████████████████████████████| 555 kB 2.7 MB/s 
Requirement already satisfied: MarkupSafe==1.1.1 in /usr/local/lib/python3.8/dist-packages (from -r requirements.txt (line 10)) (1.1.1)
Requirement already satisfied: packaging in /usr/local/lib/python3.8/dist-packages (from ansible-core==2.12.5->-r requirements.txt (line 2)) (23.0)
Requirement already satisfied: PyYAML in /usr/local/lib/python3.8/dist-packages (from ansible-core==2.12.5->-r requirements.txt (line 2)) (6.0)
Requirement already satisfied: resolvelib<0.6.0,>=0.5.3 in /usr/local/lib/python3.8/dist-packages (from ansible-core==2.12.5->-r requirements.txt (line 2)) (0.5.4)
Requirement already satisfied: cffi>=1.12 in /usr/local/lib/python3.8/dist-packages (from cryptography==3.4.8->-r requirements.txt (line 3)) (1.15.1)
Requirement already satisfied: pycparser in /usr/local/lib/python3.8/dist-packages (from cffi>=1.12->cryptography==3.4.8->-r requirements.txt (line 3)) (2.21)

Installing collected packages: pbr, jmespath, ruamel.yaml.clib, ruamel.yaml
Successfully installed jmespath-0.9.5 pbr-5.4.4 ruamel.yaml-0.16.10 ruamel.yaml.clib-0.2.7

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 4, 2023
@rkusler-intermedia
Copy link

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Aug 14, 2023
@taraszka
Copy link
Author

This issue was resolved in the v2.22.0 release. Closing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

6 participants