[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-ha-dev
Subject: Re: [Linux-ha-dev] [Linux-HA] OCF resource for conntrack
From: Florian Haas <florian.haas () linbit ! com>
Date: 2010-09-30 16:18:03
Message-ID: 4CA4B83B.2020103 () linbit ! com
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
Hello Jonathan,
a few more comments below.
>> - conntrackd_start doesn't produce the correct error code if the binary
>> isn't installed. Easily fixed with "check_binary ${OCF_RESKEY_binary}".
>
> Added to conntrackd_validate
The way you did it, that change will break probes.
You'll probably want to use "ocf_is_probe || check_binary
${OCF_RESKEY_binary}" instead.
>> - I don't understand how the conntrack daemon is actually started.
>> Shouldn't there be some invocation of $CONNTRACKD -d in conntrackd_start?
>
> The OCF resource doesn't really handle whether the daemon should start
> or not (see earlier discussions in this on the thread), I would
> probably add the daemon as a LSB resource rather.
No, you missed the point there. It's perfectly fine (and indeed,
expected) of the RA to start and stop the daemon process -- it's just
that you should do that in the start and stop options, not in monitor
like you originally did.
>> - Please run your RA through ocf-tester.
>
> deb-fw1:~# ocf-tester -L -n conntrackd
> /usr/lib/ocf/resource.d/heartbeat/conntrackd
> Using lrmd/lrmadmin for all tests
> Beginning tests for /usr/lib/ocf/resource.d/heartbeat/conntrackd...
> * rc=0: Monitoring a stopped resource should return 7
> * Your agent does not support the notify action (optional)
> * Your agent does not support the demote action (optional)
> * Your agent does not support the promote action (optional)
> * Your agent does not support master/slave (optional)
> * rc=0: Monitoring a stopped resource should return 7
> * rc=0: Monitoring a stopped resource should return 7
> * rc=0: Monitoring a stopped resource should return 7
> Tests failed: /usr/lib/ocf/resource.d/heartbeat/conntrackd failed 4 tests
>
> Not 100% sure codewise what I should change.
First thing would be to fix your monitor action so that when the
resource is stopped, it properly returns $OCF_NOT_RUNNING.
> Maybe it would make sense to add master/slave to handle the
> state-transition and have start/stop handle whether the daemon is
> alive or not. However I'm not entirely sure how the crm configuration
> statement for this should look given that the daemon should be started
> on both nodes running in either master or slave mode, do you have an
> example for this?
Rather simple:
primitive p_conntrackd ocf:heartbeat:Conntrackd \
op monitor interval=30s
ms ms_conntrackd p_conntrackd
Hope this helps,
Cheers,
Florian
["signature.asc" (application/pgp-signature)]
_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic