Blob Blame History Raw
From 414f81cd855692ac1f6d2268acf2fe21f1772204 Mon Sep 17 00:00:00 2001
From: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Date: Tue, 3 May 2022 19:13:24 +0200
Subject: [PATCH] systemd: Better support package and upgrade.

RH-Author: Emanuele Giuseppe Esposito <eesposit@redhat.com>
RH-MergeRequest: 58: systemd: Better support package and upgrade.
RH-Commit: [1/1] 04d6c0910f7c52193bda82bfe45100129db7fa3d
RH-Bugzilla: 2081003
RH-Acked-by: Vitaly Kuznetsov <vkuznets@redhat.com>
RH-Acked-by: Jon Maloy <jmaloy@redhat.com>

commit 34a26f7f59f2963691e36ca0476bec9fc9ccef63
Author: Scott Moser <smoser@brickies.net>
Date:   Thu Sep 8 13:17:37 2016 -0400

    systemd: Better support package and upgrade.

    In systemd, package installation before the system is fully booted
    (systemctl is-system-running ==  starting) may result in the package not
    being started.  Upgrade (package_upgrade: true) can also cause failure if
    that is done during systemd boot.

    The solution here is:
     a.) move config modules that do or may do package installation to
         'final_modules'. That list is:
         - snappy
         - package-update-upgrade-install
         - fan
         - landscape
         - lxd
         - puppet
         - chef
         - salt-minion
         - mcollective
     b.) move cloud-final.service to run as 'Type=idle'

    LP: #1576692, #1621336

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>

Conflicts:
- Upstream file changes config/cloud.cfg, instead here our config file is in
rhel/cloud.cfg.
- Packages modified in upstream but not present here: byobu, snappy
- multi-user.target is already present in cloud-final.service.tmpl,
but only for ubuntu, debian and unknown variants
---
 rhel/cloud.cfg | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/rhel/cloud.cfg b/rhel/cloud.cfg
index cbee197a..7217781e 100644
--- a/rhel/cloud.cfg
+++ b/rhel/cloud.cfg
@@ -31,16 +31,16 @@ cloud_config_modules:
  - set-passwords
  - rh_subscription
  - yum-add-repo
- - package-update-upgrade-install
  - timezone
- - puppet
- - chef
- - salt-minion
- - mcollective
  - disable-ec2-metadata
  - runcmd
 
 cloud_final_modules:
+ - package-update-upgrade-install
+ - puppet
+ - chef
+ - salt-minion
+ - mcollective
  - rightscale_userdata
  - scripts-per-once
  - scripts-per-boot
-- 
2.27.0