pcp/redhat-bugzilla-2027753.patch

124 lines
4.2 KiB
Diff
Raw Normal View History

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