ci / derle (push) Successful in 26s
SITE_KIND=openstack builds clusters in one OpenStack project, out of its quota: a Neutron network per cluster with port security off, heads from a head image setup builds in the cloud and keeps in Glance, and compute nodes that boot an iPXE ISO and then from the head. Flavors are chosen, the smallest that fits; the secret stays in the service's environment. Discovery is the project, sized by its quota. Run end to end on DevStack from a fresh control plane: setup, verify, selftest -compute 2 (built, srun across both nodes, destroyed clean). Fixed on the way: a head image left with empty files by Nova's hard stop (every bake now flushes, and this one shuts down from inside), no DNS under NetworkManager, the bake racing cloud-init, an overlay fabric's MTU not reaching Warewulf, a refused snapshot showing as a bare 404, and a contract test that skipped an environment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
71 lines
2.9 KiB
YAML
71 lines
2.9 KiB
YAML
---
|
|
# Register the tenant's compute nodes. Ported from scripts/50-nodes-register.sh.
|
|
|
|
# --netdev must be the node's REAL interface name. Passing "default" makes
|
|
# Warewulf write interface-name=default into the NetworkManager connection,
|
|
# which matches nothing, so the connection never activates and the node stays
|
|
# stuck on its transient DHCP lease forever.
|
|
- name: Configure the default profile
|
|
ansible.builtin.command: >
|
|
wwctl profile set --yes default
|
|
--image {{ node_image_name }}
|
|
--netdev eth0
|
|
--netmask {{ cluster_netmask }}
|
|
--gateway {{ head_cluster_ip }}
|
|
--kernelargs "quiet crashkernel=no vga=791 net.naming-scheme=v238 console=tty0 console=ttyS0"
|
|
changed_when: true
|
|
|
|
# The fabric's MTU, where it is not 1500: an overlay network (OpenStack's
|
|
# Geneve, 1442) drops a full-size frame without a word, so nodes left at
|
|
# 1500 talk to the head - whose smaller MSS bounds TCP - and lose every
|
|
# large packet between each other. Read back, because "wwctl profile set"
|
|
# has exited 0 without changing anything before.
|
|
- name: Set the fabric MTU on the default profile
|
|
ansible.builtin.command: wwctl profile set --yes default --netdev eth0 --mtu {{ cluster_mtu }}
|
|
when: (cluster_mtu | default(0) | int) > 0
|
|
changed_when: true
|
|
|
|
- name: Read the fabric MTU back
|
|
ansible.builtin.command: wwctl profile list -a default
|
|
register: warewulf_nodes_profile
|
|
changed_when: false
|
|
when: (cluster_mtu | default(0) | int) > 0
|
|
failed_when: >-
|
|
warewulf_nodes_profile.rc != 0 or
|
|
(warewulf_nodes_profile.stdout_lines | select('search', 'MTU') | select('search', '\\b' ~ cluster_mtu ~ '\\b') | list | length) == 0
|
|
|
|
- name: Register the compute nodes
|
|
ansible.builtin.command: >
|
|
wwctl node add {{ item.name }}
|
|
--ipaddr {{ item.ip }}
|
|
--hwaddr {{ item.mac }}
|
|
--netdev eth0
|
|
--discoverable=false
|
|
loop: "{{ compute_nodes }}"
|
|
register: warewulf_nodes_added
|
|
failed_when: warewulf_nodes_added.rc != 0 and 'already exists' not in (warewulf_nodes_added.stderr | default(''))
|
|
changed_when: warewulf_nodes_added.rc == 0
|
|
|
|
# The resolv overlay reads DNS from netdev tags, but "wwctl profile set
|
|
# --nettagadd" silently does nothing in this version: it returns 0, prints no
|
|
# error, and leaves nodes.conf untouched. Nodes then boot with an empty
|
|
# resolv.conf, and without DNS neither SSSD nor NFS-by-name works. Write the
|
|
# tags into nodes.conf directly.
|
|
- name: Ensure python3-pyyaml for editing nodes.conf
|
|
ansible.builtin.dnf:
|
|
name: python3-pyyaml
|
|
state: present
|
|
when: cluster_dns is defined
|
|
|
|
- name: Write netdev DNS tags into nodes.conf
|
|
when: cluster_dns is defined
|
|
ansible.builtin.script:
|
|
cmd: "files/set_dns_tags.py {{ cluster_dns }} {{ cluster_dns_search | default('') }}"
|
|
args:
|
|
executable: /usr/bin/python3
|
|
changed_when: true
|
|
|
|
- name: Build all overlays
|
|
ansible.builtin.command: wwctl overlay build
|
|
changed_when: true
|