[ClusterLabs] Antw: Re: Antw: Re: Antw: Struggling to get "crm_mon -E ... " to do anything

Ulrich Windl Ulrich.Windl at rz.uni-regensburg.de
Tue May 12 07:59:28 CEST 2015


Hi!

What I don't like with all of this is that it's still a polling interface. That is, some program (crm_mon) has to find out what the changes are. You can get the same thing by periodically getting the CIB, watching for changes.
What the interface should be is truely event driven; that is if the cluster is going to do something, some notifier should be executed.
With the polling interface you are always behind the facts...

Regards,
Ulrich

>>> Brett Moser <brett.moser at gmail.com> schrieb am 11.05.2015 um 19:29 in Nachricht
<CAO3aD9MB9AXSUTUiURze5_i3b=x=KssuUc=oqMqXyw-ZmLvO+w at mail.gmail.com>:
> Hi Ulrich,
> 
> The ClusterMon OCF must be configured with the extra_options parameter:
> 
> # Sample configuration
> # ================================
> # primitive ClusterMon ocf:pacemaker:ClusterMon \
> #        params user="root" update="30" extra_options="-E
> /path/to/pcmk_snmp_helper.sh -e 192.168.1.2" \
> #        op monitor on-fail="restart" interval="10"
> 
> 
> Have you looked at the pcmk_snmp_helper.sh
> <https://github.com/ClusterLabs/pacemaker/blob/master/extra/pcmk_snmp_helper.
>sh>
>  script that Florian CROUZAT created?   It provides a good example of how
> to get the information provided when an external program is executed by
> crm_mon.  The parameters are passed as Environment variables, similar to
> how Resource Agents work in Pacemaker:
> 
> CRM_notify_recipient
> CRM_notify_node
> CRM_notify_rsc
> CRM_notify_task
> CRM_notify_desc
> CRM_notify_status
> CRM_notify_rc
> CRM_notify_target_rc
> 
> regards,
> -Brett Moser
> 
> 
> On Mon, May 11, 2015 at 6:46 AM, Ulrich Windl <
> Ulrich.Windl at rz.uni-regensburg.de> wrote:
> 
>> >>> Riley <riley at on.net.nz> schrieb am 11.05.2015 um 12:05 in Nachricht
>> <55507ECD.7050706 at on.net.nz>:
>> > Ulrich,
>> >            well I guess 'man crm_mon' does not tell you very much, but
>> > the ClusterMon resource uses crm_mon, and chapter 7 of the Pacemaker
>> > documentation,
>> >
>> 
> http://clusterlabs.org/doc/en-US/Pacemaker/1.1-crmsh/html/Pacemaker_Explained 
> /
>> > s-notification-external.html,
>> > documents the CRM_notify_* environment variables.
>>
>> Actually I'm more confused than before now ;-)
>>
>> So there is a ClusterMon OCF RA that is started by the cluster, and that
>> monitor starts "crm_mon" to periodically dump the configuration to a HTML
>> file. If all I can get is a text dump of the configuration, it's rather
>> ridiculous.
>>
>> I fail to see the connection to the argument to option "-E" in the
>> documentation you are referring to, and section 7.3 (The example) really
>> lacks an example how such variables look like (and what to do with them).
>>
>> Regards,
>> Ulrich
>>
>> >
>> > (No arguments/parameters are passed to the program that is called via
>> > it's command line, everything is through the environment variables)
>> >> ...
>> >>> I have set up a virtual test environment of three nodes running CentOS
>> >>> 6.6 and am having trouble getting a "crm_mon -E " script called *at
>> all*
>> >>> when anything changes in the cluster (resource killed, node killed,
>> >>> resource moved, etc.).
>> >> Never heard of that option, but when considering the documentation, I'm
>> not
>> > much surprised if it doesn't work as one might expect:
>> >>        -E, --external-agent=value
>> >>               A program to run when resource operations take place.
>> >>
>> >> This leaves a LOT of room for expectations. ;-)
>> >>
>> >> What should be a typical use case? Will the program have any parameters?
>> >>
>> >
>> >
>> > _______________________________________________
>> > Users mailing list: Users at clusterlabs.org 
>> > http://clusterlabs.org/mailman/listinfo/users 
>> >
>> > Project Home: http://www.clusterlabs.org 
>> > Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf 
>> > Bugs: http://bugs.clusterlabs.org 
>>
>>
>>
>>
>>
>> _______________________________________________
>> Users mailing list: Users at clusterlabs.org 
>> http://clusterlabs.org/mailman/listinfo/users 
>>
>> Project Home: http://www.clusterlabs.org 
>> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf 
>> Bugs: http://bugs.clusterlabs.org 
>>






More information about the Users mailing list