rasto / lcmc

Pacemaker/DRBD/KVM/LVM Cluster GUI
Other
102 stars 21 forks source link

LCMC has difficulty parsing drbd xml config #36

Closed scr267 closed 8 years ago

scr267 commented 11 years ago

Hello Rasto,

I'm running into some issues with various versions of LCMC being unable to parse through my current drbd config. It's for drbd 8.4.4.

LCMC throws the following errors:

APPWARNING: parseConfigResourceNode: unknown section: net APPWARNING: failure: DRBD: unknown section: net APPWARNING: parseConfigResourceNode: unknown section: disk APPWARNING: parseConfigResourceNode: unknown section: startup APPWARNING: parseConfigResourceNode: unknown section: handlers

Here is the XML that I get back from the helper script /usr/local/bin/lcmc-gui-helper-1.5.13 get-drbd-info

(note: for privacy reasons I modified the IP addresses, hostnames and shared secret key)

<config file="/etc/drbd.conf"> <common> <section name="net"> <option name="cram-hmac-alg" value="sha1"/> <option name="shared-secret" value="4357eb2444458c245c404d0fb1ff6f32"/> </section> <section name="disk"> <option name="on-io-error" value="detach"/> </section> <section name="startup"> <option name="degr-wfc-timeout" value="0"/> </section> </common> <resource name="dbdata" conf-file-line="/etc/drbd.d/dbdata.res:1"> <host name="myhost1"> <volume vnr="0"> <section name="disk"> <option name="on-io-error" value="detach"/> </section> <device minor="0">/dev/drbd0</device> <disk>/dev/vg_data/data</disk> <meta-disk>internal</meta-disk> </volume> <address family="ipv4" port="7788">5.5.5.5</address> </host> <host name="myhost2"> <volume vnr="0"> <section name="disk"> <option name="on-io-error" value="detach"/> </section> <device minor="0">/dev/drbd0</device> <disk>/dev/vg_data/data</disk> <meta-disk>internal</meta-disk> </volume> <address family="ipv4" port="7788">5.5.5.6</address> </host> <section name="net"> <option name="shared-secret" value="4357eb2444458c245c404d0fb1ff6f32"/> <option name="cram-hmac-alg" value="sha1"/> <option name="verify-alg" value="crc32c"/> <option name="protocol" value="C"/> <option name="timeout" value="200"/> <option name="connect-int" value="65"/> <option name="ping-int" value="30"/> <option name="after-sb-0pri" value="discard-least-changes"/> <option name="after-sb-1pri" value="discard-secondary"/> <option name="after-sb-2pri" value="call-pri-lost-after-sb"/> </section> <section name="disk"> <option name="on-io-error" value="detach"/> </section> <section name="startup"> <option name="degr-wfc-timeout" value="0"/> </section> <section name="handlers"> <option name="initial-split-brain" value="/usr/lib/drbd/notify-split-brain.sh john@doe.com"/> <option name="split-brain" value="/usr/lib/drbd/notify-split-brain.sh john@doe.com"/> <option name="after-resync-target" value="echo &apos;PROD MySQL DRBD Resynchronized&apos; | mailx -s &apos;PROD MySQL DRBD Resynchronized&apos; john@doe.com"/> </section> </resource> </config>

I've got other drbd clusters running drbd 4.8.1 with the same version of LCMC and I do not get these errors. Yet, the XML doesn't seem to be any different. The section names and options are nearly identical.

Thanks for any help you might be able to provide,

Xavier

rasto commented 11 years ago

Hello Xavier,

something like that can happen if drbd module version and drbdadm utilities don't match or there is some problem with DRBD man pages.

scr267 commented 11 years ago

The problematic cluster has the correct version for both the drbd kernel module and the drbdadm utilities: 8.4.4

The other clusters we have work perfectly well with LCMC, but they are running 8.4.2 and 8.4.1 respectively.

How would the man pages affect this? The drbd man page for all of these various versions hasn't been updated since Oct 15, 2008 and is at version 8.3.2

Thanks very much for your help,

Xavier

On 04/11/2013 7:44 AM, Rasto Levrinc wrote:

Hello Xavier,

something like that can happen if drbd module version and drbdadm utilities don't match or there is some problem with DRBD man pages.

— Reply to this email directly or view it on GitHub https://github.com/rasto/lcmc/issues/36#issuecomment-27682255.

rasto commented 11 years ago

It does affect this. It is generated during building of DRBD and this where LCMC get's its information about DRBD, since the original xml is not available after installation.

Concretely it needs the correct drbd.conf man page.

I am still not sure how to resolve this. What distro do you use, how did you install it and is there the correct drbd.conf man page in some other place?

LCMC is trying to get the man page with following commands:

zcat /usr/share/man/man5/drbd.conf.5.gz || cat /usr /share/man/man5/drbd.conf.5 || cat /usr/man/man5/drbd.conf.5 || bzcat /usr/share /man/man5/drbd.conf.5.bz2

scr267 commented 11 years ago

We figured out the problem.

It seems that with version 8.4.4 of the RPMs from the ELREPO repository, the packaging changed some of the bin files install directories. We had to create symlinks to make them available under the original locations.

The files were installed under:

/usr/sbin/drbdadm /usr/sbin/drbdmeta /usr/sbin/drbdsetup

Since the original location with previous versions used to be /sbin/... we had to create symlinks here:

/sbin/drbdadm -> /usr/sbin/drbdadm /sbin/drbdmeta -> /usr/sbin/drbdmeta /sbin/drbdsetup -> /usr/sbin/drbdsetup

Thanks for your help. It is, as always, much appreciated.

Xavier

On 04/11/2013 9:52 AM, xl wrote:

The problematic cluster has the correct version for both the drbd kernel module and the drbdadm utilities: 8.4.4

The other clusters we have work perfectly well with LCMC, but they are running 8.4.2 and 8.4.1 respectively.

How would the man pages affect this? The drbd man page for all of these various versions hasn't been updated since Oct 15, 2008 and is at version 8.3.2

Thanks very much for your help,

Xavier

On 04/11/2013 7:44 AM, Rasto Levrinc wrote:

Hello Xavier,

something like that can happen if drbd module version and drbdadm utilities don't match or there is some problem with DRBD man pages.

— Reply to this email directly or view it on GitHub https://github.com/rasto/lcmc/issues/36#issuecomment-27682255.

scr267 commented 11 years ago

Thanks again.

Well, in any case just for your info, the distro is Centos 6.4, using ELREPO for the RPM packages.

The installation was done simply using: yum install kmod-drbd84 - the drbd84-utils package was pulled in as dependencies.

Cheers,

Xavier

On 04/11/2013 10:19 AM, Rasto Levrinc wrote:

It does affect this. It is generated during building of DRBD and this where LCMC get's its information about DRBD, since the original xml is not available after installation.

Concretely it needs the correct drbd.conf man page.

I am still not sure how to resolve this. What distro do you use, how did you install it and is there the correct drbd.conf man page in some other place?

LCMC is trying to get the man page with following commands:

zcat /usr/share/man/man5/drbd.conf.5.gz || cat /usr /share/man/man5/drbd.conf.5 || cat /usr/man/man5/drbd.conf.5 || bzcat /usr/share /man/man5/drbd.conf.5.bz2

— Reply to this email directly or view it on GitHub https://github.com/rasto/lcmc/issues/36#issuecomment-27692593.