diff --git a/ansible/network.yml b/ansible/network.yml index 8dbc8e0ad..6d771e0d3 100644 --- a/ansible/network.yml +++ b/ansible/network.yml @@ -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: > @@ -27,6 +35,14 @@ 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: > @@ -34,6 +50,14 @@ {{ 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 }}" diff --git a/ansible/roles/dell-switch-sonic/templates/dell-sonic-config.j2 b/ansible/roles/dell-switch-sonic/templates/dell-sonic-config.j2 index 14a71e5af..184179531 100644 --- a/ansible/roles/dell-switch-sonic/templates/dell-sonic-config.j2 +++ b/ansible/roles/dell-switch-sonic/templates/dell-sonic-config.j2 @@ -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 %} diff --git a/dev/tenks-deploy-config-overcloud.yml b/dev/tenks-deploy-config-overcloud.yml index 8226653b4..824b20989 100644 --- a/dev/tenks-deploy-config-overcloud.yml +++ b/dev/tenks-deploy-config-overcloud.yml @@ -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 diff --git a/releasenotes/notes/fix-dell-sonic-switch-template-3862feec20b3a597.yaml b/releasenotes/notes/fix-dell-sonic-switch-template-3862feec20b3a597.yaml new file mode 100644 index 000000000..e4f9d64d5 --- /dev/null +++ b/releasenotes/notes/fix-dell-sonic-switch-template-3862feec20b3a597.yaml @@ -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 `__ diff --git a/roles/kayobe-diagnostics/files/get_logs.sh b/roles/kayobe-diagnostics/files/get_logs.sh index 29d943514..171be4827 100644 --- a/roles/kayobe-diagnostics/files/get_logs.sh +++ b/roles/kayobe-diagnostics/files/get_logs.sh @@ -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() { @@ -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 @@ -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} } diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml index 6494cb0c1..fd4ef5f9f 100644 --- a/zuul.d/jobs.yaml +++ b/zuul.d/jobs.yaml @@ -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 @@ -313,21 +313,21 @@ - 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 @@ -335,7 +335,7 @@ - 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