Skip to content

Commit d9621f2

Browse files
committed
[2025.1 only] Revert "bifrost: bump Ansible version to 11"
This reverts commit c8fdb55. Reason for revert: Bifrost is not yet fully compatible with ansible>=10. The master branch should soon be fixed [1], reverting only in 2025.1. [1] https://review.opendev.org/c/openstack/bifrost/+/948245 Change-Id: I69227a0548037411ab81890072aa779708cb85a0
1 parent 74cd690 commit d9621f2

File tree

2 files changed

+4
-33
lines changed

2 files changed

+4
-33
lines changed

docker/bifrost/bifrost-base/Dockerfile.j2

Lines changed: 4 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -7,52 +7,26 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
77

88
{% import "macros.j2" as macros with context %}
99

10-
{% set venv_path='/var/lib/kolla/venv' %}
11-
1210
{{ macros.configure_user(name='bifrost') }}
1311

1412
{# NOTE(mgoddard): EPEL required for nginx #}
1513
{{ macros.enable_extra_repos(['epel']) }}
1614

1715
{% set bifrost_base_packages = [
18-
'cpio'
16+
'cpio',
1917
] %}
2018

21-
{% if base_package_type == 'rpm' %}
22-
{% set bifrost_base_packages = bifrost_base_packages + [
23-
'python3.12',
24-
'python3.12-devel'
25-
] %}
26-
{% endif %}
27-
2819
{{ macros.install_packages(bifrost_base_packages | customizable("packages")) }}
2920

30-
{# Ensure we use Python 3.12 on RPM-based systems #}
31-
{% if base_package_type == 'rpm' %}
32-
RUN cd /usr/bin && \
33-
rm -f python3 && \
34-
ln -s python3.12 python3
35-
{% endif %}
36-
37-
ENV VENV {{ venv_path }}
21+
ENV VENV /var/lib/kolla/venv
3822

3923
{% set bifrost_base_pip_packages = [
4024
'/bifrost'
4125
] %}
4226

4327
ADD bifrost-base-archive /bifrost-base-source
4428
COPY build_arg.yml /tmp/build_arg.yml
45-
46-
RUN mkdir -p /requirements \
47-
&& curl -o /requirements/upper-constraints.txt ${UPPER_CONSTRAINTS_FILE:-https://releases.openstack.org/constraints/upper/{{ openstack_release }}} \
48-
&& python3 -m venv --system-site-packages {{ venv_path }} \
49-
&& KOLLA_DISTRO_PYTHON_VERSION=$(/usr/bin/python3 -c "import sys; print('{}.{}'.format(sys.version_info.major, sys.version_info.minor))") \
50-
&& cd {{ venv_path }}/lib \
51-
&& rm -f python3 \
52-
&& ln -s python${KOLLA_DISTRO_PYTHON_VERSION} python3
53-
5429
RUN ln -s bifrost-base-source/* bifrost \
55-
&& {{ macros.install_pip(['pip', 'wheel', 'setuptools']) }} \
5630
&& {{ macros.install_pip(bifrost_base_pip_packages | customizable("pip_packages")) }}
5731

5832
WORKDIR /bifrost
@@ -63,10 +37,11 @@ ENV ANSIBLE_GATHER_TIMEOUT=30
6337
{% block bifrost_ansible_install %}
6438
{%- if base_package_type == 'deb' %}
6539
RUN apt-get --error-on=any update && \
40+
bash -c '$VENV/bin/pip install "ansible>=9,<10" && \
6641
{%- else %}
6742
RUN echo " " && \
43+
bash -c '$VENV/bin/pip install "ansible>=8,<9" && \
6844
{%- endif %}
69-
bash -c '$VENV/bin/pip install "ansible>=11,<12" && \
7045
$VENV/bin/ansible-galaxy collection install -r /bifrost/ansible-collections-requirements.yml && \
7146
$VENV/bin/ansible-playbook -vvvv -i /bifrost/playbooks/inventory/target \
7247
/bifrost/playbooks/install.yaml \

releasenotes/notes/bifrost-ansible-11-d14b635f9f766675.yaml

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)