From 7bb912e1c313c42683d11f5261edabb971028cf6 Mon Sep 17 00:00:00 2001
From: Ken Gaillot <kgaillot@redhat.com>
Date: Tue, 2 May 2017 10:55:21 -0500
Subject: [PATCH 1/4] Build: rpmlintrc: update rpmlint filters
---
rpmlintrc | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/rpmlintrc b/rpmlintrc
index 2e9aca3..ee3c772 100644
--- a/rpmlintrc
+++ b/rpmlintrc
@@ -39,3 +39,9 @@ addFilter("E: incoherent-logrotate-file /etc/logrotate.d/pacemaker")
# buildbot builds the not-yet-released version
addFilter("W: incoherent-version-in-changelog")
+
+# pacemaker_remote scriptlets use a state file
+addFilter("W: dangerous-command-in-%(pre|postun|posttrans) rm")
+
+# We should really use "pacemaker-remote", but we don't
+addFilter("W: incoherent-init-script-name pacemaker_remote")
--
1.8.3.1
From 06e2e269091ba69e699301d8c86c58ef94809be0 Mon Sep 17 00:00:00 2001
From: Ken Gaillot <kgaillot@redhat.com>
Date: Tue, 2 May 2017 08:57:08 -0500
Subject: [PATCH 2/4] Low: systemd unit files: add dependency on
resource-agents-deps
also clean up unit files a bit
---
lrmd/pacemaker_remote.service.in | 5 +++++
mcp/pacemaker.service.in | 33 +++++++++++++++++++++------------
tools/crm_mon.service.in | 1 +
3 files changed, 27 insertions(+), 12 deletions(-)
diff --git a/lrmd/pacemaker_remote.service.in b/lrmd/pacemaker_remote.service.in
index 6309ad2..86c2fd0 100644
--- a/lrmd/pacemaker_remote.service.in
+++ b/lrmd/pacemaker_remote.service.in
@@ -1,8 +1,13 @@
[Unit]
Description=Pacemaker Remote Service
Documentation=man:pacemaker_remoted http://clusterlabs.org/doc/en-US/Pacemaker/1.1-pcs/html/Pacemaker_Remote/index.html
+
After=network.target
After=time-sync.target
+After=resource-agents-deps.target
+Wants=resource-agents-deps.target
+After=syslog.service
+After=rsyslog.service
[Install]
WantedBy=multi-user.target
diff --git a/mcp/pacemaker.service.in b/mcp/pacemaker.service.in
index 4d17b52..8ebadc6 100644
--- a/mcp/pacemaker.service.in
+++ b/mcp/pacemaker.service.in
@@ -2,23 +2,35 @@
Description=Pacemaker High Availability Cluster Manager
Documentation=man:pacemakerd http://clusterlabs.org/doc/en-US/Pacemaker/1.1-pcs/html/Pacemaker_Explained/index.html
-After=dbus.service
-After=basic.target
-After=syslog.service
-After=rsyslog.service
+# DefaultDependencies takes care of sysinit.target,
+# basic.target, and shutdown.target
+
+# We need networking to bind to a network address. It is recommended not to
+# use Wants or Requires with network.target, and not to use
+# network-online.target for server daemons.
After=network.target
+
+# Time syncs can make the clock jump backward, which messes with logging
+# and failure timestamps, so wait until it's done.
After=time-sync.target
-After=corosync.service
-Requires=dbus.service
-Requires=basic.target
+# Some OCF resources may have dependencies that aren't managed by the cluster;
+# these must be started before Pacemaker and stopped after it. The
+# resource-agents package provides this target, which lets system adminstrators
+# add drop-ins for those dependencies.
+After=resource-agents-deps.target
+Wants=resource-agents-deps.target
+
+After=syslog.service
+After=rsyslog.service
+After=corosync.service
Requires=corosync.service
-# if you use crm_mon, uncomment the line below.
-# Wants=crm_mon.service
+
[Install]
WantedBy=multi-user.target
+
[Service]
Type=simple
KillMode=process
@@ -62,6 +74,3 @@ Restart=on-failure
# crm_perror() writes directly to stderr, so ignore it here
# to avoid double-logging with the wrong format
StandardError=null
-
-# if you use crm_mon, uncomment the line below.
-# ExecStopPost=/bin/sh -c 'systemctl status crm_mon >/dev/null && systemctl stop crm_mon'
diff --git a/tools/crm_mon.service.in b/tools/crm_mon.service.in
index 1199f5f..7ae6649 100644
--- a/tools/crm_mon.service.in
+++ b/tools/crm_mon.service.in
@@ -1,6 +1,7 @@
[Unit]
Description=Daemon for pacemaker monitor
Documentation=man:crm_mon
+After=pacemaker.service
[Service]
Type=forking
--
1.8.3.1
From 5f264b4be1cd21cecc86a07d159bacc112042cce Mon Sep 17 00:00:00 2001
From: Ken Gaillot <kgaillot@redhat.com>
Date: Tue, 2 May 2017 12:15:54 -0500
Subject: [PATCH 3/4] Fix: libcib: avoid use-after-free when deleting CIB
connection
360cf350 ironically introduced one use-after-free while fixing another
---
lib/cib/cib_client.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/cib/cib_client.c b/lib/cib/cib_client.c
index 907bb5a..f0e332b 100644
--- a/lib/cib/cib_client.c
+++ b/lib/cib/cib_client.c
@@ -423,6 +423,7 @@ cib_free_callbacks(cib_t *cib)
list = g_list_remove(list, client);
free(client);
}
+ cib->notify_list = NULL;
}
destroy_op_callback_table();
}
--
1.8.3.1
From f2948e786548942b20c9724b59d243b6178e5411 Mon Sep 17 00:00:00 2001
From: Ken Gaillot <kgaillot@redhat.com>
Date: Wed, 3 May 2017 11:51:26 -0500
Subject: [PATCH 4/4] Low: xml: allow meta-attributes in bundles
ignored for now, but eventually will allow is-managed and target-role
to be inherited by bundle components
also allows id and desc attributes to be interleaved
---
xml/resources-2.8.rng | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/xml/resources-2.8.rng b/xml/resources-2.8.rng
index e20215b..b27a026 100644
--- a/xml/resources-2.8.rng
+++ b/xml/resources-2.8.rng
@@ -65,14 +65,14 @@
</element>
</define>
-
<define name="element-bundle">
<element name="bundle">
- <attribute name="id"><data type="ID"/></attribute>
- <optional>
- <attribute name="description"><text/></attribute>
- </optional>
<interleave>
+ <attribute name="id"><data type="ID"/></attribute>
+ <optional>
+ <attribute name="description"><text/></attribute>
+ </optional>
+ <ref name="element-resource-extra"/>
<choice>
<element name="docker">
<attribute name="image"><text/></attribute>
--
1.8.3.1