From 825c9b8509cfcc655b1c6c9fd88b2efdf79a82f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Mass=C3=A9?= Date: Tue, 23 Sep 2025 14:21:28 -0400 Subject: [PATCH] wip --- .../baremetal/root/etc/systemd/system/bootstrap-vm@.service | 6 +++--- bootc/baremetal/root/etc/systemd/system/migrate-vm@.service | 6 +++--- .../etc/flightctl/hooks.d/afterupdating/99_greenboot.yaml | 4 ++++ .../paris-wagram/etc/default/bootstrap-vm-nextcloud.env | 2 +- .../etc/default/bootstrap-vm-nextcloud.env | 2 +- 5 files changed, 12 insertions(+), 8 deletions(-) create mode 100644 bootc/base/root/etc/flightctl/hooks.d/afterupdating/99_greenboot.yaml diff --git a/bootc/baremetal/root/etc/systemd/system/bootstrap-vm@.service b/bootc/baremetal/root/etc/systemd/system/bootstrap-vm@.service index d2e2adc..902b8cd 100644 --- a/bootc/baremetal/root/etc/systemd/system/bootstrap-vm@.service +++ b/bootc/baremetal/root/etc/systemd/system/bootstrap-vm@.service @@ -10,13 +10,13 @@ ConditionPathExists=!/var/lib/libvirt/images/%i/root.qcow2 # Only start if the VM definition file is present ConditionPathExists=/etc/default/bootstrap-vm-%i.env -# Remain started to avoid race conditions -Persistent=true - [Service] Type=oneshot ExecStart=/usr/local/bin/bootstrap-vm.sh %i EnvironmentFile=/etc/default/bootstrap-vm-%i.env +# Remain started to avoid race conditions +RemainAfterExit=true + [Install] WantedBy=multi-user.target diff --git a/bootc/baremetal/root/etc/systemd/system/migrate-vm@.service b/bootc/baremetal/root/etc/systemd/system/migrate-vm@.service index fe88e97..ae88801 100644 --- a/bootc/baremetal/root/etc/systemd/system/migrate-vm@.service +++ b/bootc/baremetal/root/etc/systemd/system/migrate-vm@.service @@ -10,13 +10,13 @@ ConditionPathExists=!/var/lib/libvirt/images/%i/root.qcow2 # Only start if the VM definition file is present ConditionPathExists=/etc/default/migrate-vm-%i.env -# Remain started to avoid race conditions -Persistent=true - [Service] Type=oneshot ExecStart=/usr/local/bin/migrate-vm.sh %i EnvironmentFile=/etc/default/migrate-vm-%i.env +# Remain started to avoid race conditions +RemainAfterExit=true + [Install] WantedBy=multi-user.target diff --git a/bootc/base/root/etc/flightctl/hooks.d/afterupdating/99_greenboot.yaml b/bootc/base/root/etc/flightctl/hooks.d/afterupdating/99_greenboot.yaml new file mode 100644 index 0000000..35cb965 --- /dev/null +++ b/bootc/base/root/etc/flightctl/hooks.d/afterupdating/99_greenboot.yaml @@ -0,0 +1,4 @@ +- if: + - path: /etc/greenboot/check/ + op: [created, updated, removed] + run: systemctl restart greenboot-healthcheck.service diff --git a/flightctl/fleets/baremetal/sites/paris-wagram/etc/default/bootstrap-vm-nextcloud.env b/flightctl/fleets/baremetal/sites/paris-wagram/etc/default/bootstrap-vm-nextcloud.env index 273c41b..612db10 100644 --- a/flightctl/fleets/baremetal/sites/paris-wagram/etc/default/bootstrap-vm-nextcloud.env +++ b/flightctl/fleets/baremetal/sites/paris-wagram/etc/default/bootstrap-vm-nextcloud.env @@ -4,5 +4,5 @@ DOMAIN_DISK_SIZE=100 DOMAIN_OS_VARIANT=rhel9.6 DOMAIN_MAC_ADDRESS=04:00:00:00:00:01 FLIGHTCTL_LABELS_OVERRIDE={ "type": "virtualmachine", "vm.name": "nextcloud" } -DOMAIN_DISK_SOURCE=edge-registry.itix.fr/demo-edge-retail/virtualmachine:latest +DOMAIN_DISK_SOURCE=edge-registry.itix.fr/demo-edge-retail/virtualmachine-qcow2:latest REGISTRY_AUTH_FILE=/etc/ostree/auth.json diff --git a/flightctl/fleets/baremetal/sites/villeneuve-d-ascq/etc/default/bootstrap-vm-nextcloud.env b/flightctl/fleets/baremetal/sites/villeneuve-d-ascq/etc/default/bootstrap-vm-nextcloud.env index 273c41b..612db10 100644 --- a/flightctl/fleets/baremetal/sites/villeneuve-d-ascq/etc/default/bootstrap-vm-nextcloud.env +++ b/flightctl/fleets/baremetal/sites/villeneuve-d-ascq/etc/default/bootstrap-vm-nextcloud.env @@ -4,5 +4,5 @@ DOMAIN_DISK_SIZE=100 DOMAIN_OS_VARIANT=rhel9.6 DOMAIN_MAC_ADDRESS=04:00:00:00:00:01 FLIGHTCTL_LABELS_OVERRIDE={ "type": "virtualmachine", "vm.name": "nextcloud" } -DOMAIN_DISK_SOURCE=edge-registry.itix.fr/demo-edge-retail/virtualmachine:latest +DOMAIN_DISK_SOURCE=edge-registry.itix.fr/demo-edge-retail/virtualmachine-qcow2:latest REGISTRY_AUTH_FILE=/etc/ostree/auth.json