kayobe control host bootstrap fails for kolla_ansible_ctl_install_type: binary

Bug #2059249 reported by Léo Gillot-Lamure
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kayobe
In Progress
Low
Maksim Malchuk

Bug Description

When setting kolla_ansible_ctl_install_type to 'binary' in etc/kayobe/kolla.yml, running `kayobe control host bootstrap` will fail with this error:

TASK [kolla-ansible : Ensure required Python packages are installed] ********************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "cmd": ["/home/navaati/tmp/kayobe/venvs/kolla-ansible/bin/pip3", "install", "-U", "-c", "https://releases.openstack.org/constraints/upper/2023.2", "kolla-ansible==2023.2", "ansible-core<2.16,>=2.14", "ansible<9.0,>=7", "selinux"], "msg": "\n:stderr: ERROR: Could not find a version that satisfies the requirement kolla-ansible==2023.2 (from versions: 4.0.0.0b2, 4.0.0.0b3, 4.0.0.0rc1, 4.0.0.0rc2, 4.0.0, 4.0.1, 4.0.2, 4.0.3, 4.0.4, 4.0.5, 5.0.0.0b2, 5.0.0.0b3, 5.0.0.0rc1, 5.0.0.0rc2, 5.0.0, 5.0.1, 5.0.2, 5.0.3, 5.0.4, 5.0.5, 5.0.6, 6.0.0.0b2, 6.0.0.0b3, 6.0.0.0rc1, 6.0.0.0rc2, 6.0.0, 6.1.0, 6.1.1, 6.2.0, 6.2.1, 6.2.2, 6.2.3, 7.0.0.0b2, 7.0.0.0b3, 7.0.0.0rc1, 7.0.0.0rc2, 7.0.0.0rc3, 7.0.0, 7.0.1, 7.1.0, 7.1.1, 7.1.2, 7.2.0, 7.2.1, 8.0.0.0b1, 8.0.0.0rc1, 8.0.0.0rc2, 8.0.0, 8.0.1, 8.1.0, 8.1.1, 8.2.0, 8.3.0, 9.0.0.0rc1, 9.0.0.0rc2, 9.0.0.0rc3, 9.0.0, 9.0.1, 9.1.0, 9.2.0, 9.3.0, 9.3.1, 9.3.2, 10.0.0.0rc1, 10.0.0.0rc2, 10.0.0, 10.1.0, 10.2.0, 10.3.0, 10.4.0, 11.0.0.0rc1, 11.0.0.0rc2, 11.0.0, 11.1.0, 11.2.0, 11.3.0, 11.4.0, 12.0.0.0rc1, 12.0.0.0rc2, 12.0.0, 12.1.0, 12.2.0, 12.3.0, 12.4.0, 12.5.0, 12.6.0, 12.7.0, 12.8.0, 13.0.0.0rc1, 13.0.0.0rc2, 13.0.0.0rc3, 13.0.0, 13.0.1, 13.1.0, 13.2.0, 13.3.0, 13.4.0, 13.5.0, 13.6.0, 13.7.0, 13.8.0, 13.9.0, 14.0.0.0rc1, 14.0.0.0rc2, 14.0.0, 14.1.0, 14.2.0, 14.3.0, 14.4.0, 14.5.0, 14.6.0, 14.7.0, 14.8.0, 14.9.0, 14.10.0, 14.11.0, 15.0.0.0rc1, 15.0.0.0rc2, 15.0.0, 15.1.0, 15.2.0, 15.3.0, 15.4.0, 15.5.0, 15.6.0, 16.0.0.0rc1, 16.0.0.0rc2, 16.0.0, 16.1.0, 16.2.0, 16.3.0, 16.4.0, 16.5.0, 17.0.0.0rc1, 17.0.0.0rc2, 17.0.0, 17.1.0, 17.2.0, 17.3.0)\nERROR: No matching distribution found for kolla-ansible==2023.2\n"}

This is because indeed, in https://opendev.org/openstack/kayobe/src/branch/master/ansible/roles/kolla-ansible/tasks/install.yml#L96 a python package "kolla-ansible=={{ kolla_openstack_release }}" is installed but kolla_openstack_release is set to 2023.2 or whatever, and that is not the versionning scheme used for the PyPI packages.

Repro steps:
- make a fresh venv and activate it
- run pip install kayobe==15.3.0
- clone the upstream kayobe-config and checkout branch stable/2023.2
- apply this patch:

diff --git a/etc/kayobe/kolla.yml b/etc/kayobe/kolla.yml
index c604747..a5b68c3 100644
--- a/etc/kayobe/kolla.yml
+++ b/etc/kayobe/kolla.yml
@@ -28,7 +28,7 @@

 # Type of Kolla-ansible control installation. One of 'binary' or 'source'.
 # Default is 'source'.
-#kolla_ansible_ctl_install_type:
+kolla_ansible_ctl_install_type: binary

 # Path to directory for kolla-ansible source code checkout.
 # Default is $KOLLA_SOURCE_PATH, or $PWD/src/kolla-ansible if

- source <root of kayobe-config>/kayobe-env
- run "kayobe control host bootstrap"

Revision history for this message
Maksim Malchuk (mmalchuk) wrote :

Support for binary images got removed in Zed. Users are requested to migrate to source based images.
https://docs.openstack.org/releasenotes/kolla/zed.html#relnotes-15-0-0-stable-zed

Changed in kayobe:
status: New → Invalid
Revision history for this message
Léo Gillot-Lamure (navaati6) wrote :

Hello.

I’m not sure we are talking about the same thing: this is about how kolla-ansible is installed by kayobe on the ansible controller host, not about where kolla container images come from for the openstack nodes.

Revision history for this message
Maksim Malchuk (mmalchuk) wrote :

this is almost the same. installing from the binary also dropped at the same time.

please see this change: https://opendev.org/openstack/kayobe/commit/422ffc0f9304822a90d781692a156fd650232906

accidentally this were merged without Gerrit and doesn't contain neither release note nor documentation.

Revision history for this message
Maksim Malchuk (mmalchuk) wrote (last edit ):

I think we should drop the 'kolla_ansible_ctl_install_type' variable and update documentation.

Changed in kayobe:
status: Invalid → Confirmed
importance: Undecided → Low
Changed in kayobe:
assignee: nobody → Maksim Malchuk (mmalchuk)
status: Confirmed → In Progress
Revision history for this message
Maksim Malchuk (mmalchuk) wrote (last edit ):

We shouldn't drop 'kolla_ansible_ctl_install_type' but need update documentation to explicitly set 'kolla_openstack_release' to the only tag of the version used. This should be always the numeric (semantic) version tag because it used not only to install Kolla-Ansible from PyPi, but Kolla too (there is need set 'kolla_ctl_install_type' to 'binary'), and also 'kolla_openstack_release' used as a tag for container images. So if you planned to use 'binary' installation of the Kolla/Kolla-Ansible you also should build container images yourself, because CI doesn't push versioned images to the https://quay.io/repository/openstack.kolla/

Revision history for this message
Léo Gillot-Lamure (navaati6) wrote :

Yeah, for reference by manually editing the https://opendev.org/openstack/kayobe/src/branch/master/ansible/roles/kolla-ansible/tasks/install.yml file and setting the line to "kolla-ansible==17.3.0" instead of "kolla-ansible=={{ kolla_openstack_release }}", it then works perfectly without needing to clone kolla-ansible.

I didn’t dare overriding the kolla_openstack_release ansible variable because, as it’s _also_ used for Docker tags, I thougt I would break other things. I actually just think that it shouldn’t be {{ kolla_openstack_release }} that’s used for grabbing kolla-ansible, it should be another variable, because Openstack releases and PyPI versions are different things.

Revision history for this message
Maksim Malchuk (mmalchuk) wrote :

If you set 'kolla_ansible_ctl_install_type' to 'binary' Kayobe don't clone Kolla-Ansible repo.
And don't worry to override 'kolla_openstack_release' to '17.3.0', but why '17.3.0' if you use Kayobe '15.3.0' in the first post? When you set 'kolla_openstack_release' to '17.3.0' and execute 'kayobe overcloud image build' then images would be built with '17.3.0-ubuntu-jammy' tag (for example if you use Ubuntu Jammy).

Revision history for this message
Maksim Malchuk (mmalchuk) wrote :

ah, ok. Kayobe have other versions not synced with Kolla and Kolla-Ansible.

Revision history for this message
Léo Gillot-Lamure (navaati6) wrote :
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.