ClusterLabs / ClusterLabs/resource-agents

Please help improve RA meta data

Open
#576 4 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Shell
Stars
519
Forks
608
Avg merge
6d 1h
Merged PRs (30d)
7

Description

See also my ML post, 2015-02-12 [Call for review of undocumented parameters in resource agent meta data](http://thread.gmane.org/gmane.linux.highavailability.user/40607/focus=7947) 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?
- [x] EvmsSCC +OCF_RESKEY_ignore_deprecation
- [x] Evmsd +OCF_RESKEY_ignore_deprecation

?? intentionally undocumented ??

No idea, but I doubt that anybody out there is using evms.
- [ ] IPaddr +OCF_RESKEY_iflabel

According to the history, this was never used.
- [ ] IPaddr -OCF_RESKEY_netmask
> Not sure.

This got renamed to cidr_netmask, in an effort to make it more
consistent with IPaddr2 :) The same as what you found below.
- [ ] IPaddr2 -OCF_RESKEY_netmask
>
> intentional, backward compat, quoting the agent:
> # Note: We had a version out there for a while which used
> # netmask instead of cidr_netmask. Don't remove this aliasing code!

> 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.
- [ ] conntrackd -OCF_RESKEY_conntrackd

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 :)
- [x] dnsupdate -OCF_RESKEY_opts
- [x] dnsupdate +OCF_RESKEY_nsupdate_opts

Bug? lmb? OK, just fixed it. It should be only the latter.
- [ ] docker -OCF_RESKEY_container
- [ ] ethmonitor -OCF_RESKEY_check_level
- [ ] ethmonitor -OCF_RESKEY_multiplicator
- [ ] galera +OCF_RESKEY_additional_parameters
- [ ] galera +OCF_RESKEY_binary
- [ ] galera +OCF_RESKEY_client_binary
- [ ] galera +OCF_RESKEY_config
- [ ] galera +OCF_RESKEY_datadir
- [ ] galera +OCF_RESKEY_enable_creation
- [ ] galera +OCF_RESKEY_group
- [ ] galera +OCF_RESKEY_log
- [ ] galera +OCF_RESKEY_pid
- [ ] galera +OCF_RESKEY_socket
- [ ] galera +OCF_RESKEY_user

> Probably all bogus, it source "mysql-common.sh".
> Someone please have a more detailed look.
- [x] iSCSILogicalUnit +OCF_RESKEY_product_id
- [x] iSCSILogicalUnit +OCF_RESKEY_vendor_id

> false positive
>
> surprise: florian learned some wizardry back then ;-)
> for var in scsi_id scsi_sn vendor_id product_id; do
> envar="OCF_RESKEY_${var}"
> if [ -n "${!envar}" ]; then
> params="${params} ${var}=${!envar}"
> fi
> done
>
> If such magic is used elsewhere,
> that could mask "Used but not documented" cases.
- [ ] iface-bridge -OCF_RESKEY_multicast_querier

> !! Yep, that needs to be documented!
- [ ] mysql-proxy -OCF_RESKEY_group
- [ ] mysql-proxy -OCF_RESKEY_user

> Oops, apparently my magic scriptlet below needs to learn to
> ignore script comments...
- [ ] named -OCF_RESKEY_rootdir

> !! Probably a bug:
> named_rootdir is documented.
- [ ] nfsserver -OCF_RESKEY_nfs_notify_cmd

> !! Yep, that needs to be documented!
- [ ] nginx -OCF_RESKEY_client
- [ ] nginx +OCF_RESKEY_testclient
>
> !! client is used, but not documented,
> !! testclient is documented, but unused...
> Bug?

Yeah. Yet another one of the kind.
- [ ] nginx -OCF_RESKEY_nginx

> Bogus. Needs to be dropped from leading comment block.
- [x] oracle -OCF_RESKEY_tns_admin

> !! Yep, that needs to be documented!

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.
- [x] pingd +OCF_RESKEY_ignore_deprecation
>
> ?? intentionally undocumented ??

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

> !! Yep, is undocumented.
- [x] sg_persist +OCF_RESKEY_binary
- [x] sg_persist -OCF_RESKEY_sg_persist_binary
>
> !! BUG? binary vs sg_persist_binary

Fixed.
- [ ] varnish -OCF_RESKEY_binary
>
> !! Yep, is undocumented.

> 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 '

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in the heartbeat directory and inspect the resource-agent scripts identified by the issue's shell script. Compare OCF_RESKEY_* occurrences with the metadata, focusing on the unresolved agents and discrepancies listed in the issue. Done means each selected discrepancy is reviewed and the corresponding metadata or usage is corrected, with the proposed unit-test check considered for the build.

Written by the indexing model from the issue text.

Assessment

Tech stack
bash, shell
Domain
documentation, infrastructure, tooling
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
24/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.