Skip to content

Commit dd46368

Browse files
authored
Merge pull request #1060 from kgaillot/fixes
Fixes
2 parents 25920db + 403e357 commit dd46368

File tree

4 files changed

+18
-9
lines changed

4 files changed

+18
-9
lines changed

doc/Pacemaker_Explained/en-US/Ch-Alerts.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ In the example above, the cluster will call +my-script.sh+ for each event.
3737
Multiple alert agents may be configured; the cluster will call all of them for
3838
each event.
3939

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

4144
== Alert Recipients ==
4245

doc/Pacemaker_Explained/en-US/Ch-Resources.txt

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -311,14 +311,16 @@ indexterm:[priority,Resource Option]
311311
indexterm:[Resource,Option,priority]
312312

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

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

extra/alerts/alert_file.sh.sample

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ debug_exec_order_default="false"
4545
# Here, we define an instance attribute "debug_exec_order".
4646
: ${debug_exec_order=${debug_exec_order_default}}
4747

48-
if [ "${debug_exec_order}" = "true" ]
48+
if [ "${debug_exec_order}" = "true" ]; then
4949
tstamp=`printf "%04d. " "$CRM_alert_node_sequence"`
5050
if [ ! -z $CRM_alert_timestamp ]; then
5151
tstamp="${tstamp} $CRM_alert_timestamp (`date "+%H:%M:%S.%06N"`): "

lib/common/iso8601.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1001,6 +1001,12 @@ ha_set_tm_time(crm_time_t * target, struct tm *source)
10011001
int h_offset = 0;
10021002
int m_offset = 0;
10031003

1004+
/* Ensure target is fully initialized */
1005+
target->years = 0;
1006+
target->months = 0;
1007+
target->days = 0;
1008+
target->seconds = 0;
1009+
target->offset = 0;
10041010
target->duration = FALSE;
10051011

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

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

1032-
target->offset = 0;
10331037
target->offset += 60 * 60 * h_offset;
10341038
target->offset += 60 * m_offset;
10351039
}

0 commit comments

Comments
 (0)