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.
[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
=== 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/ 13938f749f7393e aa47a9d5ddd286e 675ff2944d
[Test Case] OS_IMAGE= jammy tox -e integration-tests tests/integrati on_tests/ modules/ test_ansible. py::test_ ansible_ pull_pip
* Run current integration tests are expected to fail path against daily images
CLOUD_INIT_
* Run current integration tests with this proposed SRU upload from ppa:cloud- init-dev/ proposed which will succeed OS_IMAGE= jammy CLOUD_INIT_ CLOUD_INIT_ SOURCE= ppa:cloud- init-dev/ proposed tox -e integration-tests tests/integrati on_tests/ modules/ test_ansible. py::test_ ansible_ pull_pip
CLOUD_INIT_
[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 /github. com/canonical/ cloud-init/ commit/ b417b21816827f0 b1324cf0df63348 7c43b15dad# commitcomment- 130714494
https:/