Skip to content

Commit

Permalink
Merge stackhpc/yoga into stackhpc/zed
Browse files Browse the repository at this point in the history
  • Loading branch information
markgoddard committed Nov 6, 2023
2 parents 43fc5c3 + e0d1aef commit be74bda
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 13 deletions.
20 changes: 12 additions & 8 deletions etc/kayobe/ansible/ovn-fix-chassis-priorities.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@
hosts: "{{ ovn_nb_db_group | default('controllers') }}"
tasks:
- name: Find the OVN NB DB leader
command: docker exec -it ovn_nb_db ovn-nbctl get-connection
ansible.builtin.command: docker exec ovn_nb_db ovn-nbctl get-connection
changed_when: false
failed_when: false
register: ovn_check_result
check_mode: no
check_mode: false

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

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

Expand All @@ -47,23 +47,27 @@
gateway_chassis_max_priority: "{{ ovn_nb_db_hosts_sorted | length }}"
tasks:
- name: Fix ha_chassis priorities
command: >-
docker exec -it ovn_nb_db
ansible.builtin.command: >-
docker exec ovn_nb_db
bash -c '
ovn-nbctl find ha_chassis chassis_name={{ item }} |
awk '\''$1 == "_uuid" { print $3 }'\'' |
while read uuid; do ovn-nbctl set ha_chassis $uuid priority={{ priority }}; done'
loop: "{{ ovn_nb_db_hosts_sorted }}"
vars:
priority: "{{ ha_chassis_max_priority | int - ovn_nb_db_hosts_sorted.index(item) }}"
register: ha_chassis_command
changed_when: ha_chassis_command.rc == 0

- name: Fix gateway_chassis priorities
command: >-
docker exec -it ovn_nb_db
ansible.builtin.command: >-
docker exec ovn_nb_db
bash -c '
ovn-nbctl find gateway_chassis chassis_name={{ item }} |
awk '\''$1 == "_uuid" { print $3 }'\'' |
while read uuid; do ovn-nbctl set gateway_chassis $uuid priority={{ priority }}; done'
loop: "{{ ovn_nb_db_hosts_sorted }}"
vars:
priority: "{{ gateway_chassis_max_priority | int - ovn_nb_db_hosts_sorted.index(item) }}"
register: gateway_chassis_command
changed_when: gateway_chassis_command.rc == 0
23 changes: 20 additions & 3 deletions etc/kayobe/kolla.yml
Original file line number Diff line number Diff line change
Expand Up @@ -217,14 +217,20 @@ stackhpc_epel_9_repos:
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 }}"
stackhpc_yum_repos: "{{ stackhpc_rocky_9_repos }}"

# List of repositories for Ubuntu Jammy.
stackhpc_ubuntu_jammy_repos:
# List of base repositories for Ubuntu Jammy.
stackhpc_ubuntu_jammy_base_repos:
- "deb {{ stackhpc_repo_ubuntu_jammy_url }} jammy main universe"
- "deb {{ stackhpc_repo_ubuntu_jammy_url }} jammy-updates main universe"
- "deb {{ stackhpc_repo_ubuntu_jammy_url }} jammy-backports main universe"
- "deb {{ stackhpc_repo_ubuntu_jammy_security_url }} jammy-security main universe"

# List of UCA repositories for Ubuntu Jammy.
stackhpc_ubuntu_jammy_uca_repos:
- "deb {{ stackhpc_repo_ubuntu_cloud_archive_url }} jammy-updates/{{ openstack_release }} main"

# List of repositories for Ubuntu Jammy.
stackhpc_ubuntu_jammy_repos: "{{ stackhpc_ubuntu_jammy_base_repos + stackhpc_ubuntu_jammy_uca_repos }}"

# Whether to revert to the upstream mirrors in built Kolla container images.
stackhpc_kolla_clean_up_repo_mirrors: true

Expand All @@ -244,6 +250,13 @@ kolla_build_blocks:
-e '/\[{{ repo.tag }}\]/,/^\[/ s|^\(name.*\)|\1\nbaseurl={{ repo.url }}|' /etc/yum.repos.d/{{ repo.file }}{% if not loop.last %} && \
{% endif %}
{% endfor %}
{% else %}
RUN \
rm /etc/apt/sources.list && \
{% for repo in stackhpc_ubuntu_jammy_base_repos %}
echo '{{ repo }}' >> /etc/apt/sources.list {% if not loop.last %} && \
{% endif %}
{% endfor %}
{% endif %}
base_centos_repo_overrides_post_yum: |
{# fixme #}
Expand All @@ -260,9 +273,13 @@ kolla_build_blocks:
-e '/\[{{ repo.tag }}\]/,/^\[/ s|^\(name.*\)|\1\nbaseurl={{ repo.url }}|' /etc/yum.repos.d/{{ repo.file }}{% if not loop.last %} &&{% endif %} \
{% endfor %}
{% endif %}
# With the UCA keyring installed we can now add all repos.
base_ubuntu_package_sources_list: |
{% if stackhpc_kolla_clean_up_repo_mirrors | bool %}
COPY sources.list.ubuntu /etc/apt/sources.list.backup
{% endif %}
RUN \
mv /etc/apt/sources.list /etc/apt/sources.list.backup && \
rm /etc/apt/sources.list && \
{% for repo in stackhpc_ubuntu_jammy_repos %}
echo '{{ repo }}' >> /etc/apt/sources.list {% if not loop.last %} && \
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion etc/kayobe/overcloud-dib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ overcloud_dib_host_packages_extra:
overcloud_dib_git_elements_extra:
- repo: "https://github.com/stackhpc/stackhpc-image-elements"
local: "{{ source_checkout_path }}/stackhpc-image-elements"
version: "v1.5.0"
version: "v1.6.0"
elements_path: "elements"

# List of git repositories containing Diskimage Builder (DIB) elements. See
Expand Down
1 change: 1 addition & 0 deletions etc/kayobe/pulp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,7 @@ stackhpc_pulp_images_kolla:
- bifrost-deploy
- blazar-api
- blazar-manager
- caso
- cinder-api
- cinder-backup
- cinder-scheduler
Expand Down
3 changes: 2 additions & 1 deletion etc/kayobe/stackhpc-overcloud-dib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ stackhpc_overcloud_dib_name: "deployment_image"

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

0 comments on commit be74bda

Please sign in to comment.