Hi,
On Wed, Mar 18, 2009 at 11:37:27AM -0700, Neil Katin wrote:
>
>
> Dejan Muhamedagic wrote:
>> Hi,
>>
>> On Tue, Mar 17, 2009 at 11:56:04AM +0530, Arun G wrote:
>>> Hi,
>>> I observed below error message when I upgraded drbd to drbd-8.3.0 in
>>> heartbeat 2.1.4 cluster on 2.6.18-8.el5xen.
>
> -- snip --
>
>> Thanks for the patch. But do all supported drbd versions have the
>> role command?
>>
>> Thanks,
>>
>> Dejan
>
> No, only 8.3 has the change. 8.2 supports the old "state" argument, but
> prints a warning message out, and this warning message upsets the drbd OCF
> scripts parting of drbdadm's output.
Since versions before 8.3 don't have the role command, I suppose
that 8.3 actually prints the warning.
> drbdadm doesn't support a --version argument, but it does support a "status"
> command, which has version info in it. However, I am not sure if "drbdadm
> status"
> is guaranteed to not block or not, so I didn't want to have the OCF script
> depend
> on it.
drbdadm | grep Version
works for 8.2.7 and 8.0.14, so I guess that it is available in
other versions too.
> So, I see three alternatives: add a new script "drbdadm8.3". Add an extra
> parameter
> saying "use role instead of status". Or call "drbdadm status" to dynamically
> detect
> our version.
>
> Do you see other choices? Do you have a preference for a particular
> alternative?
> I'm willing to code and test the patch if we can decide what we want.
Let's see if we can figure out the version. Adding new RA would
be a maintenance issue. Adding new parameter would make
configuration depend on particular release.
We could do something like this:
drbdadm | grep Version | awk '{print $2}' |
awk -F. '
$1 != 8 { exit 2; }
$2 < 3 { exit 1; } # use status
# otherwise use role
'
rc=$?
if [ $rc -eq 2 ]; then
error installed (unsupported version)
elif [ $rc -eq 1 ]; then
cmd=status
else
cmd=role
fi
Could you please try this out. I can't test this right now.
Thanks,
Dejan
>
> Neil
> _______________________________________________
> Linux-HA mailing list
> [email protected]
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems