Skip to content

Commit

Permalink
Merge pull request #1700 from kgaillot/release
Browse files Browse the repository at this point in the history
Release Pacemaker 2.0.1-rc5
  • Loading branch information
kgaillot authored Feb 25, 2019
2 parents d757393 + 799068a commit 22ee9a7
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 25 deletions.
7 changes: 7 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
* Mon Feb 25 2019 Ken Gaillot <kgaillot@redhat.com> Pacemaker-2.0.1-rc5
- Changesets: 17
- Diff: 15 files changed, 1037 insertions(+), 677 deletions(-)

- Changes since Pacemaker-2.0.1-rc4
+ scheduler: regression test compatibility with glib 2.59.0

* Tue Jan 29 2019 Ken Gaillot <kgaillot@redhat.com> Pacemaker-2.0.1-rc4
- Changesets: 42
15 files changed, 216 insertions(+), 137 deletions(-)
Expand Down
2 changes: 1 addition & 1 deletion daemons/schedulerd/sched_notif.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ dup_attr(gpointer key, gpointer value, gpointer user_data)
static void
add_notify_data_to_action_meta(notify_data_t *n_data, pe_action_t *action)
{
for (GList *item = n_data->keys; item; item = item->next) {
for (GSList *item = n_data->keys; item; item = item->next) {
pcmk_nvpair_t *nvpair = item->data;

add_hash_param(action->meta, nvpair->name, nvpair->value);
Expand Down
11 changes: 7 additions & 4 deletions doc/Pacemaker_Explained/en-US/Ch-Advanced-Resources.txt
Original file line number Diff line number Diff line change
Expand Up @@ -681,16 +681,16 @@ and what is about to happen to it.

The variables come in pairs, such as
+OCF_RESKEY_CRM_meta_notify_start_resource+ and
+OCF_RESKEY_CRM_meta_notify_start_uname+ and should be treated as an
+OCF_RESKEY_CRM_meta_notify_start_uname+, and should be treated as an
array of whitespace-separated elements.

+OCF_RESKEY_CRM_meta_notify_inactive_resource+ is an exception as the
+OCF_RESKEY_CRM_meta_notify_inactive_resource+ is an exception, as the
matching +uname+ variable does not exist since inactive resources
are not running on any node.

Thus in order to indicate that +clone:0+ will be started on +sles-1+,
Thus, in order to indicate that +clone:0+ will be started on +sles-1+,
+clone:2+ will be started on +sles-3+, and +clone:3+ will be started
on +sles-2+, the cluster would set
on +sles-2+, the cluster would set:

.Notification variables
======
Expand Down Expand Up @@ -747,6 +747,9 @@ Pacemaker will log but otherwise ignore failures of notify actions.
[width="95%",cols="5,<3",options="header",align="center"]
|=========================================================

|Variable
|Description

|OCF_RESKEY_CRM_meta_notify_master_resource
|Resources that are running in +Master+ mode
indexterm:[Environment Variable,OCF_RESKEY_CRM_meta_notify_,master_resource]
Expand Down
10 changes: 5 additions & 5 deletions include/crm/common/nvpair.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ typedef struct pcmk_nvpair_s {
char *value;
} pcmk_nvpair_t;

GList *pcmk_prepend_nvpair(GList *nvpairs, const char *name, const char *value);
void pcmk_free_nvpairs(GList *nvpairs);
GList *pcmk_sort_nvpairs(GList *list);
GList *pcmk_xml_attrs2nvpairs(xmlNode *xml);
void pcmk_nvpairs2xml_attrs(GList *list, xmlNode *xml);
GSList *pcmk_prepend_nvpair(GSList *nvpairs, const char *name, const char *value);
void pcmk_free_nvpairs(GSList *nvpairs);
GSList *pcmk_sort_nvpairs(GSList *list);
GSList *pcmk_xml_attrs2nvpairs(xmlNode *xml);
void pcmk_nvpairs2xml_attrs(GSList *list, xmlNode *xml);

xmlNode *crm_create_nvpair_xml(xmlNode *parent, const char *id,
const char *name, const char *value);
Expand Down
2 changes: 1 addition & 1 deletion include/crm/pengine/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ typedef struct pe__order_constraint_s {
} pe__ordering_t;

typedef struct notify_data_s {
GList *keys; // Environment variable name/value pairs
GSList *keys; // Environment variable name/value pairs

const char *action;

Expand Down
26 changes: 13 additions & 13 deletions lib/common/nvpair.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ pcmk__free_nvpair(gpointer data)
* \note The caller is responsible for freeing the list with
* \c pcmk_free_nvpairs().
*/
GList *
pcmk_prepend_nvpair(GList *nvpairs, const char *name, const char *value)
GSList *
pcmk_prepend_nvpair(GSList *nvpairs, const char *name, const char *value)
{
return g_list_prepend(nvpairs, pcmk__new_nvpair(name, value));
return g_slist_prepend(nvpairs, pcmk__new_nvpair(name, value));
}

/*!
Expand All @@ -92,9 +92,9 @@ pcmk_prepend_nvpair(GList *nvpairs, const char *name, const char *value)
* \param[in] list List to free
*/
void
pcmk_free_nvpairs(GList *nvpairs)
pcmk_free_nvpairs(GSList *nvpairs)
{
g_list_free_full(nvpairs, pcmk__free_nvpair);
g_slist_free_full(nvpairs, pcmk__free_nvpair);
}

/*!
Expand Down Expand Up @@ -135,10 +135,10 @@ pcmk__compare_nvpair(gconstpointer a, gconstpointer b)
*
* \return New head of list
*/
GList *
pcmk_sort_nvpairs(GList *list)
GSList *
pcmk_sort_nvpairs(GSList *list)
{
return g_list_sort(list, pcmk__compare_nvpair);
return g_slist_sort(list, pcmk__compare_nvpair);
}

/*!
Expand All @@ -150,10 +150,10 @@ pcmk_sort_nvpairs(GList *list)
* \note It is the caller's responsibility to free the list with
* \c pcmk_free_nvpairs().
*/
GList *
GSList *
pcmk_xml_attrs2nvpairs(xmlNode *xml)
{
GList *result = NULL;
GSList *result = NULL;

for (xmlAttrPtr iter = pcmk__first_xml_attr(xml); iter != NULL;
iter = iter->next) {
Expand All @@ -169,7 +169,7 @@ pcmk_xml_attrs2nvpairs(xmlNode *xml)
* \internal
* \brief Add an XML attribute corresponding to a name/value pair
*
* Suitable for \c g_list_foreach(), this function adds a NAME=VALUE
* Suitable for glib list iterators, this function adds a NAME=VALUE
* XML attribute based on a given name/value pair.
*
* \param[in] data Name/value pair
Expand All @@ -191,9 +191,9 @@ pcmk__nvpair_add_xml_attr(gpointer data, gpointer user_data)
* \param[in,out] xml XML node to add attributes to
*/
void
pcmk_nvpairs2xml_attrs(GList *list, xmlNode *xml)
pcmk_nvpairs2xml_attrs(GSList *list, xmlNode *xml)
{
g_list_foreach(list, pcmk__nvpair_add_xml_attr, xml);
g_slist_foreach(list, pcmk__nvpair_add_xml_attr, xml);
}

// XML attribute handling
Expand Down
2 changes: 1 addition & 1 deletion lib/common/xml.c
Original file line number Diff line number Diff line change
Expand Up @@ -4092,7 +4092,7 @@ xmlNode *
sorted_xml(xmlNode *input, xmlNode *parent, gboolean recursive)
{
xmlNode *child = NULL;
GList *nvpairs = NULL;
GSList *nvpairs = NULL;
xmlNode *result = NULL;
const char *name = NULL;

Expand Down

0 comments on commit 22ee9a7

Please sign in to comment.