Cannot find command 'git' on heat_api_container

Bug #1995536 reported by Jose Gaitan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack-Ansible
Fix Released
Undecided
Unassigned

Bug Description

Install python packages into the venv fails for the heat_api_container due to missing "git" command on the openstack-ansible setup-openstack.yml playbook.

TASK [python_venv_build : Install python packages into the venv] ****************************************************************************************
FAILED - RETRYING: [infra1_heat_api_container-9e3029c4]: Install python packages into the venv (5 retries left).
FAILED - RETRYING: [infra1_heat_api_container-9e3029c4]: Install python packages into the venv (4 retries left).
FAILED - RETRYING: [infra1_heat_api_container-9e3029c4]: Install python packages into the venv (3 retries left).
FAILED - RETRYING: [infra1_heat_api_container-9e3029c4]: Install python packages into the venv (2 retries left).
FAILED - RETRYING: [infra1_heat_api_container-9e3029c4]: Install python packages into the venv (1 retries left).
fatal: [infra1_heat_api_container-9e3029c4]: FAILED! => {"attempts": 5, "changed": false, "cmd": ["/openstack/venvs/heat-25.1.0.dev99/bin/pip", "install", "-U", "--constraint", "/openstack/venvs/heat-25.1.0.dev99/global-constraints.txt", "--constraint", "/openstack/venvs/heat-25.1.0.dev99/constraints.txt", "--pre", "--log", "/var/log/python_venv_build.log", "cryptography", "git+https://opendev.org/openstack/heat@c37ea72a6b2c424136ed2ee2cd378928021da78e#egg=openstack-heat", "keystonemiddleware", "osprofiler", "pymemcache", "PyMySQL", "python-glanceclient", "python-heatclient", "python-keystoneclient", "python-memcached", "python-neutronclient", "python-novaclient", "python-openstackclient", "python-swiftclient", "python-troveclient", "systemd-python"], "msg": "stdout: Collecting openstack-heat\n Cloning https://opendev.org/openstack/heat (to revision c37ea72a6b2c424136ed2ee2cd378928021da78e) to ./pip-install-ijoya4u8/openstack-heat_1e51b283ec544c7c83fe6b3f2b6517fa\n\n[notice] A new release of pip available: 22.1.2 -> 22.3\n[notice] To update, run: python3 -m pip install --upgrade pip\n\n:stderr: ERROR: Error [Errno 2] No such file or directory: 'git' while executing command git version\nERROR: Cannot find command 'git' - do you have 'git' installed and in your PATH?\n"}

+++++++++++++++++
I was able to overcome this by manually attaching to the heat container and installing git from within it.

root@infra1:/opt/openstack-ansible/playbooks# lxc-attach infra1_heat_api_container-9e3029c4
root@infra1-heat-api-container-9e3029c4:/# git
bash: git: command not found
root@infra1-heat-api-container-9e3029c4:/# apt install git

Re-run the playbook.

Environment:
-Clean minimal installation of Debian 11 on deployment, infrastructure, and compute hosts.
-Heat container is being installed on the infrastructure host.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-ansible-os_heat (master)
Changed in openstack-ansible:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible-os_heat (master)

Reviewed: https://review.opendev.org/c/openstack/openstack-ansible-os_heat/+/864526
Committed: https://opendev.org/openstack/openstack-ansible-os_heat/commit/74cf65fd75f3489282803c9164f2442ba44125e4
Submitter: "Zuul (22348)"
Branch: master

commit 74cf65fd75f3489282803c9164f2442ba44125e4
Author: Dmitriy Rabotyagov <email address hidden>
Date: Tue Nov 15 13:57:42 2022 +0100

    Install git into placement containers

    If venv_wheel_build_enable is defined to False, placement will fail to
    clone and install repositories due to missing git binary.

    Change-Id: If1e3eec0c558d1472da7bc3a4e87825e36ba4fdc
    Related-Bug: #1989506
    Closes-Bug: #1995536

Changed in openstack-ansible:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-ansible-os_heat (stable/yoga)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-ansible-os_heat (stable/xena)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible-os_heat (stable/yoga)

Reviewed: https://review.opendev.org/c/openstack/openstack-ansible-os_heat/+/865564
Committed: https://opendev.org/openstack/openstack-ansible-os_heat/commit/38ba2096338c9f3de53cf027518ee6ca338611fb
Submitter: "Zuul (22348)"
Branch: stable/yoga

commit 38ba2096338c9f3de53cf027518ee6ca338611fb
Author: Dmitriy Rabotyagov <email address hidden>
Date: Tue Nov 15 13:57:42 2022 +0100

    Install git into heat containers

    If venv_wheel_build_enable is defined to False, placement will fail to
    clone and install repositories due to missing git binary.

    Change-Id: If1e3eec0c558d1472da7bc3a4e87825e36ba4fdc
    Related-Bug: #1989506
    Closes-Bug: #1995536
    (cherry picked from commit 74cf65fd75f3489282803c9164f2442ba44125e4)

tags: added: in-stable-yoga
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible-os_heat (stable/xena)

Reviewed: https://review.opendev.org/c/openstack/openstack-ansible-os_heat/+/865565
Committed: https://opendev.org/openstack/openstack-ansible-os_heat/commit/c452633ef312e40f27f95a9858513b7fcd454704
Submitter: "Zuul (22348)"
Branch: stable/xena

commit c452633ef312e40f27f95a9858513b7fcd454704
Author: Dmitriy Rabotyagov <email address hidden>
Date: Tue Nov 15 13:57:42 2022 +0100

    Install git into heat containers

    If venv_wheel_build_enable is defined to False, placement will fail to
    clone and install repositories due to missing git binary.

    Change-Id: If1e3eec0c558d1472da7bc3a4e87825e36ba4fdc
    Related-Bug: #1989506
    Closes-Bug: #1995536
    (cherry picked from commit 74cf65fd75f3489282803c9164f2442ba44125e4)

tags: added: in-stable-xena
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible-os_heat yoga-eom

This issue was fixed in the openstack/openstack-ansible-os_heat yoga-eom release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible-os_heat xena-eom

This issue was fixed in the openstack/openstack-ansible-os_heat xena-eom release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.