[Linux-ha-dev] Apache resource agent broken in Debian lenny
Florian Knauf
f.knauf at mmkf.de
Sun Jul 20 13:40:12 MDT 2008
Hi,
>> In principle, the fix for this is trivial - the resource agent just has
>> to do something like
>>
>> if [ -e /etc/apache2/envvars ]; then
>> . /etc/apache2/envvars
>> fi
>
> The fix is not that trivial: the apache would understand, but the
> RA wouldn't, because it parses the apache configuration without
> expanding variables.
Well, it worked for me. I can see how it could cause problems with
variable expansion, though - it's really something of a dirty hack this way.
> I'm not sure if we should deal with this at all in heartbeat.
> Trying to support all the new setups and distributions, it may
> become a nightmare.
True, that can be quite problematic. The initng project had major
problems with precisely that - it was messy, let me tell you.
Mind you, with the plethora of services that someone might want to
cluster, I expect admins usually wind up writing their own agents for
most of them, anyway. Excepting the most basic ones (like, say, drbd),
it might not be feasible to provide anything beyond "This worked for
someone, maybe you can tweak it to your needs," anyway. In the context
of debian packages, this might mean declaring everything in
/usr/lib/ocf/resource.d/heartbeat a configuration file, so that future
updates don't overwrite any custom changes that might have been applied.
However...
> For the maintenance too: dealing with the
> apache configuration is already rather complex and I'm really
> reluctant to make it more so. However, since apache now supports
> variables in the config and that may become a norm in future,
> perhaps we should support environment variables too. Sigh.
>
> Another option may be to kindly ask the apache people to provide
> some facility to query the server configuration.
>From what I can see, the apache RA basically replicates functionality
that's already part of apache2ctl - which is supposed to be used to
start, stop and control apache, anyway. Apache2ctl evaluates the envvars
file if it finds it, and uses appropriate default values or shell
overrides if it doesn't. I think this and all related problems would
vanish if the resource agent used it instead of calling the apache
binary directly, and it would make the whole thing a _lot_ simpler.
> Can you please file an enhancement bugzilla.
I will, but I'd like to run some tests with apache2ctl first to make
sure I'm correct about the above paragraph. If I find the time, I may
write a proof-of-concept RA, although I probably won't be able to test
that before next weekend - I'll have to remember how I built that
virtual testing cluster last time. :D
In other words, I'll get it into bugzilla as soon as I'm sure what I
write is correct.
Regards,
Florian Knauf
More information about the Linux-HA-Dev
mailing list