Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions ansible/network.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@
with_items: "{{ ether_interfaces }}"
when: not item | net_interface

- name: Validate network interface name length
fail:
msg: >
Network interface validation failed - interface name {{ item |
net_interface }} is longer than 15 characters.
with_items: "{{ ether_interfaces }}"
when: item | net_interface | length > 15

- name: Validate bridge interface configuration
fail:
msg: >
Expand All @@ -27,13 +35,29 @@
with_items: "{{ bridge_interfaces }}"
when: not item | net_interface

- name: Validate bridge interface name length
fail:
msg: >
Bridge interface validation failed - interface name {{ item |
net_interface }} is longer than 15 characters.
with_items: "{{ bridge_interfaces }}"
when: item | net_interface | length > 15

- name: Validate bond interface configuration
fail:
msg: >
Bond interface validation failed - no interface configured for
{{ item }}. This should be configured via '{{ item }}_interface'.
with_items: "{{ bond_interfaces }}"
when: not item | net_interface

- name: Validate bond interface name length
fail:
msg: >
Bond interface validation failed - interface name {{ item |
net_interface }} is longer than 15 characters.
with_items: "{{ bond_interfaces }}"
when: item | net_interface | length > 15
vars:
ether_interfaces: "{{ network_interfaces | net_select_ethers | list }}"
bridge_interfaces: "{{ network_interfaces | net_select_bridges | list }}"
Expand Down
19 changes: 16 additions & 3 deletions ansible/roles/dell-switch-sonic/templates/dell-sonic-config.j2
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,25 @@
{% endfor %}

{% for interface, config in dell_switch_sonic_interface_config.items() %}
{% if 'vlan' in interface | lower %}
interface {{ interface }}
{% if config.description is defined %}
description "{{ config.description }}"
description "{{ config.description }}"
{% endif %}
{% for line in config.config %}
{{ line }}
{{ line }}
{% endfor %}
{% endif %}
{% endfor %}
exit

{% for interface, config in dell_switch_sonic_interface_config.items() %}
{% if 'vlan' not in interface | lower %}
interface {{ interface }}
{% if config.description is defined %}
description "{{ config.description }}"
{% endif %}
{% for line in config.config %}
{{ line }}
{% endfor %}
{% endif %}
{% endfor %}
8 changes: 5 additions & 3 deletions dev/tenks-deploy-config-overcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@

node_types:
type0:
memory_mb: 4096
# The seed images jobs deploy the overcloud host image, which needs more
# memory than CirrOS.
memory_mb: 8192
vcpus: 1
volumes:
# There is a minimum disk space capacity requirement of 4GiB when using Ironic Python Agent:
# https://github.com/openstack/ironic-python-agent/blob/master/ironic_python_agent/utils.py#L290
# The CentOS8 cloud image seems to fill a 4GiB disk, so allow 6.
- capacity: 6GiB
# Allow 10GiB, so that the overcloud host image built by the seed images jobs fits.
- capacity: 10GiB
physical_networks:
- physnet1
console_log_enabled: true
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
fixes:
- |
Fixed Dell SONiC switch config indentation. Also made sure that VLAN
interfaces are defined first as others might depend on them.
Related bug:
`LP#2168529 <https://bugs.launchpad.net/kayobe/+bug/2168529>`__
38 changes: 38 additions & 0 deletions roles/kayobe-diagnostics/files/get_logs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,39 @@ copy_bifrost_logs() {
$container_engine cp bifrost_deploy:/etc/$d ${LOG_DIR}/kolla_node_configs/bifrost/
done
$container_engine cp bifrost_deploy:/var/log/mariadb/mariadb.log ${LOG_DIR}/kolla/mariadb/
# Ironic logs, including IPA ramdisk logs, are written to a volume that
# is not mounted on the host.
$container_engine cp bifrost_deploy:/var/log/kolla/. ${LOG_DIR}/kolla/
timeout 120 $container_engine exec bifrost_deploy \
bash -c 'export OS_CLOUD=bifrost && baremetal node list --long -f yaml' > ${LOG_DIR}/kolla/ironic/baremetal-node-list.txt
# Per-node state, history of failed steps, and inspection inventory.
mkdir -p ${LOG_DIR}/kolla/ironic/nodes
nodes=$(timeout 120 $container_engine exec bifrost_deploy \
bash -c 'export OS_CLOUD=bifrost && baremetal node list -f value -c UUID')
for node in $nodes; do
for cmd in "show" "history list --long" "inventory save"; do
timeout 120 $container_engine exec bifrost_deploy \
bash -c "export OS_CLOUD=bifrost && baremetal node $cmd $node" \
> ${LOG_DIR}/kolla/ironic/nodes/${node}-${cmd%% *}.txt 2>&1
done
done
# Deployment images served to nodes, including their virtual sizes.
timeout 300 $container_engine exec bifrost_deploy \
bash -c 'ls -la /httpboot /tftpboot; for image in /httpboot/*.qcow2; do qemu-img info "$image"; sha256sum "$image"; done' \
> ${LOG_DIR}/kolla/bifrost-images.txt 2>&1
}

copy_libvirt_state() {
# State of libvirt domains, such as Tenks nodes.
mkdir -p ${LOG_DIR}/system_logs/libvirt-state
virsh list --all > ${LOG_DIR}/system_logs/libvirt-state/virsh-list.txt
for domain in $(virsh list --all --name); do
virsh dumpxml $domain > ${LOG_DIR}/system_logs/libvirt-state/${domain}-dumpxml.txt
virsh dominfo $domain > ${LOG_DIR}/system_logs/libvirt-state/${domain}-dominfo.txt
for disk in $(virsh domblklist $domain | awk '$2 ~ /^\// {print $2}'); do
qemu-img info -U $disk
done > ${LOG_DIR}/system_logs/libvirt-state/${domain}-disks.txt 2>&1
done
}

copy_logs() {
Expand All @@ -51,6 +84,7 @@ copy_logs() {
rm ${LOG_DIR}/kolla_configs/config/ironic/ironic-agent.{kernel,initramfs}
rm ${LOG_DIR}/kolla_node_configs/ironic-http/ironic-agent.{kernel,initramfs}
rm ${LOG_DIR}/kolla_node_configs/ironic-tftp/ironic-agent.{kernel,initramfs}
rm ${LOG_DIR}/kolla_node_configs/bifrost/ipa.{kernel,initramfs}
fi
if [[ -n ${PREVIOUS_CONFIG_DIR} ]] && [[ -d ${PREVIOUS_CONFIG_DIR} ]]; then
mkdir -p ${LOG_DIR}/previous_{kayobe,kolla}_configs
Expand Down Expand Up @@ -166,6 +200,10 @@ copy_logs() {
mv $f ${f/.log/.txt}
done

if [[ -x "$(command -v virsh)" ]]; then
copy_libvirt_state
fi

chmod -R 777 ${LOG_DIR}
}

Expand Down
16 changes: 8 additions & 8 deletions zuul.d/jobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -277,24 +277,24 @@
- job:
name: kayobe-seed-rocky10
parent: kayobe-seed-base
nodeset: kayobe-rocky10
nodeset: kayobe-rocky10-16GB

- job:
name: kayobe-seed-rocky10-podman
parent: kayobe-seed-base
nodeset: kayobe-rocky10
nodeset: kayobe-rocky10-16GB
vars:
container_engine: podman

- job:
name: kayobe-seed-ubuntu-noble
parent: kayobe-seed-base
nodeset: kayobe-ubuntu-noble
nodeset: kayobe-ubuntu-noble-16GB

- job:
name: kayobe-seed-ubuntu-noble-podman
parent: kayobe-seed-base
nodeset: kayobe-ubuntu-noble
nodeset: kayobe-ubuntu-noble-16GB
vars:
container_engine: podman

Expand All @@ -313,29 +313,29 @@
- job:
name: kayobe-seed-images-rocky10
parent: kayobe-seed-images-base
nodeset: kayobe-rocky10
nodeset: kayobe-rocky10-16GB
vars:
kayobe_control_host_become: false

- job:
name: kayobe-seed-images-rocky10-podman
parent: kayobe-seed-images-base
nodeset: kayobe-rocky10
nodeset: kayobe-rocky10-16GB
vars:
container_engine: podman

- job:
name: kayobe-seed-images-ubuntu-noble
parent: kayobe-seed-images-base
nodeset: kayobe-ubuntu-noble
nodeset: kayobe-ubuntu-noble-16GB
vars:
seed_container_image_regex: "^base"
kayobe_control_host_become: false

- job:
name: kayobe-seed-images-ubuntu-noble-podman
parent: kayobe-seed-images-base
nodeset: kayobe-ubuntu-noble
nodeset: kayobe-ubuntu-noble-16GB
vars:
container_engine: podman

Expand Down
Loading