From 4cbc5ee254ea8e6ad4bfdf9da37bcf682870c280 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Thu, 26 May 2022 14:04:24 -0700 Subject: [PATCH] Perform package upgrades prior to zuul cluster node reboots This serves two purposes. The first is that not all packages are updated by unattended-upgrades beacuse it may not be safe to upgrade packages while services are running. We should be safe in this situation because we've gracefully stopped services and can proceed with package updates. The other is unattended upgrades runs daily which means we could end up almost 24 hours out of date prior to rebooting. This ensures we have the latest and greatest packages installed just prior to rebooting. Change-Id: Id351b5478e925ed1b4fbb6b3e27f2c0b6af8b897 --- playbooks/zuul_reboot.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/playbooks/zuul_reboot.yaml b/playbooks/zuul_reboot.yaml index 1fd763c9a2..1cb00b5a58 100644 --- a/playbooks/zuul_reboot.yaml +++ b/playbooks/zuul_reboot.yaml @@ -13,6 +13,10 @@ include_role: name: zuul-executor tasks_from: graceful + - name: Upgrade executor server packages + apt: + update_cache: yes + upgrade: yes - name: Reboot the executor server reboot: - name: Start the executor @@ -28,6 +32,10 @@ include_role: name: zuul-merger tasks_from: graceful + - name: Upgrade merger server packages + apt: + update_cache: yes + upgrade: yes - name: Reboot the merger server reboot: - name: Start the merger @@ -49,6 +57,10 @@ include_role: name: zuul-web tasks_from: stop + - name: Upgrade scheduler server packages + apt: + update_cache: yes + upgrade: yes - name: Reboot the scheduler server reboot: - name: Start the scheduler process