Comment 0 for bug 2040291

Revision history for this message
Chad Smith (chad.smith) wrote :

=== Begin SRU Template ===
[Impact]

In cloud-init 23.3.1, when cloud-config directives specify that ansible is istalled via `install_method: pip` cloud-init cloud-init leave ansible uninstalled/configured due to a traceback from pip because cloud-init incorrectly provides the unsupported pip parameter `--break-system-packages` on Focal and Jammy.

This issue was already addressed in upstream commit [1] by only providing the `--break-system-packages` parameter to pip in environments/distributions that have configured python with the marker file EXTERNALLY_MANAGED.

[1] upstream fix https://github.com/canonical/cloud-init/commit/13938f749f7393eaa47a9d5ddd286e675ff2944d

[Test Case]
* Run current integration tests are expected to fail path against daily images
CLOUD_INIT_OS_IMAGE=jammy tox -e integration-tests tests/integration_tests/modules/test_ansible.py::test_ansible_pull_pip

* Run current integration tests with this proposed SRU upload from ppa:cloud-init-dev/proposed which will succeed
CLOUD_INIT_OS_IMAGE=jammy CLOUD_INIT_CLOUD_INIT_SOURCE=ppa:cloud-init-dev/proposed tox -e integration-tests tests/integration_tests/modules/test_ansible.py::test_ansible_pull_pip

[Regression Potential]
This is resolving a bug that broke/regressed for environment which pip-install ansible using specific cloud-config. It is a very specific fix for a targeted use-case and will not regress typical deployments using cloud-init

[Other info]

-Original comment filed against upstream PR indicating this problem
https://github.com/canonical/cloud-init/commit/b417b21816827f0b1324cf0df633487c43b15dad#commitcomment-130714494