devconfig: firstconfig enhancements
v2 cover devconfig: firstconfig enhancements
A few enhancements to for CIs. This v2 adds a fix for an issue reported by Chuck.
Luis Chamberlain (2):
devconfig: localize unnattended-upgrades sanity check
devconfig: enhance firstconfig on debian
playbooks/roles/devconfig/defaults/main.yml | 1 + .../tasks/install-deps/debian/main.yml | 29 ++++++++++++++++++- 2 files changed, 29 insertions(+), 1 deletion(-)
Signature · 1 line
2.47.2
PATCH v2 1/2 devconfig: localize unnattended-upgrades sanity check
Commit 4680fce19494e ("devconfig: ensure unattended-upgrades is not installed on debian") was a bit too broad. We want this check only for guestfs setups.
--- playbooks/roles/devconfig/defaults/main.yml | 1 + playbooks/roles/devconfig/tasks/install-deps/debian/main.yml | 3 +++ 2 files changed, 4 insertions(+)
playbooks/roles/devconfig/defaults/main.yml +1 -0
@@ -54,5 +54,6 @@ devconfig_enable_systemd_timesyncd_ntp: False devconfig_enable_systemd_timesyncd_ntp_google: False devconfig_enable_systemd_timesyncd_ntp_debian: False devconfig_enable_systemd_timesyncd_ntp_google_debian: False +kdevops_enable_guestfs: False guestfs_copy_sources_from_host_to_guest: False distro_debian_has_hop1_sources: False
playbooks/roles/devconfig/tasks/install-deps/debian/main.yml +3 -0
@@ -8,6 +8,8 @@ - name: Set fact if unattended-upgrades is installed set_fact: unattended_upgrades_installed: "{{ 'install ok installed' in unattended_upgrade_status.stdout }}" + when: + - kdevops_enable_guestfs|bool - name: Verify unattended-upgrades is not installed fail:
@@ -19,6 +21,7 @@ make cleancache make bringup when: + - kdevops_enable_guestfs|bool - unattended_upgrades_installed|bool - name: Upgrade Packages
Signature · 1 line
2.47.2
PATCH v2 2/2 devconfig: enhance firstconfig on debian
In reply to Luis ChamberlainThere's a slew of stupid packages we need to disable to make CI more robust and deterministic at bringup. The unattended-upgrades is one of them, the other one is the systemd-networkd-wait-online.service which is just broken on debian trixie in the way we setup networking.
Although there are devconfig tasks already to disable these, its not enough as devconfig playbook may not be run until later, and so we need to do this as early as possible.
--- .../tasks/install-deps/debian/main.yml | 26 ++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-)
playbooks/roles/devconfig/tasks/install-deps/debian/main.yml +25 -1
@@ -4,6 +4,7 @@ register: unattended_upgrade_status ignore_errors: true changed_when: false + tags: firstconfig - name: Set fact if unattended-upgrades is installed set_fact:
@@ -23,6 +24,26 @@ when: - kdevops_enable_guestfs|bool - unattended_upgrades_installed|bool + tags: firstconfig + +- name: Stop and disable unattended-upgrades related services + become: yes + become_flags: 'su - -c' + become_method: sudo + systemd: + name: "{{ item }}" + state: stopped + enabled: no + daemon_reload: yes + loop: + - unattended-upgrades + - apt-daily.service + - apt-daily.timer + - apt-daily-upgrade.service + - apt-daily-upgrade.timer + - systemd-networkd-wait-online.service + ignore_errors: yes + tags: firstconfig - name: Upgrade Packages become: yes
@@ -37,7 +58,7 @@ delay: 60 tags: firstconfig -- name: Remove unattended-upgrades package +- name: Remove unattended-upgrades package in case upgrade installed it become: yes become_flags: 'su - -c' become_method: sudo
@@ -48,6 +69,7 @@ retries: 20 delay: 30 until: removal_result is not failed + tags: firstconfig - name: Remove optional unattended-upgrades configuration files if they exist become: yes
@@ -62,6 +84,7 @@ - /etc/apt/apt.conf.d/50unattended-upgrades - /etc/apt/apt.conf.d/52unattended-upgrades-local ignore_errors: yes + tags: firstconfig - name: Stop and disable unattended-upgrades related services become: yes
@@ -80,6 +103,7 @@ - apt-daily-upgrade.timer - systemd-networkd-wait-online.service ignore_errors: yes + tags: firstconfig - name: Allow for distro source change / upgrade become: yes
Signature · 1 line
2.47.2
Quoted 11 lines · Luis Chamberlain
A few enhancements to for CIs. This v2 adds a fix for an issue reported by Chuck.
Luis Chamberlain (2):
devconfig: localize unnattended-upgrades sanity check
devconfig: enhance firstconfig on debianplaybooks/roles/devconfig/defaults/main.yml | 1 + .../tasks/install-deps/debian/main.yml | 29 ++++++++++++++++++- 2 files changed, 29 insertions(+), 1 deletion(-)
And at some point soon I will try to wheel that into my cloud environments to try it out with their Debian flavors.
Signature · 1 line
Chuck Lever
Quoted 13 lines · Chuck Lever
Quoted 11 lines · Luis Chamberlain
A few enhancements to for CIs. This v2 adds a fix for an issue reported by Chuck.
Luis Chamberlain (2):
devconfig: localize unnattended-upgrades sanity check
devconfig: enhance firstconfig on debianplaybooks/roles/devconfig/defaults/main.yml | 1 + .../tasks/install-deps/debian/main.yml | 29 ++++++++++++++++++- 2 files changed, 29 insertions(+), 1 deletion(-)
Quoted 4 lines
Reviewed-by Chuck Lever <[email protected]>And at some point soon I will try to wheel that into my cloud environments to try it out with their Debian flavors.
Thanks pushed.
Luis