Compare commits
No commits in common. "c8" and "c8s" have entirely different histories.
3
.gitignore
vendored
3
.gitignore
vendored
@ -1 +1,2 @@
|
|||||||
SOURCES/v0.14.0.tar.gz
|
SOURCES/greenboot-0.15.1.tar.gz
|
||||||
|
/greenboot-0.15.1.tar.gz
|
||||||
|
@ -1 +0,0 @@
|
|||||||
6c94c4e8961505c4b704248f77ed76f20892cd4d SOURCES/v0.14.0.tar.gz
|
|
46
0001-avoid-running-checks-if-conditions-aren-t-met.patch
Normal file
46
0001-avoid-running-checks-if-conditions-aren-t-met.patch
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
From 2c0ac48ec6fd620816da4e240d9a2310922786d6 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Antonio Murdaca <runcom@linux.com>
|
||||||
|
Date: Thu, 8 Sep 2022 14:20:30 +0200
|
||||||
|
Subject: [PATCH] avoid running checks if conditions aren't met
|
||||||
|
|
||||||
|
Signed-off-by: Antonio Murdaca <runcom@linux.com>
|
||||||
|
---
|
||||||
|
.../greenboot/check/required.d/01_repository_dns_check.sh | 5 +++++
|
||||||
|
usr/lib/greenboot/check/required.d/02_watchdog.sh | 5 +++++
|
||||||
|
2 files changed, 10 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/usr/lib/greenboot/check/required.d/01_repository_dns_check.sh b/usr/lib/greenboot/check/required.d/01_repository_dns_check.sh
|
||||||
|
index f661dcd..51e52b3 100644
|
||||||
|
--- a/usr/lib/greenboot/check/required.d/01_repository_dns_check.sh
|
||||||
|
+++ b/usr/lib/greenboot/check/required.d/01_repository_dns_check.sh
|
||||||
|
@@ -44,6 +44,11 @@ if [[ ! -d $REPOS_DIRECTORY ]]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
+if [ -z "$(ls -A $REPOS_DIRECTORY)" ]; then
|
||||||
|
+ echo "${REPOS_DIRECTORY} is empty, skipping check"
|
||||||
|
+ exit 0
|
||||||
|
+fi
|
||||||
|
+
|
||||||
|
get_domain_names_from_platform_urls
|
||||||
|
if [[ -n $DOMAIN_NAMES ]]; then
|
||||||
|
get_dns_resolution_from_domain_names
|
||||||
|
diff --git a/usr/lib/greenboot/check/required.d/02_watchdog.sh b/usr/lib/greenboot/check/required.d/02_watchdog.sh
|
||||||
|
index 101750d..b072288 100644
|
||||||
|
--- a/usr/lib/greenboot/check/required.d/02_watchdog.sh
|
||||||
|
+++ b/usr/lib/greenboot/check/required.d/02_watchdog.sh
|
||||||
|
@@ -41,6 +41,11 @@ check_if_current_boot_is_wd_triggered() {
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
+if ! check_if_there_is_a_watchdog ; then
|
||||||
|
+ echo "No watchdog on the system, skipping check"
|
||||||
|
+ exit 0
|
||||||
|
+fi
|
||||||
|
+
|
||||||
|
# This is in order to test check_if_current_boot_is_wd_triggered
|
||||||
|
# function within a container
|
||||||
|
if [ "${1}" != "--source-only" ]; then
|
||||||
|
--
|
||||||
|
2.37.3
|
||||||
|
|
56
0001-disable-DefaultDependencies-to-fix-cycle-error.patch
Normal file
56
0001-disable-DefaultDependencies-to-fix-cycle-error.patch
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
From 483cff9b89abc30f218f223bef98704639bd08e7 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Sayan Paul <saypaul@redhat.com>
|
||||||
|
Date: Mon, 29 Aug 2022 22:33:06 +0530
|
||||||
|
Subject: [PATCH] disable DefaultDependencies to fix cycle error
|
||||||
|
|
||||||
|
The fix relaxes the dependecies of task-runner and status service that
|
||||||
|
otherwise causes issue in the service to start as well as missing
|
||||||
|
logs
|
||||||
|
signed off: saypaul@fedoraproject.org
|
||||||
|
---
|
||||||
|
usr/lib/systemd/system/greenboot-grub2-set-success.service | 2 ++
|
||||||
|
usr/lib/systemd/system/greenboot-status.service | 1 +
|
||||||
|
usr/lib/systemd/system/greenboot-task-runner.service | 2 ++
|
||||||
|
3 files changed, 5 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/usr/lib/systemd/system/greenboot-grub2-set-success.service b/usr/lib/systemd/system/greenboot-grub2-set-success.service
|
||||||
|
index f5ef55a..87a7a61 100644
|
||||||
|
--- a/usr/lib/systemd/system/greenboot-grub2-set-success.service
|
||||||
|
+++ b/usr/lib/systemd/system/greenboot-grub2-set-success.service
|
||||||
|
@@ -11,6 +11,8 @@
|
||||||
|
Description=Mark boot as successful in grubenv
|
||||||
|
Requires=boot-complete.target
|
||||||
|
After=boot-complete.target
|
||||||
|
+Conflicts=redboot.target
|
||||||
|
+DefaultDependencies=no
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
diff --git a/usr/lib/systemd/system/greenboot-status.service b/usr/lib/systemd/system/greenboot-status.service
|
||||||
|
index b12ec2f..f52c183 100644
|
||||||
|
--- a/usr/lib/systemd/system/greenboot-status.service
|
||||||
|
+++ b/usr/lib/systemd/system/greenboot-status.service
|
||||||
|
@@ -12,6 +12,7 @@ Description=greenboot MotD Generator
|
||||||
|
After=greenboot-healthcheck.service
|
||||||
|
After=greenboot-task-runner.service
|
||||||
|
After=redboot-task-runner.service
|
||||||
|
+DefaultDependencies=no
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
diff --git a/usr/lib/systemd/system/greenboot-task-runner.service b/usr/lib/systemd/system/greenboot-task-runner.service
|
||||||
|
index d1fc07f..bf5e94b 100644
|
||||||
|
--- a/usr/lib/systemd/system/greenboot-task-runner.service
|
||||||
|
+++ b/usr/lib/systemd/system/greenboot-task-runner.service
|
||||||
|
@@ -11,6 +11,8 @@
|
||||||
|
Description=greenboot Success Scripts Runner
|
||||||
|
Requires=boot-complete.target
|
||||||
|
After=boot-complete.target
|
||||||
|
+Conflicts=redboot.target
|
||||||
|
+DefaultDependencies=no
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
--
|
||||||
|
2.37.2
|
||||||
|
|
6
gating.yaml
Normal file
6
gating.yaml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
--- !Policy
|
||||||
|
product_versions:
|
||||||
|
- rhel-8
|
||||||
|
decision_context: osci_compose_gate
|
||||||
|
rules:
|
||||||
|
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
|
@ -1,7 +1,7 @@
|
|||||||
%global debug_package %{nil}
|
%global debug_package %{nil}
|
||||||
|
|
||||||
Name: greenboot
|
Name: greenboot
|
||||||
Version: 0.14.0
|
Version: 0.15.1
|
||||||
Release: 3%{?dist}
|
Release: 3%{?dist}
|
||||||
Summary: Generic Health Check Framework for systemd
|
Summary: Generic Health Check Framework for systemd
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
@ -11,7 +11,9 @@ License: LGPLv2+
|
|||||||
%global repo_tag v%{version}
|
%global repo_tag v%{version}
|
||||||
|
|
||||||
URL: https://github.com/%{repo_owner}/%{repo_name}
|
URL: https://github.com/%{repo_owner}/%{repo_name}
|
||||||
Source0: https://github.com/%{repo_owner}/%{repo_name}/archive/%{repo_tag}.tar.gz
|
Source0: https://github.com/%{repo_owner}/%{repo_name}/archive/%{repo_tag}.tar.g#/%{name}-%{version}.tar.gz
|
||||||
|
Patch0: 0001-disable-DefaultDependencies-to-fix-cycle-error.patch
|
||||||
|
Patch1: 0001-avoid-running-checks-if-conditions-aren-t-met.patch
|
||||||
|
|
||||||
ExcludeArch: s390x
|
ExcludeArch: s390x
|
||||||
BuildRequires: systemd-rpm-macros
|
BuildRequires: systemd-rpm-macros
|
||||||
@ -50,7 +52,7 @@ Obsoletes: greenboot-update-platforms-check <= 0.12.0
|
|||||||
%{summary}.
|
%{summary}.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%autosetup -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
|
||||||
@ -76,6 +78,7 @@ install -DpZm 0644 usr/lib/systemd/system/*.service %{buildroot}%{_unitdir}
|
|||||||
install -DpZm 0644 usr/lib/tmpfiles.d/greenboot-status-motd.conf %{buildroot}%{_tmpfilesdir}/greenboot-status-motd.conf
|
install -DpZm 0644 usr/lib/tmpfiles.d/greenboot-status-motd.conf %{buildroot}%{_tmpfilesdir}/greenboot-status-motd.conf
|
||||||
install -DpZm 0755 usr/lib/greenboot/check/required.d/* %{buildroot}%{_prefix}/lib/%{name}/check/required.d
|
install -DpZm 0755 usr/lib/greenboot/check/required.d/* %{buildroot}%{_prefix}/lib/%{name}/check/required.d
|
||||||
install -DpZm 0755 usr/lib/greenboot/check/wanted.d/* %{buildroot}%{_prefix}/lib/%{name}/check/wanted.d
|
install -DpZm 0755 usr/lib/greenboot/check/wanted.d/* %{buildroot}%{_prefix}/lib/%{name}/check/wanted.d
|
||||||
|
install -DpZm 0644 etc/greenboot/greenboot.conf %{buildroot}%{_sysconfdir}/%{name}/greenboot.conf
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%systemd_post greenboot-healthcheck.service
|
%systemd_post greenboot-healthcheck.service
|
||||||
@ -88,6 +91,7 @@ install -DpZm 0755 usr/lib/greenboot/check/wanted.d/* %{buildroot}%{_prefix}/lib
|
|||||||
%systemd_post greenboot-grub2-set-success.service
|
%systemd_post greenboot-grub2-set-success.service
|
||||||
%systemd_post greenboot-rpm-ostree-grub2-check-fallback.service
|
%systemd_post greenboot-rpm-ostree-grub2-check-fallback.service
|
||||||
%systemd_post redboot-auto-reboot.service
|
%systemd_post redboot-auto-reboot.service
|
||||||
|
%systemd_post greenboot-service-monitor.service
|
||||||
|
|
||||||
%post default-health-checks
|
%post default-health-checks
|
||||||
%systemd_post greenboot-loading-message.service
|
%systemd_post greenboot-loading-message.service
|
||||||
@ -102,6 +106,7 @@ install -DpZm 0755 usr/lib/greenboot/check/wanted.d/* %{buildroot}%{_prefix}/lib
|
|||||||
%systemd_preun greenboot-grub2-set-counter.service
|
%systemd_preun greenboot-grub2-set-counter.service
|
||||||
%systemd_preun greenboot-grub2-set-success.service
|
%systemd_preun greenboot-grub2-set-success.service
|
||||||
%systemd_preun greenboot-rpm-ostree-grub2-check-fallback.service
|
%systemd_preun greenboot-rpm-ostree-grub2-check-fallback.service
|
||||||
|
%systemd_preun greenboot-service-monitor.service
|
||||||
|
|
||||||
%preun default-health-checks
|
%preun default-health-checks
|
||||||
%systemd_preun greenboot-loading-message.service
|
%systemd_preun greenboot-loading-message.service
|
||||||
@ -116,6 +121,7 @@ install -DpZm 0755 usr/lib/greenboot/check/wanted.d/* %{buildroot}%{_prefix}/lib
|
|||||||
%systemd_postun greenboot-grub2-set-counter.service
|
%systemd_postun greenboot-grub2-set-counter.service
|
||||||
%systemd_postun greenboot-grub2-set-success.service
|
%systemd_postun greenboot-grub2-set-success.service
|
||||||
%systemd_postun greenboot-rpm-ostree-grub2-check-fallback.service
|
%systemd_postun greenboot-rpm-ostree-grub2-check-fallback.service
|
||||||
|
%systemd_postun greenboot-service-monitor.service
|
||||||
|
|
||||||
%postun default-health-checks
|
%postun default-health-checks
|
||||||
%systemd_postun greenboot-loading-message.service
|
%systemd_postun greenboot-loading-message.service
|
||||||
@ -156,6 +162,9 @@ install -DpZm 0755 usr/lib/greenboot/check/wanted.d/* %{buildroot}%{_prefix}/lib
|
|||||||
%{_unitdir}/greenboot-rpm-ostree-grub2-check-fallback.service
|
%{_unitdir}/greenboot-rpm-ostree-grub2-check-fallback.service
|
||||||
%{_libexecdir}/%{name}/redboot-auto-reboot
|
%{_libexecdir}/%{name}/redboot-auto-reboot
|
||||||
%{_unitdir}/redboot-auto-reboot.service
|
%{_unitdir}/redboot-auto-reboot.service
|
||||||
|
%{_libexecdir}/%{name}/greenboot-service-monitor
|
||||||
|
%{_unitdir}/greenboot-service-monitor.service
|
||||||
|
%{_sysconfdir}/%{name}/greenboot.conf
|
||||||
|
|
||||||
%files default-health-checks
|
%files default-health-checks
|
||||||
%{_prefix}/lib/%{name}/check/required.d/01_repository_dns_check.sh
|
%{_prefix}/lib/%{name}/check/required.d/01_repository_dns_check.sh
|
||||||
@ -164,6 +173,20 @@ install -DpZm 0755 usr/lib/greenboot/check/wanted.d/* %{buildroot}%{_prefix}/lib
|
|||||||
%{_prefix}/lib/%{name}/check/required.d/02_watchdog.sh
|
%{_prefix}/lib/%{name}/check/required.d/02_watchdog.sh
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Sep 08 2022 Peter Robinson <pbrobinson@fedoraproject.org> - 0.15.1-3
|
||||||
|
- Avoid running health checks if conditions aren't met
|
||||||
|
|
||||||
|
* Wed Aug 31 2022 Peter Robinson <pbrobinson@fedoraproject.org> - 0.15.1-2
|
||||||
|
- disable DefaultDependencies to fix cycle error
|
||||||
|
|
||||||
|
* Tue Aug 09 2022 Peter Robinson <pbrobinson@fedoraproject.org> - 0.15.1-1
|
||||||
|
- Add conf during installation
|
||||||
|
|
||||||
|
* Thu Jul 21 2022 Sayan Paul <saypaul@fedoraproject.org> - 0.15.0-1
|
||||||
|
- The 0.15.0 release
|
||||||
|
- Add service-monitor
|
||||||
|
- Resolves: rhbz#2053469
|
||||||
|
|
||||||
* Tue Jan 18 2022 Peter Robinson <pbrobinson@fedoraproject.org> - 0.14.0-3
|
* Tue Jan 18 2022 Peter Robinson <pbrobinson@fedoraproject.org> - 0.14.0-3
|
||||||
- Obsolete greenboot-status
|
- Obsolete greenboot-status
|
||||||
|
|
Loading…
Reference in New Issue
Block a user