0245c0
From 414f81cd855692ac1f6d2268acf2fe21f1772204 Mon Sep 17 00:00:00 2001
0245c0
From: Emanuele Giuseppe Esposito <eesposit@redhat.com>
0245c0
Date: Tue, 3 May 2022 19:13:24 +0200
0245c0
Subject: [PATCH] systemd: Better support package and upgrade.
0245c0
0245c0
RH-Author: Emanuele Giuseppe Esposito <eesposit@redhat.com>
0245c0
RH-MergeRequest: 58: systemd: Better support package and upgrade.
0245c0
RH-Commit: [1/1] 04d6c0910f7c52193bda82bfe45100129db7fa3d
0245c0
RH-Bugzilla: 2081003
0245c0
RH-Acked-by: Vitaly Kuznetsov <vkuznets@redhat.com>
0245c0
RH-Acked-by: Jon Maloy <jmaloy@redhat.com>
0245c0
0245c0
commit 34a26f7f59f2963691e36ca0476bec9fc9ccef63
0245c0
Author: Scott Moser <smoser@brickies.net>
0245c0
Date:   Thu Sep 8 13:17:37 2016 -0400
0245c0
0245c0
    systemd: Better support package and upgrade.
0245c0
0245c0
    In systemd, package installation before the system is fully booted
0245c0
    (systemctl is-system-running ==  starting) may result in the package not
0245c0
    being started.  Upgrade (package_upgrade: true) can also cause failure if
0245c0
    that is done during systemd boot.
0245c0
0245c0
    The solution here is:
0245c0
     a.) move config modules that do or may do package installation to
0245c0
         'final_modules'. That list is:
0245c0
         - snappy
0245c0
         - package-update-upgrade-install
0245c0
         - fan
0245c0
         - landscape
0245c0
         - lxd
0245c0
         - puppet
0245c0
         - chef
0245c0
         - salt-minion
0245c0
         - mcollective
0245c0
     b.) move cloud-final.service to run as 'Type=idle'
0245c0
0245c0
    LP: #1576692, #1621336
0245c0
0245c0
Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
0245c0
0245c0
Conflicts:
0245c0
- Upstream file changes config/cloud.cfg, instead here our config file is in
0245c0
rhel/cloud.cfg.
0245c0
- Packages modified in upstream but not present here: byobu, snappy
0245c0
- multi-user.target is already present in cloud-final.service.tmpl,
0245c0
but only for ubuntu, debian and unknown variants
0245c0
---
0245c0
 rhel/cloud.cfg | 10 +++++-----
0245c0
 1 file changed, 5 insertions(+), 5 deletions(-)
0245c0
0245c0
diff --git a/rhel/cloud.cfg b/rhel/cloud.cfg
0245c0
index cbee197a..7217781e 100644
0245c0
--- a/rhel/cloud.cfg
0245c0
+++ b/rhel/cloud.cfg
0245c0
@@ -31,16 +31,16 @@ cloud_config_modules:
0245c0
  - set-passwords
0245c0
  - rh_subscription
0245c0
  - yum-add-repo
0245c0
- - package-update-upgrade-install
0245c0
  - timezone
0245c0
- - puppet
0245c0
- - chef
0245c0
- - salt-minion
0245c0
- - mcollective
0245c0
  - disable-ec2-metadata
0245c0
  - runcmd
0245c0
 
0245c0
 cloud_final_modules:
0245c0
+ - package-update-upgrade-install
0245c0
+ - puppet
0245c0
+ - chef
0245c0
+ - salt-minion
0245c0
+ - mcollective
0245c0
  - rightscale_userdata
0245c0
  - scripts-per-once
0245c0
  - scripts-per-boot
0245c0
-- 
0245c0
2.27.0
0245c0