Skip to content

Commit

Permalink
Merge pull request #1386 from ClusterLabs/1.1
Browse files Browse the repository at this point in the history
Pull 1.1.18 final back into master
  • Loading branch information
kgaillot committed Nov 14, 2017
2 parents aa0f5d5 + 2b07d5c commit f36ad36
Show file tree
Hide file tree
Showing 36 changed files with 523 additions and 623 deletions.
104 changes: 35 additions & 69 deletions ChangeLog
@@ -1,74 +1,18 @@
* Thu Nov 02 2017 Ken Gaillot <kgaillot@redhat.com> Pacemaker-1.1.18-rc4
- Update source tarball to revision: 88bd30b
- Changesets: 113
- Diff: 42 files changed, 1164 insertions(+), 651 deletions(-)

- Features added since Pacemaker-1.1.18-rc3
+ agents: ifspeed agent can optionally detect interface name from IP address

- Changes since Pacemaker-1.1.18-rc3
+ crmd: error more quickly if remote start fails due to missing key
+ pengine: allow resources to stop prior to probes completing
+ pengine: probe remote nodes for guest node resources
+ pengine: bundles need to wait only for other containers on the same node to be probed
+ pengine: correctly defer processing of resources inside containers
+ pengine: do not always expire failed operations of nested remotes
+ pengine: do not probe connection resources until the container is active
+ pengine: don't keep unique instances on same node
+ pengine: don't probe offline or unclean guest nodes
+ pengine: exclude exclusive resources and nodes from symmetric default score
+ pengine: have bundles log to stderr so that 'docker logs' works
+ pengine: if ignoring failure, also ignore migration-threshold
+ pengine: only pass requests for promote/demote flags onto the bundle's child
+ pengine: resources are allowed to stop before their state is known everywhere
+ pengine: restore the ability to send the transition graph via the disk if it gets too big
+ pengine: do not map ports into Docker container when net=host is specified
+ tools: allow crm_resource to operate on anonymous clones in unknown states
+ tools: crm_resource --cleanup on appropriate nodes if we don't know state of resource
+ tools: prevent disconnection from crmd during crm_resource --cleanup

* Mon Oct 23 2017 Ken Gaillot <kgaillot@redhat.com> Pacemaker-1.1.18-rc3
- Update source tarball to revision: 24b36d4
- Changesets: 19
- Diff: 18 files changed, 113 insertions(+), 82 deletions(-)

- Changes since Pacemaker-1.1.18-rc2
+ crmd: fix regression for legacy stacks introduced in rc1
+ lrmd: allow pre-1.1.15 cluster nodes to connect to current Pacemaker Remote
+ pengine: don't schedule reload and restart in same transition
(fixes CLBZ#5309, a regression introduced in 1.1.15)
+ pengine: fix use-after-free memory issue re-introduced by merge
+ tools: improve messages for crm_resource --force-* options

* Mon Oct 16 2017 Ken Gaillot <kgaillot@redhat.com> Pacemaker-1.1.18-rc2
- Update source tarball to revision: 62e8d4b
- Changesets: 31
- Diff: 23 files changed, 484 insertions(+), 284 deletions(-)

- Changes since Pacemaker-1.1.18-rc1
+ fix regressions introduced in rc1 (don't break crm_resource --lifetime,
avoid memory leak when caching meta-data,
keep previous format of crm_mon XML output for bundles)
+ crm_mon: avoid infinite process spawning if -E script can't be run
+ crm_mon: don't show previous exit-reason for failed action with none
+ libcrmservice: list systemd unit files, not only active units (BZ#5299)
+ libcrmservice: parse long description correctly for LSB meta-data

* Fri Oct 06 2017 Ken Gaillot <kgaillot@redhat.com> Pacemaker-1.1.18-rc1
- Update source tarball to revision: cb21fde
- Changesets: 428
- Diff: 153 files changed, 7895 insertions(+), 4415 deletions(-)
* Tue Nov 14 2017 Ken Gaillot <kgaillot@redhat.com> Pacemaker-1.1.18-1
- Update source tarball to revision: a9fbd15
- Changesets: 644
- Diff: 167 files changed, 9753 insertions(+), 5596 deletions(-)

- Features added since Pacemaker-1.1.17
+ warnings are now logged when using legacy syntax to be removed in 2.0
+ agents: ifspeed agent is now installed when building
+ agents: ifspeed agent can optionally detect interface name from IP address
+ alerts: support alert filters
+ alerts: support alerts for node attribute changes (experimental)
+ alerts: experimental support for alerts for node attribute changes
+ crmd,pengine: support unfencing of remote nodes
+ pengine: bundles now support all constraint types
+ pengine: bundles now support rkt containers
+ pengine: bundles support new container-attribute-target parameter
+ pengine: guest nodes are now probed like any other node
+ pengine,tools: logs and crm_mon show why resources changed state
+ stonith-ng: support new fencing resource parameter pcmk_delay_base
+ tools: new crm_resource option --why explains why resources are stopped
Expand All @@ -80,28 +24,50 @@
+ attrd: don't lose attributes set between attrd start-up and cluster join
+ attrd: fix multiple minor memory leaks
+ crmd: correctly record that unfencing is complete
+ crmd: error more quickly if remote start fails due to missing key
+ lrmd: remote resource operations return immediate error if key setup fails
+ pengine: validate no-quorum-policy=suicide correctly
+ pengine: avoid crash when alerts section has comments
+ pengine: detect permanent master scores at start-up
+ pengine: do not re-add a node's default score for each location constraint
+ lrmd: allow pre-1.1.15 cluster nodes to connect to current Pacemaker Remote
+ pengine: guest nodes are now probed like other nodes
+ pengine: probe remote nodes for guest node resources
+ pengine: do not probe guest/bundle connections until guest/bundle is active
+ pengine: allow resources to stop prior to probes completing
+ pengine: bundles wait only for other containers on same node to be probed
+ pengine: have bundles log to stderr so 'docker logs'/'journalctl -M' works
+ pengine: only pass requests for promote/demote flags onto the bundle's child
+ pengine: do not map ports into Docker container when net=host is specified
+ pengine: allow resources inside bundles to receive clone notifications
+ pengine: default to non-interleaved bundle ordering for safety
+ pengine: ensure bundle nodes and child resources are correctly cleaned up
+ pengine: prevent graph loops when fencing the host underneath a bundle
+ pengine: probe bundle connection resources
+ pengine: bundles now respect PCMK_authkey_location
+ pengine: fix multiple memory issues (use-after-free, use-of-NULL) with bundles
+ pengine: resources in bundles respect failcounts
+ pengine: ensure nested container connections run on the same host
+ pengine: ensure unrecoverable remote nodes are fenced even if no resources can run on them
+ pengine: ensure unrecoverable remote nodes are fenced even with no resources
+ pengine: handle resource migrating behind a migrating remote connection
+ pengine: don't prefer to keep unique instances on same node
+ pengine: exclude exclusive resources and nodes from symmetric default score
+ pengine: if ignoring failure, also ignore migration-threshold
+ pengine: restore the ability to send the transition graph via the disk if it gets too big
+ pengine: validate no-quorum-policy=suicide correctly
+ pengine: avoid crash when alerts section has comments
+ pengine: detect permanent master scores at start-up
+ pengine: do not re-add a node's default score for each location constraint
+ pengine: make sure calculated resource scores are consistent on different architectures
+ pengine: retrigger unfencing for changed device parameters only when necessary
+ pengine: don't schedule reload and restart in same transition (CLBZ#5309, regression introduced in 1.1.15)
+ stonith-ng: make fencing-device reappear properly after reenabling
+ stonith-ng: include pcmk_on_action in meta-data so 'on' can be overridden
+ tools: allow crm_report to work with no log files specified
+ tools: fix use-after-free in crm_diff introduced in 1.1.17
+ tools: allow crm_resource to operate on anonymous clones in unknown states
+ tools: crm_resource --cleanup on appropriate nodes if we don't know state of resource
+ tools: prevent disconnection from crmd during crm_resource --cleanup
+ tools: improve messages for crm_resource --force-* options
+ tools: crm_mon: avoid infinite process spawning if -E script can't be run
+ tools: crm_mon: don't show previous exit-reason for failed action with none
+ libcrmservice: list systemd unit files, not only active units (CLBZ#5299)
+ libcrmservice: parse long description correctly for LSB meta-data


* Thu Jul 06 2017 Ken Gaillot <kgaillot@redhat.com> Pacemaker-1.1.17-1
- Update source tarball to revision: 301bc44
Expand Down
2 changes: 1 addition & 1 deletion attrd/commands.c
Expand Up @@ -211,7 +211,7 @@ attrd_client_update(xmlNode *xml)
regex_t *r_patt = calloc(1, sizeof(regex_t));

crm_debug("Setting %s to %s", regex, value);
if (regcomp(r_patt, regex, REG_EXTENDED)) {
if (regcomp(r_patt, regex, REG_EXTENDED|REG_NOSUB)) {
crm_err("Bad regex '%s' for update", regex);

} else {
Expand Down
26 changes: 13 additions & 13 deletions configure.ac
Expand Up @@ -554,7 +554,7 @@ AC_PATH_PROGS(SCP, scp, /usr/bin/scp)
AC_PATH_PROGS(TAR, tar)
AC_PATH_PROGS(MD5, md5)
AC_PATH_PROGS(TEST, test)
AC_PATH_PROGS(PKGCONFIG, pkg-config)
PKG_PROG_PKG_CONFIG
AC_PATH_PROGS(XML2CONFIG, xml2-config)
AC_PATH_PROGS(VALGRIND_BIN, valgrind, /usr/bin/valgrind)
AC_DEFINE_UNQUOTED(VALGRIND_BIN, "$VALGRIND_BIN", Valgrind command)
Expand Down Expand Up @@ -695,20 +695,20 @@ if test "x$ac_cv_func_uuid_unparse" != xyes; then
AC_MSG_ERROR(You do not have the libuuid development package installed)
fi

if test x"${PKGCONFIG}" = x""; then
if test x"${PKG_CONFIG}" = x""; then
AC_MSG_ERROR(You need pkgconfig installed in order to build ${PACKAGE})
fi

if
$PKGCONFIG --exists glib-2.0
$PKG_CONFIG --exists glib-2.0
then
GLIBCONFIG="$PKGCONFIG glib-2.0"
GLIBCONFIG="$PKG_CONFIG glib-2.0"
else
set -x
echo PKG_CONFIG_PATH=$PKG_CONFIG_PATH
$PKGCONFIG --exists glib-2.0; echo $?
$PKGCONFIG --cflags glib-2.0; echo $?
$PKGCONFIG glib-2.0; echo $?
$PKG_CONFIG --exists glib-2.0; echo $?
$PKG_CONFIG --cflags glib-2.0; echo $?
$PKG_CONFIG glib-2.0; echo $?
set +x

AC_MSG_ERROR(You need glib2-devel installed in order to build ${PACKAGE})
Expand Down Expand Up @@ -903,14 +903,14 @@ if test "$ac_cv_header_ncurses_h" = "yes"; then
AC_CHECK_LIB(ncurses, printw,
[AC_DEFINE(HAVE_LIBNCURSES,1, have ncurses library)]
)
CURSESLIBS=`$PKGCONFIG --libs ncurses` || CURSESLIBS='-lncurses'
CURSESLIBS=`$PKG_CONFIG --libs ncurses` || CURSESLIBS='-lncurses'
fi

if test "$ac_cv_header_ncurses_ncurses_h" = "yes"; then
AC_CHECK_LIB(ncurses, printw,
[AC_DEFINE(HAVE_LIBNCURSES,1, have ncurses library)]
)
CURSESLIBS=`$PKGCONFIG --libs ncurses` || CURSESLIBS='-lncurses'
CURSESLIBS=`$PKG_CONFIG --libs ncurses` || CURSESLIBS='-lncurses'
fi

dnl Only look for non-n-library if there was no n-library.
Expand Down Expand Up @@ -1191,10 +1191,10 @@ AC_DEFINE_UNQUOTED(SUPPORT_DBUS, $HAVE_dbus, Support dbus)
AM_CONDITIONAL(BUILD_DBUS, test $HAVE_dbus = 1)

if test $HAVE_dbus = 1; then
CFLAGS="$CFLAGS `$PKGCONFIG --cflags dbus-1`"
CFLAGS="$CFLAGS `$PKG_CONFIG --cflags dbus-1`"
fi

DBUS_LIBS="$CFLAGS `$PKGCONFIG --libs dbus-1`"
DBUS_LIBS="$CFLAGS `$PKG_CONFIG --libs dbus-1`"
AC_SUBST(DBUS_LIBS)

AC_CHECK_TYPES([DBusBasicValue],,,[[#include <dbus/dbus.h>]])
Expand Down Expand Up @@ -1726,7 +1726,7 @@ SERVICELOG=servicelog-1
SERVICELOG_EXISTS="no"
AC_MSG_CHECKING(for $SERVICELOG packages)
if
$PKGCONFIG --exists $SERVICELOG
$PKG_CONFIG --exists $SERVICELOG
then
PKG_CHECK_MODULES([SERVICELOG], [servicelog-1])
SERVICELOG_EXISTS="yes"
Expand All @@ -1739,7 +1739,7 @@ OPENIPMI="OpenIPMI OpenIPMIposix"
OPENIPMI_SERVICELOG_EXISTS="no"
AC_MSG_CHECKING(for $SERVICELOG $OPENIPMI packages)
if
$PKGCONFIG --exists $OPENIPMI $SERVICELOG
$PKG_CONFIG --exists $OPENIPMI $SERVICELOG
then
PKG_CHECK_MODULES([OPENIPMI_SERVICELOG],[OpenIPMI OpenIPMIposix])
OPENIPMI_SERVICELOG_EXISTS="yes"
Expand Down
16 changes: 7 additions & 9 deletions crmd/crmd_metadata.c
Expand Up @@ -141,7 +141,7 @@ ra_version_from_xml(xmlNode *metadata_xml, const lrmd_rsc_info_t *rsc)
#endif

static struct ra_param_s *
ra_param_from_xml(xmlNode *param_xml, struct ra_metadata_s *md)
ra_param_from_xml(xmlNode *param_xml)
{
const char *param_name = crm_element_value(param_xml, "name");
const char *value;
Expand All @@ -160,19 +160,14 @@ ra_param_from_xml(xmlNode *param_xml, struct ra_metadata_s *md)
return NULL;
}

/* Currently, we abuse "unique" to indicate reloadability (as the
* inverse of unique). This is nonstandard and should eventually be
* replaced once the OCF standard is updated with something better.
*/
value = crm_element_value(param_xml, "unique");
if (!crm_is_true(value)) {
set_bit(p->rap_flags, ra_param_reloadable);
if (crm_is_true(value)) {
set_bit(p->rap_flags, ra_param_unique);
}

value = crm_element_value(param_xml, "private");
if (crm_is_true(value)) {
set_bit(p->rap_flags, ra_param_private);
set_bit(md->ra_flags, ra_uses_private);
}
return p;
}
Expand Down Expand Up @@ -235,11 +230,14 @@ metadata_cache_update(GHashTable *mdc, lrmd_rsc_info_t *rsc,
crm_warn("Metadata for %s:%s:%s has parameter without a name",
rsc->class, rsc->provider, rsc->type);
} else {
struct ra_param_s *p = ra_param_from_xml(match, md);
struct ra_param_s *p = ra_param_from_xml(match);

if (p == NULL) {
goto err;
}
if (is_set(p->rap_flags, ra_param_private)) {
set_bit(md->ra_flags, ra_uses_private);
}
md->ra_params = g_list_prepend(md->ra_params, p);
}
}
Expand Down
6 changes: 3 additions & 3 deletions crmd/crmd_metadata.h
Expand Up @@ -14,7 +14,7 @@ enum ra_flags_e {
};

enum ra_param_flags_e {
ra_param_reloadable = 0x01,
ra_param_unique = 0x01,
ra_param_private = 0x02,
};

Expand Down Expand Up @@ -43,8 +43,8 @@ static inline const char *
ra_param_flag2text(enum ra_param_flags_e flag)
{
switch (flag) {
case ra_param_reloadable:
return "reloadable";
case ra_param_unique:
return "unique";
case ra_param_private:
return "private";
default:
Expand Down
17 changes: 12 additions & 5 deletions crmd/lrm.c
Expand Up @@ -508,7 +508,8 @@ lrm_state_verify_stopped(lrm_state_t * lrm_state, enum crmd_fsa_state cur_state,
static char *
build_parameter_list(const lrmd_event_data_t *op,
const struct ra_metadata_s *metadata,
xmlNode *result, enum ra_param_flags_e param_type)
xmlNode *result, enum ra_param_flags_e param_type,
bool invert_for_xml)
{
int len = 0;
int max = 0;
Expand Down Expand Up @@ -562,7 +563,7 @@ build_parameter_list(const lrmd_event_data_t *op,
crm_trace("Rejecting %s for %s", param->rap_name, ra_param_flag2text(param_type));
}

if (result && accept) {
if (result && (invert_for_xml? !accept : accept)) {
const char *v = g_hash_table_lookup(op->params, param->rap_name);

if (v != NULL) {
Expand Down Expand Up @@ -592,8 +593,14 @@ append_restart_list(lrmd_event_data_t *op, struct ra_metadata_s *metadata,

if (is_set(metadata->ra_flags, ra_supports_reload)) {
restart = create_xml_node(NULL, XML_TAG_PARAMS);
/* Any parameters with unique="1" should be added into the "op-force-restart" list. */
list = build_parameter_list(op, metadata, restart, ra_param_reloadable);
/* Add any parameters with unique="1" to the "op-force-restart" list.
*
* (Currently, we abuse "unique=0" to indicate reloadability. This is
* nonstandard and should eventually be replaced once the OCF standard
* is updated with something better.)
*/
list = build_parameter_list(op, metadata, restart, ra_param_unique,
FALSE);

} else {
/* Resource does not support reloads */
Expand Down Expand Up @@ -630,7 +637,7 @@ append_secure_list(lrmd_event_data_t *op, struct ra_metadata_s *metadata,
* the insecure ones
*/
secure = create_xml_node(NULL, XML_TAG_PARAMS);
list = build_parameter_list(op, metadata, secure, ra_param_private);
list = build_parameter_list(op, metadata, secure, ra_param_private, TRUE);

if (list != NULL) {
digest = calculate_operation_digest(secure, version);
Expand Down
20 changes: 9 additions & 11 deletions doc/Pacemaker_Explained/en-US/Ch-Advanced-Resources.txt
Expand Up @@ -1423,10 +1423,13 @@ Pacemaker will automatically map the equivalent of
+source-dir=/etc/pacemaker/authkey target-dir=/etc/pacemaker/authkey+
and +source-dir-root=/var/log/pacemaker/bundles target-dir=/var/log+ into the
container, so it is not necessary to specify those paths in a
+storage-mapping+. (If the DC node has the PCMK_authkey_location variable set,
that will be used as the source instead of `/etc/pacemaker/authkey`; the value
should be identical on all nodes, if used. The user should not set the
PCMK_authkey_location environment variable inside the container.)
+storage-mapping+.
====

[IMPORTANT]
====
The +PCMK_authkey_location+ environment variable must not be set to anything
other than the default of `/etc/pacemaker/authkey` on any node in the cluster.
====

=== Bundle Primitive ===
Expand Down Expand Up @@ -1504,10 +1507,8 @@ This includes options such as +priority+, +target-role+, and +is-managed+. See

=== Limitations of Bundles ===

Bundle support is considered experimental. Cleaning up a running bundle, or
restarting pacemaker while a bundle is unmanaged or the cluster is in
maintenance mode, may cause the bundle to fail. The feature is believed to
be otherwise production-ready as of version 1.1.18.
Restarting pacemaker while a bundle is unmanaged or the cluster is in
maintenance mode may cause the bundle to fail.

Bundles may not be cloned or included in groups. This includes the bundle's
primitive and any resources implicitly created by Pacemaker for the bundle.
Expand All @@ -1517,6 +1518,3 @@ though a bundle's primitive may have them.

A bundle with a primitive can run on a Pacemaker Remote node only if the bundle
uses a distinct +control-port+.

Interacting directly with any resource or guest node implicitly created by
Pacemaker for the bundle is strongly discouraged and likely to cause problems.

0 comments on commit f36ad36

Please sign in to comment.