Blame SOURCES/redhat-bugzilla-2027753.patch

f76dca
commit b076a10d6901338707cb5e5d503fc25e2f36ba94
f76dca
Author: Nathan Scott <nathans@redhat.com>
f76dca
Date:   Wed Dec 8 15:24:49 2021 +1100
f76dca
f76dca
    Resolve inconsistencies in new 'farm' and other systemd units
f76dca
    
f76dca
    This change most importantly introduces the Wants= line Mark
f76dca
    (and Jan earlier, indirectly) proposed to make pmlogger_farm
f76dca
    handling function as end-users will expect when manipulating
f76dca
    the pmlogger.service.  Ditto for pmie.
f76dca
    
f76dca
    There's also several cleanups of things that are inconsistent
f76dca
    and just plain wrong or missing, particularly in spec files.
f76dca
    
f76dca
    This supercedes PR #1492 and PR #1489.
f76dca
    This resolves Red Hat BZ #2027753.
f76dca
f76dca
diff --git a/src/pmie/pmie.service.in b/src/pmie/pmie.service.in
f76dca
index d234c8a5e5..bf4e64980a 100644
f76dca
--- a/src/pmie/pmie.service.in
f76dca
+++ b/src/pmie/pmie.service.in
f76dca
@@ -4,7 +4,7 @@ Documentation=man:pmie(1)
f76dca
 After=network-online.target pmcd.service
f76dca
 Before=pmie_check.timer pmie_daily.timer
f76dca
 BindsTo=pmie_check.timer pmie_daily.timer
f76dca
-Wants=pmcd.service
f76dca
+Wants=pmcd.service pmie_farm.service
f76dca
 
f76dca
 [Service]
f76dca
 Type=notify
f76dca
diff --git a/src/pmie/pmie_farm.service.in b/src/pmie/pmie_farm.service.in
f76dca
index 6679e48ba1..5459adb310 100644
f76dca
--- a/src/pmie/pmie_farm.service.in
f76dca
+++ b/src/pmie/pmie_farm.service.in
f76dca
@@ -22,6 +22,3 @@ User=@PCP_USER@
f76dca
 
f76dca
 [Install]
f76dca
 WantedBy=multi-user.target
f76dca
-
f76dca
-# This dependency will be removed in PCPv6.
f76dca
-WantedBy=pmie.service
f76dca
diff --git a/src/pmlogger/pmlogger.service.in b/src/pmlogger/pmlogger.service.in
f76dca
index de0df29db1..59299ac15d 100644
f76dca
--- a/src/pmlogger/pmlogger.service.in
f76dca
+++ b/src/pmlogger/pmlogger.service.in
f76dca
@@ -4,7 +4,7 @@ Documentation=man:pmlogger(1)
f76dca
 After=network-online.target pmcd.service
f76dca
 Before=pmlogger_check.timer pmlogger_daily.timer
f76dca
 BindsTo=pmlogger_check.timer pmlogger_daily.timer
f76dca
-Wants=pmcd.service
f76dca
+Wants=pmcd.service pmlogger_farm.service
f76dca
 
f76dca
 [Service]
f76dca
 Type=notify
f76dca
diff --git a/src/pmlogger/pmlogger_farm.service.in b/src/pmlogger/pmlogger_farm.service.in
f76dca
index fe753afdf6..3bfa2e7098 100644
f76dca
--- a/src/pmlogger/pmlogger_farm.service.in
f76dca
+++ b/src/pmlogger/pmlogger_farm.service.in
f76dca
@@ -22,6 +22,3 @@ User=@PCP_USER@
f76dca
 
f76dca
 [Install]
f76dca
 WantedBy=multi-user.target
f76dca
-
f76dca
-# This dependency will be removed in PCPv6.
f76dca
-WantedBy=pmlogger.service
f76dca
f76dca
commit cc2dddfb7a04d98f97bdf759f057bae2727260ff
f76dca
Author: Nathan Scott <nathans@redhat.com>
f76dca
Date:   Thu Dec 9 10:41:22 2021 +1100
f76dca
f76dca
    Resolve inconsistencies in new 'farm' systemd timers
f76dca
    
f76dca
    When the farm systemd timers were introduced the check interval
f76dca
    was drastically reduced from half hourly to 5 minutely.  There
f76dca
    wasn't any discussion about rationales for this and its now not
f76dca
    consistent (does not dovetail at all) with the primary pmlogger
f76dca
    and pmie service.  If startup takes a long time (large farms or
f76dca
    slow networks) these will likely overlap constantly, and timing
f76dca
    should be such that we work with the primary services in mind.
f76dca
    
f76dca
    Reset to half hourly for these checks, and lets revisit this in
f76dca
    the new year when the other systemd changes are being proposed.
f76dca
    
f76dca
    Related to https://github.com/performancecopilot/pcp/pull/1495
f76dca
f76dca
diff --git a/src/pmie/pmie_farm_check.timer b/src/pmie/pmie_farm_check.timer
f76dca
index ee7aa21242..97dc061af2 100644
f76dca
--- a/src/pmie/pmie_farm_check.timer
f76dca
+++ b/src/pmie/pmie_farm_check.timer
f76dca
@@ -1,10 +1,11 @@
f76dca
 [Unit]
f76dca
-Description=5 minute check of pmie farm instances
f76dca
+Description=Half-hourly check of pmie farm instances
f76dca
 
f76dca
 [Timer]
f76dca
-# if enabled, runs 1m after boot and every 5 mins
f76dca
+# if enabled, runs 1m after boot and every half hour
f76dca
 OnBootSec=1min
f76dca
-OnCalendar=*:00/5
f76dca
+OnCalendar=*-*-* *:28:10
f76dca
+OnCalendar=*-*-* *:58:10
f76dca
 
f76dca
 [Install]
f76dca
 WantedBy=timers.target
f76dca
diff --git a/src/pmlogger/pmlogger_farm_check.timer b/src/pmlogger/pmlogger_farm_check.timer
f76dca
index 094fb4505d..f234ef7839 100644
f76dca
--- a/src/pmlogger/pmlogger_farm_check.timer
f76dca
+++ b/src/pmlogger/pmlogger_farm_check.timer
f76dca
@@ -1,10 +1,11 @@
f76dca
 [Unit]
f76dca
-Description=5 minute check of pmlogger farm instances
f76dca
+Description=Half-hourly check of pmlogger farm instances
f76dca
 
f76dca
 [Timer]
f76dca
-# if enabled, runs 1m after boot and every 5 mins
f76dca
+# if enabled, runs 1m after boot and every half hour
f76dca
 OnBootSec=1min
f76dca
-OnCalendar=*:00/5
f76dca
+OnCalendar=*-*-* *:25:10
f76dca
+OnCalendar=*-*-* *:55:10
f76dca
 
f76dca
 [Install]
f76dca
 WantedBy=timers.target