Skip to content

Commit

Permalink
Merge pull request #1060 from kgaillot/fixes
Browse files Browse the repository at this point in the history
Fixes
  • Loading branch information
kgaillot committed Jun 12, 2016
2 parents 25920db + 403e357 commit dd46368
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 9 deletions.
3 changes: 3 additions & 0 deletions doc/Pacemaker_Explained/en-US/Ch-Alerts.txt
Expand Up @@ -37,6 +37,9 @@ In the example above, the cluster will call +my-script.sh+ for each event.
Multiple alert agents may be configured; the cluster will call all of them for
each event.

Alert agents will be called only on cluster nodes. They will be called for
events involving Pacemaker Remote nodes, but they will never be called _on_
those nodes.

== Alert Recipients ==

Expand Down
14 changes: 8 additions & 6 deletions doc/Pacemaker_Explained/en-US/Ch-Resources.txt
Expand Up @@ -311,14 +311,16 @@ indexterm:[priority,Resource Option]
indexterm:[Resource,Option,priority]

|target-role
|started
|Started
|What state should the cluster attempt to keep this resource in? Allowed values:

* +stopped:+ Force the resource to be stopped
* +started:+ Allow the resource to be started (In the case of
<<s-resource-multistate,multi-state>> resources, they will not be promoted to
master)
* +master:+ Allow the resource to be started and, if appropriate, promoted
* +Stopped:+ Force the resource to be stopped
* +Started:+ Allow the resource to be started (and in the case of
<<s-resource-multistate,multi-state>> resources, promoted to master if
appropriate)
* +Slave:+ Allow the resource to be started, but only in Slave mode if
the resource is <<s-resource-multistate,multi-state>>
* +Master:+ Equivalent to +Started+
indexterm:[target-role,Resource Option]
indexterm:[Resource,Option,target-role]

Expand Down
2 changes: 1 addition & 1 deletion extra/alerts/alert_file.sh.sample
Expand Up @@ -45,7 +45,7 @@ debug_exec_order_default="false"
# Here, we define an instance attribute "debug_exec_order".
: ${debug_exec_order=${debug_exec_order_default}}

if [ "${debug_exec_order}" = "true" ]
if [ "${debug_exec_order}" = "true" ]; then
tstamp=`printf "%04d. " "$CRM_alert_node_sequence"`
if [ ! -z $CRM_alert_timestamp ]; then
tstamp="${tstamp} $CRM_alert_timestamp (`date "+%H:%M:%S.%06N"`): "
Expand Down
8 changes: 6 additions & 2 deletions lib/common/iso8601.c
Expand Up @@ -1001,6 +1001,12 @@ ha_set_tm_time(crm_time_t * target, struct tm *source)
int h_offset = 0;
int m_offset = 0;

/* Ensure target is fully initialized */
target->years = 0;
target->months = 0;
target->days = 0;
target->seconds = 0;
target->offset = 0;
target->duration = FALSE;

if (source->tm_year > 0) {
Expand All @@ -1013,7 +1019,6 @@ ha_set_tm_time(crm_time_t * target, struct tm *source)
target->days = 1 + source->tm_yday;
}

target->seconds = 0;
if (source->tm_hour >= 0) {
target->seconds += 60 * 60 * source->tm_hour;
}
Expand All @@ -1029,7 +1034,6 @@ ha_set_tm_time(crm_time_t * target, struct tm *source)
m_offset = (GMTOFF(source) - (3600 * h_offset)) / (60);
crm_trace("Offset (s): %ld, offset (hh:mm): %.2d:%.2d", GMTOFF(source), h_offset, m_offset);

target->offset = 0;
target->offset += 60 * 60 * h_offset;
target->offset += 60 * m_offset;
}
Expand Down

0 comments on commit dd46368

Please sign in to comment.