Skip to content

Commit fbe128f

Browse files
authored
Merge pull request #752 from stackhpc/zed-yoga-merge
zed: yoga merge
2 parents 43fc5c3 + d25b13c commit fbe128f

8 files changed

+50
-14
lines changed

etc/kayobe/ansible/ovn-fix-chassis-priorities.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,19 @@
2222
hosts: "{{ ovn_nb_db_group | default('controllers') }}"
2323
tasks:
2424
- name: Find the OVN NB DB leader
25-
command: docker exec -it ovn_nb_db ovn-nbctl get-connection
25+
ansible.builtin.command: docker exec ovn_nb_db ovn-nbctl get-connection
2626
changed_when: false
2727
failed_when: false
2828
register: ovn_check_result
29-
check_mode: no
29+
check_mode: false
3030

3131
- name: Group hosts by leader/follower role
32-
group_by:
32+
ansible.builtin.group_by:
3333
key: "ovn_nb_{{ 'leader' if ovn_check_result.rc == 0 else 'follower' }}"
3434
changed_when: false
3535

3636
- name: Assert one leader exists
37-
assert:
37+
ansible.builtin.assert:
3838
that:
3939
- groups['ovn_nb_leader'] | default([]) | length == 1
4040

@@ -47,23 +47,27 @@
4747
gateway_chassis_max_priority: "{{ ovn_nb_db_hosts_sorted | length }}"
4848
tasks:
4949
- name: Fix ha_chassis priorities
50-
command: >-
51-
docker exec -it ovn_nb_db
50+
ansible.builtin.command: >-
51+
docker exec ovn_nb_db
5252
bash -c '
5353
ovn-nbctl find ha_chassis chassis_name={{ item }} |
5454
awk '\''$1 == "_uuid" { print $3 }'\'' |
5555
while read uuid; do ovn-nbctl set ha_chassis $uuid priority={{ priority }}; done'
5656
loop: "{{ ovn_nb_db_hosts_sorted }}"
5757
vars:
5858
priority: "{{ ha_chassis_max_priority | int - ovn_nb_db_hosts_sorted.index(item) }}"
59+
register: ha_chassis_command
60+
changed_when: ha_chassis_command.rc == 0
5961

6062
- name: Fix gateway_chassis priorities
61-
command: >-
62-
docker exec -it ovn_nb_db
63+
ansible.builtin.command: >-
64+
docker exec ovn_nb_db
6365
bash -c '
6466
ovn-nbctl find gateway_chassis chassis_name={{ item }} |
6567
awk '\''$1 == "_uuid" { print $3 }'\'' |
6668
while read uuid; do ovn-nbctl set gateway_chassis $uuid priority={{ priority }}; done'
6769
loop: "{{ ovn_nb_db_hosts_sorted }}"
6870
vars:
6971
priority: "{{ gateway_chassis_max_priority | int - ovn_nb_db_hosts_sorted.index(item) }}"
72+
register: gateway_chassis_command
73+
changed_when: gateway_chassis_command.rc == 0

etc/kayobe/kolla.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,14 +217,20 @@ stackhpc_epel_9_repos:
217217
base_centos_repo_overrides_post_yum_list: "{{ stackhpc_rocky_9_repos + stackhpc_epel_9_repos + stackhpc_rocky_9_additional_repos + stackhpc_rocky_9_third_party_repos }}"
218218
stackhpc_yum_repos: "{{ stackhpc_rocky_9_repos }}"
219219

220-
# List of repositories for Ubuntu Jammy.
221-
stackhpc_ubuntu_jammy_repos:
220+
# List of base repositories for Ubuntu Jammy.
221+
stackhpc_ubuntu_jammy_base_repos:
222222
- "deb {{ stackhpc_repo_ubuntu_jammy_url }} jammy main universe"
223223
- "deb {{ stackhpc_repo_ubuntu_jammy_url }} jammy-updates main universe"
224224
- "deb {{ stackhpc_repo_ubuntu_jammy_url }} jammy-backports main universe"
225225
- "deb {{ stackhpc_repo_ubuntu_jammy_security_url }} jammy-security main universe"
226+
227+
# List of UCA repositories for Ubuntu Jammy.
228+
stackhpc_ubuntu_jammy_uca_repos:
226229
- "deb {{ stackhpc_repo_ubuntu_cloud_archive_url }} jammy-updates/{{ openstack_release }} main"
227230

231+
# List of repositories for Ubuntu Jammy.
232+
stackhpc_ubuntu_jammy_repos: "{{ stackhpc_ubuntu_jammy_base_repos + stackhpc_ubuntu_jammy_uca_repos }}"
233+
228234
# Whether to revert to the upstream mirrors in built Kolla container images.
229235
stackhpc_kolla_clean_up_repo_mirrors: true
230236

@@ -244,6 +250,13 @@ kolla_build_blocks:
244250
-e '/\[{{ repo.tag }}\]/,/^\[/ s|^\(name.*\)|\1\nbaseurl={{ repo.url }}|' /etc/yum.repos.d/{{ repo.file }}{% if not loop.last %} && \
245251
{% endif %}
246252
{% endfor %}
253+
{% else %}
254+
RUN \
255+
rm /etc/apt/sources.list && \
256+
{% for repo in stackhpc_ubuntu_jammy_base_repos %}
257+
echo '{{ repo }}' >> /etc/apt/sources.list {% if not loop.last %} && \
258+
{% endif %}
259+
{% endfor %}
247260
{% endif %}
248261
base_centos_repo_overrides_post_yum: |
249262
{# fixme #}
@@ -260,9 +273,13 @@ kolla_build_blocks:
260273
-e '/\[{{ repo.tag }}\]/,/^\[/ s|^\(name.*\)|\1\nbaseurl={{ repo.url }}|' /etc/yum.repos.d/{{ repo.file }}{% if not loop.last %} &&{% endif %} \
261274
{% endfor %}
262275
{% endif %}
276+
# With the UCA keyring installed we can now add all repos.
263277
base_ubuntu_package_sources_list: |
278+
{% if stackhpc_kolla_clean_up_repo_mirrors | bool %}
279+
COPY sources.list.ubuntu /etc/apt/sources.list.backup
280+
{% endif %}
264281
RUN \
265-
mv /etc/apt/sources.list /etc/apt/sources.list.backup && \
282+
rm /etc/apt/sources.list && \
266283
{% for repo in stackhpc_ubuntu_jammy_repos %}
267284
echo '{{ repo }}' >> /etc/apt/sources.list {% if not loop.last %} && \
268285
{% endif %}

etc/kayobe/overcloud-dib.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ overcloud_dib_host_packages_extra:
7171
overcloud_dib_git_elements_extra:
7272
- repo: "https://github.com/stackhpc/stackhpc-image-elements"
7373
local: "{{ source_checkout_path }}/stackhpc-image-elements"
74-
version: "v1.5.0"
74+
version: "v1.6.0"
7575
elements_path: "elements"
7676

7777
# List of git repositories containing Diskimage Builder (DIB) elements. See
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
22
# Overcloud host image versioning tags
33
# These images must be in SMS, since they are used by our AIO CI runners
4-
stackhpc_rocky_9_overcloud_host_image_version: "zed-20231013T123933"
4+
stackhpc_rocky_9_overcloud_host_image_version: "zed-20231106T151621"
55
stackhpc_ubuntu_jammy_overcloud_host_image_version: "zed-20231013T123933"

etc/kayobe/pulp.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,7 @@ stackhpc_pulp_images_kolla:
426426
- bifrost-deploy
427427
- blazar-api
428428
- blazar-manager
429+
- caso
429430
- cinder-api
430431
- cinder-backup
431432
- cinder-scheduler

etc/kayobe/stackhpc-overcloud-dib.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ stackhpc_overcloud_dib_name: "deployment_image"
2121

2222
# StackHPC overcloud DIB image elements.
2323
stackhpc_overcloud_dib_elements:
24-
- "{{ os_distribution }}-{% if os_distribution == 'rocky' %}container{% else %}minimal{% endif %}"
24+
- "{{ os_distribution }}-{% if os_distribution == 'rocky' %}container-stackhpc{% else %}minimal{% endif %}"
2525
- "cloud-init-datasources"
2626
- "{% if os_distribution == 'rocky' %}disable-selinux{% endif %}"
2727
- "enable-serial-console"
@@ -41,6 +41,7 @@ stackhpc_overcloud_dib_env_vars:
4141
DIB_CLOUD_INIT_DATASOURCES: "ConfigDrive"
4242
DIB_CONTAINERFILE_RUNTIME: "docker"
4343
DIB_CONTAINERFILE_NETWORK_DRIVER: "host"
44+
DIB_CONTAINERFILE_DOCKERFILE: "/opt/kayobe/src/stackhpc-image-elements/elements/rocky-container-stackhpc/containerfiles/9-stackhpc"
4445
# NOTE: Not currently syncing Ubuntu packages, since the on_demand mirror in
4546
# Ark does not work if the upstream mirror pulls packages (which it does
4647
# sometimes).
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
features:
3+
- |
4+
Rocky Linux 9 image has been rebuilt with missing base packages (e.g.
5+
microcode_ctl) by installing 'Minimal Install' DNF group.
6+
Also cloud-init from CentOS 9 Stream has been installed with NetworkManager
7+
support.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
fixes:
3+
- |
4+
Fixes an issue with Kolla container image builds for Ubuntu where the
5+
release train package repositories could be behind the container image,
6+
leading to image build failures.

0 commit comments

Comments
 (0)