two-images: rocky10, profils NM de cloud-init nommés par interface #1
All checks were successful
Tests / check (push) Successful in 38s

cloud-init 24.4 nomme le profil NetworkManager d'après la clé du
network-config (eth0) et le cherche d'après l'interface (ens3) : la
2e interface n'est jamais activée, et au redémarrage le profil de
repli porte le même UUID, nmcli up échoue (degraded done).

Correctif dans l'image : fichier nommé par interface, contrôlé par
check.sh. test.sh sert un network-config au format de two (2 NIC
décrites, 1 sans entrée) et vérifie cloud-init après redémarrage.

Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
GnomeZworc 2026-11-06 00:32:01 +01:00
commit 344363d49c
Signed by: nicolas.boufideline
GPG key ID: 4406BBBF8845D632
5 changed files with 52 additions and 13 deletions

View file

@ -40,6 +40,12 @@ no_fixed_ntp () {
! grep -qE '^[[:space:]]*(pool|server|peer)[[:space:]]' /mnt/etc/chrony.conf
}
nm_files_by_device () {
local dir
dir=$(chroot /mnt python3 -c 'import cloudinit, os; print(os.path.dirname(cloudinit.__file__))') || return 1
has_line "/mnt${dir}/net/network_manager.py" ' name = nm_conn_filename(iface["name"], target)'
}
check "/var/lib/cloud vide" empty_or_absent /mnt/var/lib/cloud
check "aucune clé d'hôte SSH" no_match /mnt/etc/ssh -maxdepth 1 -name 'ssh_host_*'
check "aucun authorized_keys sous /root" no_match /mnt/root -name authorized_keys
@ -60,6 +66,7 @@ case "${FAMILY}" in
check "utilisateur par défaut syonad" has_line /mnt/etc/cloud/cloud.cfg.d/20_user.cfg " name: syonad"
check "chrony sans serveur NTP fixe" no_fixed_ntp
check "chrony sur les serveurs NTP du DHCP" has_line /mnt/etc/chrony.conf "sourcedir /run/chrony-dhcp"
check "profils NetworkManager de cloud-init nommés par interface" nm_files_by_device
;;
esac