public inbox for kdevops@lists.linux.dev
 help / color / mirror / Atom feed
From: Luis Chamberlain <mcgrof@kernel.org>
To: Chuck Lever <cel@kernel.org>, Daniel Gomez <da.gomez@kruces.com>,
	kdevops@lists.linux.dev
Cc: Luis Chamberlain <mcgrof@kernel.org>
Subject: [PATCH v2 2/2] devconfig: enhance firstconfig on debian
Date: Fri, 18 Apr 2025 12:24:14 -0700	[thread overview]
Message-ID: <20250418192414.4192280-3-mcgrof@kernel.org> (raw)
In-Reply-To: <20250418192414.4192280-1-mcgrof@kernel.org>

There'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.

Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
---
 .../tasks/install-deps/debian/main.yml        | 26 ++++++++++++++++++-
 1 file changed, 25 insertions(+), 1 deletion(-)

diff --git a/playbooks/roles/devconfig/tasks/install-deps/debian/main.yml b/playbooks/roles/devconfig/tasks/install-deps/debian/main.yml
index 8efc59bc167f..6ffe00fef3a5 100644
--- a/playbooks/roles/devconfig/tasks/install-deps/debian/main.yml
+++ b/playbooks/roles/devconfig/tasks/install-deps/debian/main.yml
@@ -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
-- 
2.47.2


  parent reply	other threads:[~2025-04-18 19:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-18 19:24 [PATCH v2 0/2] devconfig: firstconfig enhancements Luis Chamberlain
2025-04-18 19:24 ` [PATCH v2 1/2] devconfig: localize unnattended-upgrades sanity check Luis Chamberlain
2025-04-18 19:24 ` Luis Chamberlain [this message]
2025-04-18 19:30 ` [PATCH v2 0/2] devconfig: firstconfig enhancements Chuck Lever
2025-04-18 19:36   ` Luis Chamberlain

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250418192414.4192280-3-mcgrof@kernel.org \
    --to=mcgrof@kernel.org \
    --cc=cel@kernel.org \
    --cc=da.gomez@kruces.com \
    --cc=kdevops@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox