ClusterLabs / resource-agents

Combined repository of OCF agents from the RHCS and Linux-HA projects
GNU General Public License v2.0
493 stars 582 forks source link

Please help improve RA meta data #576

Open lge opened 9 years ago

lge commented 9 years ago

See also my ML post, 2015-02-12 Call for review of undocumented parameters in resource agent meta data and the followup by Dejan.

I just today noticed that apparently some resource agents accept and use parameters that are not documented in their meta data.

I now came up with a bash two-liner, which likely still produces a lot of noise, because it does not take into account that some agents "source" additional helper files.

But here is the list:

--- used, but not described

This is bad and needs to be fixed.

+++ described, but apparently not used.

Just drop?

No idea, but I doubt that anybody out there is using evms.

According to the history, this was never used.

This got renamed to cidr_netmask, in an effort to make it more consistent with IPaddr2 :) The same as what you found below.

Please help review these:

  • [ ] IPsrcaddr -OCF_RESKEY_ip
  • [ ] IPsrcaddr +OCF_RESKEY_cidr_netmask
  • [ ] IPv6addr.c -OCF_RESKEY_cidr_netmask
  • [ ] IPv6addr.c -OCF_RESKEY_ipv6addr
  • [ ] IPv6addr.c -OCF_RESKEY_nic
  • [x] LinuxSCSI +OCF_RESKEY_ignore_deprecation
  • [ ] Squid -OCF_RESKEY_squid_confirm_trialcount
  • [ ] Squid -OCF_RESKEY_squid_opts
  • [ ] Squid -OCF_RESKEY_squid_suspend_trialcount
  • [ ] SysInfo -OCF_RESKEY_clone
  • [ ] WAS6 -OCF_RESKEY_profileName
  • [x] apache +OCF_RESKEY_use_ipv6

This is used in http-mon.sh, sourced by apache.

This one got renamed to binary, so it's OK. I can still recall the discussion--IMO not a biggie to have various RA differently named parameters for the program (but at the time the other party prevailed :)

Bug? lmb? OK, just fixed it. It should be only the latter.

Yeah. Yet another one of the kind.

Nope. tns_admin is not used in oracle but in oralsnr, but the two share some initialization stuff. Copy&paste issue. Will fix that too.

This deprecation thing seems to be some kind of standard thingie and it is perused in ocf_deprecated(), looks like Florian's thing too :)

Fixed.

Please someone find the time to prepare pull requests to fix these...

This would probably get more attention if posted as an issue at github with a title "Please help improve RA meta data". Otherwise, I doubt that we're going to get volunteers here to write documentation ;-)

Cheers,

Dejan

Thanks,

Lars

List was generated by below scriptlet, which can be improved. The improved version should probably be part of a "unit test" check, when building resource-agents.

#!/bin/bash
# In the git checkout of the resource agents,
# get a list of files that look like actual agent scripts.
cd heartbeat
A=$(git ls-files | xargs grep -s -l '<resource-agent ')

# and for each of these files,
# diff the list of OCF_RESKEY_* occurrences
# with the list of <parameter name="*" ones.
for a in $A; do
    diff -U0 \
    <(  grep -h -o 'OCF_RESKEY_[[:alnum:]_]*' $a |
        sort -u |
        grep -v -e '_default$' -e 'OCF_RESKEY_$' -e 'OCF_RESKEY_CRM_meta' ) \
    <(  grep -h '<parameter ' $a |
        sed -ne 's/^.*name="\([^"]*\)".*$/OCF_RESKEY_\1/p' |
        sort -u) |
    sed -e "/^@@\|^---\|^[+][+][+]/d;s#^#$a\t#";
done | column -t
lge commented 9 years ago

Dejan already fixed some of these issues with https://github.com/ClusterLabs/resource-agents/pull/575

Don't be shy, you can do so as well! :-)

lge commented 9 years ago

And I forgot:

m-ly4 commented 9 years ago

pgsql: OCF_RESKEY_ctl_opt is described in meta_data, but it has no default value OCF_RESKEY_ctl_opt_default and no initialization.

kskmori commented 9 years ago

pgsql: OCF_RESKEY_ctl_opt is described in meta_data, but it has no default value OCF_RESKEY_ctl_opt_default and no initialization.

This should be fixed in #691.