Bug 1733799

Summary: systemd presets request - Fedora IoT: Add presets for greenboot
Product: [Fedora] Fedora Reporter: Christian Glombek <cglombek>
Component: fedora-releaseAssignee: Mohan Boddu <mboddu>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 31CC: dennis, jdisnard, jkeating, kellin, kevin, mboddu, pbrobinson, sgallagh, thrcka, zbyszek
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-10-18 14:49:53 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Christian Glombek 2019-07-28 18:16:30 UTC
* Does the service require post-rpm-installation configuration in order to be useful (for example, does it need manual edits to a configuration file)?

optional - custom health checks can be dropped into /etc/greenboot/ (see https://github.com/LorbusChris/greenboot/ for more details) 

* Does the service listen on a network socket for connections originating on a separate physical or virtual machine?

no

* Is the service non-persistent (i.e. run once at startup and exit)?

yes, will however trigger a reboot and rpm-ostree rollback procedure on failure

* What is the exact name (or names) of the systemd unit files to be enabled?

greenboot.service
greenboot-healthcheck.service
greenboot-rpm-ostree-grub2-check-fallback.service
greenboot-grub2-set-counter.service
greenboot-grub2-set-success.service
greenboot-status.service
redboot.service
redboot-auto-reboot.service

* Is this request for all Fedora deliverables or only for some Editions (list them)?

only Fedora IoT

for the PR see https://src.fedoraproject.org/rpms/fedora-release/pull-request/81

Comment 1 Zbigniew Jędrzejewski-Szmek 2019-07-29 07:24:07 UTC
We've had problems with this in the past, hence an explicit check:
are those services fine (meaning completely silent) if grub2 is not installed or grub2 is installed as package but not used as the bootloader?

Comment 3 Stephen Gallagher 2019-07-30 14:18:20 UTC
Disregard that previous, wrong BZ tab.

Comment 4 Christian Glombek 2019-07-30 15:10:59 UTC
This has not been tested without grub2. some of the sub-packages/services directly rely on it.

Comment 5 Ben Cotton 2019-08-13 17:12:51 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle.
Changing version to '31'.

Comment 6 Ben Cotton 2019-08-13 18:52:06 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle.
Changing version to 31.

Comment 7 Peter Robinson 2019-10-18 14:49:53 UTC
Landed with fedora-release-31-1. Looks good:

$ ssh iot-gw
Boot Status is GREEN - Health Check SUCCESS
Last login: Mon Oct 14 10:07:05 2019 from XXXXX

$ sudo systemctl status greenboot
● greenboot.service - greenboot Success Scripts Runner
   Loaded: loaded (/usr/lib/systemd/system/greenboot.service; enabled; vendor preset: enabled)
   Active: active (exited) since Fri 2019-10-18 14:03:45 UTC; 3min 3s ago
  Process: 735 ExecStart=/usr/libexec/greenboot/greenboot green (code=exited, status=0/SUCCESS)
 Main PID: 735 (code=exited, status=0/SUCCESS)
      CPU: 17ms

Oct 18 14:03:45 localhost.localdomain systemd[1]: Starting greenboot Success Scripts Runner...
Oct 18 14:03:45 localhost.localdomain greenboot[735]: Boot Status is GREEN - Health Check SUCCESS
Oct 18 14:03:45 localhost.localdomain greenboot[735]: Running Green Scripts...
Oct 18 14:03:45 localhost.localdomain systemd[1]: Started greenboot Success Scripts Runner.
$