[Pacemaker] ifstatus OCF RA
Vladislav Bogdanov
bubble at hoster-ok.com
Tue Feb 22 12:24:41 EST 2011
Hi,
22.02.2011 18:46, Dejan Muhamedagic wrote:
> If there's no connectivity then you can use ping, if there's some
> then what matters is what kind of connection you have. "status"
> is more like on/off. Here you try to find out a specific network
> metric.
>
ok.
's/ifstatus/ifspeed/g' done
>>> - since this is a stateless agent, you should use the existing
>>> functions for that purpose:
>>> http://www.linux-ha.org/doc/dev-guides/_pseudo_resources_literal_ha_pseudo_resource_literal.html
>>
>> Will look at that, thank you for pointer. ping RA seems to be missing
>> this too BTW. Not critical anyway I think.
>
> It is there for exactly this purpose and it makes no sense
> duplicating code. Don't forget that code needs to be reviewed,
> tested, and maintained.
done
>
>>> - almost all function names start with "ifstatus" which sometimes
>>> makes it difficult to follow the code (e.g. ifstatus_iface_get_speed)
>>
>> Just copy-pasted skeleton from ping RA and did 's/ping/ifstatus/g'. And
>> then named all other functions accordingly. This is completely to taste
>> I think. And RA is meant to be used, not re-coded every now and then ;).
>
> If you were in my shoes, you'd appreciate code eligibility a bit
> more. No, hopefully it's not to be reimplemented, but a) it needs
> to be reviewed by somebody and b) it needs to be maintained just
> like anything else in the repository.
's/ifspeed_//g' done
Please find attached.
Tested. Works.
Best,
Vladislav
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ifspeed
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20110222/e22b8a60/attachment-0003.ksh>
More information about the Pacemaker
mailing list