0

I have developed an external Heartbeat v1 plugin, which expects its configuration by means of environment variables.

AFAIK, this is what Heartbeat provides when configuring the plugin using the following entry in /etc/heartbeat/ha.cf:

stonith external/my_plugin /etc/ha.d/my_plugin-hostname.conf

What I am not quite certain about is the format that /etc/ha.d/my_plugin-<hostname>.conf is supposed to have (as documentation seem to be somewhat non-existent). Right now, I used the following attempt:

<hostname> target <hostname>
<hostname> auth_token <some_token>
<hostname> proxy_uri <some_url>

Unfortunately, my_plugin is called with the following parameters:

target: <hostname>
auth_token: proxy_uri
proxy_uri <some_url>

So, the auth_token parameter is messed up and I frankly have no clue why... I am dumping the environment using export at the beginning of the script, so I am quite certain that this is what heartbeat supplies the script with.

Any ideas?

1 Answers1

0

Got it: The config file format is actually a space-delimited list of the configuration parameters in the order returned by the getconfignames operation (target auth_token proxy_uri in my case), so the file correctly looks like this:

<hostname> <some_token> <some_url>