[ClusterLabs] Coming in 1.1.15: Event-driven alerts

renayama19661014 at ybb.ne.jp renayama19661014 at ybb.ne.jp
Wed Apr 27 14:19:52 UTC 2016


Hi All,

We have a request for a new SNMP function.


The order of traps is not right.

The turn of the trap is not sometimes followed.
This is because the handling of notice carries out "path" in async.
I think that it is necessary to wait for completion of the practice at "path" unit of "alerts".
 
The turn of the trap is different from the real stop order of the resource.

----
[root at rh72-01 ~]# grep Operation  /var/log/ha-log | grep stop
Apr 25 18:48:48 rh72-01 crmd[28897]:  notice: Operation prmDummy1_stop_0: ok (node=rh72-01, call=33, rc=0, cib-update=56, confirmed=true)
Apr 25 18:48:48 rh72-01 crmd[28897]:  notice: Operation prmDummy3_stop_0: ok (node=rh72-01, call=37, rc=0, cib-update=57, confirmed=true)
Apr 25 18:48:48 rh72-01 crmd[28897]:  notice: Operation prmDummy4_stop_0: ok (node=rh72-01, call=39, rc=0, cib-update=58, confirmed=true)
Apr 25 18:48:48 rh72-01 crmd[28897]:  notice: Operation prmDummy2_stop_0: ok (node=rh72-01, call=35, rc=0, cib-update=59, confirmed=true)
Apr 25 18:48:48 rh72-01 crmd[28897]:  notice: Operation prmDummy5_stop_0: ok (node=rh72-01, call=41, rc=0, cib-update=60, confirmed=true)

Apr 25 18:48:50 snmp-manager snmptrapd[6865]: 2016-04-25 18:48:50 <UNKNOWN> [UDP: [192.168.28.170]:40613->[192.168.28.189]:162]:#012DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (25512486) 2 days, 22:52:04.86#011SNMPv2-MIB::snmpTrapOID.0 = OID: PACEMAKER-MIB::pacemakerNotificationTrap#011PACEMAKER-MIB::pacemakerNotificationNode = STRING: "rh72-01"#011PACEMAKER-MIB::pacemakerNotificationResource = STRING: "prmDummy3"#011PACEMAKER-MIB::pacemakerNotificationOperation = STRING: "stop"#011PACEMAKER-MIB::pacemakerNotificationDescription = STRING: "ok"#011PACEMAKER-MIB::pacemakerNotificationStatus = INTEGER: 0#011PACEMAKER-MIB::pacemakerNotificationReturnCode = INTEGER: 0#011PACEMAKER-MIB::pacemakerNotificationTargetReturnCode = INTEGER: 0
Apr 25 18:48:50 snmp-manager snmptrapd[6865]: 2016-04-25 18:48:50 <UNKNOWN> [UDP: [192.168.28.170]:39581->[192.168.28.189]:162]:#012DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (25512489) 2 days, 22:52:04.89#011SNMPv2-MIB::snmpTrapOID.0 = OID: PACEMAKER-MIB::pacemakerNotificationTrap#011PACEMAKER-MIB::pacemakerNotificationNode = STRING: "rh72-01"#011PACEMAKER-MIB::pacemakerNotificationResource = STRING: "prmDummy4"#011PACEMAKER-MIB::pacemakerNotificationOperation = STRING: "stop"#011PACEMAKER-MIB::pacemakerNotificationDescription = STRING: "ok"#011PACEMAKER-MIB::pacemakerNotificationStatus = INTEGER: 0#011PACEMAKER-MIB::pacemakerNotificationReturnCode = INTEGER: 0#011PACEMAKER-MIB::pacemakerNotificationTargetReturnCode = INTEGER: 0
Apr 25 18:48:50 snmp-manager snmptrapd[6865]: 2016-04-25 18:48:50 <UNKNOWN> [UDP: [192.168.28.170]:37166->[192.168.28.189]:162]:#012DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (25512490) 2 days, 22:52:04.90#011SNMPv2-MIB::snmpTrapOID.0 = OID: PACEMAKER-MIB::pacemakerNotificationTrap#011PACEMAKER-MIB::pacemakerNotificationNode = STRING: "rh72-01"#011PACEMAKER-MIB::pacemakerNotificationResource = STRING: "prmDummy1"#011PACEMAKER-MIB::pacemakerNotificationOperation = STRING: "stop"#011PACEMAKER-MIB::pacemakerNotificationDescription = STRING: "ok"#011PACEMAKER-MIB::pacemakerNotificationStatus = INTEGER: 0#011PACEMAKER-MIB::pacemakerNotificationReturnCode = INTEGER: 0#011PACEMAKER-MIB::pacemakerNotificationTargetReturnCode = INTEGER: 0
Apr 25 18:48:50 snmp-manager snmptrapd[6865]: 2016-04-25 18:48:50 <UNKNOWN> [UDP: [192.168.28.170]:53502->[192.168.28.189]:162]:#012DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (25512494) 2 days, 22:52:04.94#011SNMPv2-MIB::snmpTrapOID.0 = OID: PACEMAKER-MIB::pacemakerNotificationTrap#011PACEMAKER-MIB::pacemakerNotificationNode = STRING: "rh72-01"#011PACEMAKER-MIB::pacemakerNotificationResource = STRING: "prmDummy2"#011PACEMAKER-MIB::pacemakerNotificationOperation = STRING: "stop"#011PACEMAKER-MIB::pacemakerNotificationDescription = STRING: "ok"#011PACEMAKER-MIB::pacemakerNotificationStatus = INTEGER: 0#011PACEMAKER-MIB::pacemakerNotificationReturnCode = INTEGER: 0#011PACEMAKER-MIB::pacemakerNotificationTargetReturnCode = INTEGER: 0
Apr 25 18:48:50 snmp-manager snmptrapd[6865]: 2016-04-25 18:48:50 <UNKNOWN> [UDP: [192.168.28.170]:45956->[192.168.28.189]:162]:#012DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (25512497) 2 days, 22:52:04.97#011SNMPv2-MIB::snmpTrapOID.0 = OID: PACEMAKER-MIB::pacemakerNotificationTrap#011PACEMAKER-MIB::pacemakerNotificationNode = STRING: "rh72-01"#011PACEMAKER-MIB::pacemakerNotificationResource = STRING: "prmDummy5"#011PACEMAKER-MIB::pacemakerNotificationOperation = STRING: "stop"#011PACEMAKER-MIB::pacemakerNotificationDescription = STRING: "ok"#011PACEMAKER-MIB::pacemakerNotificationStatus = INTEGER: 0#011PACEMAKER-MIB::pacemakerNotificationReturnCode = INTEGER: 0#011PACEMAKER-MIB::pacemakerNotificationTargetReturnCode = INTEGER: 0

----

I think that there is "timestamp" attribute for async by this change.

The order of traps may be important to a user.
I suggest addition to "alert" element with "orderd" attribute.

 * orderd 
    false : The present processing.
    true  : Control the transmission order of the trap.

----
<configuration>
  <alerts>
    <alert id="notify_9"
path="/usr/share/pacemaker/tests/pcmk_alert_sample1.sh" ordered="true">
(snip)
    </alert>
    <alert id="notify_9"
path="/usr/share/pacemaker/tests/pcmk_alert_sample2.sh" ordered="false">
(snip)
    </alert>
  </alerts>
</configuration>

----

I send a patch to cope with this problem before.
The former patch may be useful for the correction.
 * https://github.com/ClusterLabs/pacemaker/pull/847

I intend to write the patch if everybody agrees to "ordered" attribute.

Best Regards,
Hideo Yamauchi.




More information about the Users mailing list