Cleanup clvmd build
clvmd build needs to be a bit more robust and some of the options really don't make much sense together.
The following patchset cleans it up and does better checkes on build requirements.
I split the patch in several chunks to make it easier to review but in theory it should all go in together to have a real benefit.
I'd be glad if people could review and apply as appropriate (I don't have CVS commit access).
$ git diff --stat master..HEAD configure.in | 160 ++++++++++++++++++++++++++++++++++++--- daemons/clvmd/Makefile.in | 58 ++++++--------- daemons/clvmd/clvmd-comms.h | 4 +- daemons/clvmd/clvmd-corosync.c | 16 ++-- daemons/clvmd/clvmd-openais.c | 49 +++++++------ 5 files changed, 207 insertions(+), 80 deletions(-)
Here below are the test results stressing all the code paths. The Fedora results are the same for F10/F11 and rawhide. I attached only one for all to avoid extra 27KB of redundant data.
Thanks
Fabio
*** RHEL4 ***
$ ./configure
checking whether to build cluster LVM daemon... none
$ ./configure --with-clvmd (default to cman, libcman not installed - expected failure)
checking whether to build cluster LVM daemon... cman checking for pkg-config... /usr/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking for PKGCONFIGINIT... no
pkg-config initialized
checking for CMAN... no
checking libcman.h usability... no
checking libcman.h presence... no
checking for libcman.h... no
configure: error: bailing out
$ ./configure --with-clvmd (default to cman, all dependencies installed)
checking whether to build cluster LVM daemon... cman checking for pkg-config... /usr/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking for PKGCONFIGINIT... no
pkg-config initialized
checking for CMAN... no
checking libcman.h usability... yes
checking libcman.h presence... yes
checking for libcman.h... yes
checking for cman_init in -lcman... yes
no pkg for libcman library, using -lcman checking for CONFDB... no
checking corosync/confdb.h usability... no checking corosync/confdb.h presence... no checking for corosync/confdb.h... no checking for DLM... no
checking libdlm.h usability... yes
checking libdlm.h presence... yes
checking for libdlm.h... yes
checking for dlm_lock in -ldlm... yes
no pkg for libdlm library, using -ldlm -lpthread
$ make && ldd daemons/clvmd/clvmd
[snip]
libpthread.so.0 => /lib/tls/libpthread.so.0 (0x00b72000)
libcman.so.DEVEL => /usr/lib/libcman.so.DEVEL (0x007a7000)
libdlm.so.DEVEL => /usr/lib/libdlm.so.DEVEL (0x007d0000)
[snip]$ ./configure --with-clvmd=all (default to cman)
checking whether to build cluster LVM daemon... cman
$ ./configure --with-clvmd=cman
checking whether to build cluster LVM daemon... cman
$ ./configure --with-clvmd=gulm
checking whether to build cluster LVM daemon... gulm checking for pkg-config... /usr/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking for PKGCONFIGINIT... no
pkg-config initialized
checking for CCS... no
checking ccs.h usability... yes
checking ccs.h presence... yes
checking for ccs.h... yes
checking for ccs_connect in -lccs... yes
no pkg for libccs library, using -lccs checking for GULM... no
checking libgulm.h usability... yes
checking libgulm.h presence... yes
checking for libgulm.h... yes
checking for lg_core_login in -lgulm... yes no pkg for libgulm library, using -lgulm
$ make && ldd daemons/clvmd/clvmd
[snip]
libgulm.so.DEVEL => /usr/lib/libgulm.so.DEVEL (0x00552000)
[snip]$ ./configure --with-clvmd=gulm,cman (tested both with cman,gulm and gulm,cman)
checking whether to build cluster LVM daemon... gulm,cman checking for pkg-config... /usr/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking for PKGCONFIGINIT... no
pkg-config initialized
checking for CCS... no
checking ccs.h usability... yes
checking ccs.h presence... yes
checking for ccs.h... yes
checking for ccs_connect in -lccs... yes
no pkg for libccs library, using -lccs
checking for GULM... no
checking libgulm.h usability... yes
checking libgulm.h presence... yes
checking for libgulm.h... yes
checking for lg_core_login in -lgulm... yes
no pkg for libgulm library, using -lgulm checking for CMAN... no
checking libcman.h usability... yes
checking libcman.h presence... yes
checking for libcman.h... yes
checking for cman_init in -lcman... yes
no pkg for libcman library, using -lcman checking for CONFDB... no
checking corosync/confdb.h usability... no checking corosync/confdb.h presence... no checking for corosync/confdb.h... no
checking for DLM... no
checking libdlm.h usability... yes
checking libdlm.h presence... yes
checking for libdlm.h... yes
checking for dlm_lock in -ldlm... yes
no pkg for libdlm library, using -ldlm -lpthread
$ make && ldd daemons/clvmd/clvmd
[snip]
libpthread.so.0 => /lib/tls/libpthread.so.0 (0x00b72000)
libgulm.so.DEVEL => /usr/lib/libgulm.so.DEVEL (0x0076a000)
libcman.so.DEVEL => /usr/lib/libcman.so.DEVEL (0x005a8000)
libdlm.so.DEVEL => /usr/lib/libdlm.so.DEVEL (0x0063e000)
[snip]$ ldd tools/lvm
(no clvmd libraries leak into the build)
libdevmapper.so.1.02 => /lib/libdevmapper.so.1.02 (0x00ab8000)
librt.so.1 => /lib/tls/librt.so.1 (0x00aed000)
libdl.so.2 => /lib/libdl.so.2 (0x00ab2000)
libncurses.so.5 => /usr/lib/libncurses.so.5 (0x00230000)
libc.so.6 => /lib/tls/libc.so.6 (0x00981000)
libselinux.so.1 => /lib/libselinux.so.1 (0x00add000)
libpthread.so.0 => /lib/tls/libpthread.so.0 (0x00b72000)
/lib/ld-linux.so.2 (0x00967000)*** RHEL5 ***
$ ./configure
checking whether to build cluster LVM daemon... none
$ ./configure --with-clvmd (default to cman, libcman not installed - expected failure)
checking whether to build cluster LVM daemon... cman checking for pkg-config... /usr/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking for PKGCONFIGINIT... no
pkg-config initialized
checking for CMAN... no
checking libcman.h usability... no
checking libcman.h presence... no
checking for libcman.h... no
configure: error: bailing out
$ ./configure --with-clvmd (default to cman, all dependencies installed)
checking whether to build cluster LVM daemon... cman checking for pkg-config... /usr/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking for PKGCONFIGINIT... no
pkg-config initialized
checking for CMAN... no
checking libcman.h usability... yes
checking libcman.h presence... yes
checking for libcman.h... yes
checking for cman_init in -lcman... yes
no pkg for libcman library, using -lcman checking for CONFDB... no
checking corosync/confdb.h usability... no checking corosync/confdb.h presence... no checking for corosync/confdb.h... no checking for DLM... no
checking libdlm.h usability... yes
checking libdlm.h presence... yes
checking for libdlm.h... yes
checking for dlm_lock in -ldlm... yes
no pkg for libdlm library, using -ldlm -lpthread
$ make && ldd daemons/clvmd/clvmd
[snip]
libpthread.so.0 => /lib/libpthread.so.0 (0x003b0000)
libcman.so.2 => /usr/lib/libcman.so.2 (0x00482000)
libdlm.so.2 => /usr/lib/libdlm.so.2 (0x00474000)
[snip]$ ./configure --with-clvmd=all (default to cman)
checking whether to build cluster LVM daemon... cman
$ ./configure --with-clvmd=cman
checking whether to build cluster LVM daemon... cman
$ ldd tools/lvm
(no clvmd libraries leak into the build)
linux-gate.so.1 => (0x0083b000)
libdevmapper.so.1.02 => /lib/libdevmapper.so.1.02 (0x003c9000)
libreadline.so.5 => /usr/lib/libreadline.so.5 (0x00489000)
librt.so.1 => /lib/librt.so.1 (0x00469000)
libselinux.so.1 => /lib/libselinux.so.1 (0x003f2000)
libsepol.so.1 => /lib/libsepol.so.1 (0x0040c000)
libdl.so.2 => /lib/libdl.so.2 (0x003aa000)
libncurses.so.5 => /usr/lib/libncurses.so.5 (0x0057e000)
libc.so.6 => /lib/libc.so.6 (0x00264000)
libpthread.so.0 => /lib/libpthread.so.0 (0x003b0000)
/lib/ld-linux.so.2 (0x00246000)*** Fedora 10/11/rawhide ***
$ ./configure
checking whether to build cluster LVM daemon... none
$ ./configure --with-clvmd (default to cman, libcman not installed - expected failure)
checking whether to build cluster LVM daemon... cman checking for pkg-config... /usr/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking for PKGCONFIGINIT... no
pkg-config initialized
checking for CMAN... no
checking libcman.h usability... no
checking libcman.h presence... no
checking for libcman.h... no
configure: error: bailing out
$ ./configure --with-clvmd (default to cman, use pkg-config)
checking whether to build cluster LVM daemon... cman checking for pkg-config... /usr/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking for PKGCONFIGINIT... no
pkg-config initialized
checking for CMAN... yes
checking for CONFDB... yes
checking corosync/confdb.h usability... yes checking corosync/confdb.h presence... yes checking for corosync/confdb.h... yes checking for DLM... yes
$ make && ldd daemons/clvmd/clvmd
[snip]
libpthread.so.0 => /lib/libpthread.so.0 (0x00583000)
libcman.so.3 => /usr/lib/libcman.so.3 (0x00d9a000)
libconfdb.so.4 => /usr/lib/libconfdb.so.4 (0x00234000)
libdlm.so.3 => /usr/lib/libdlm.so.3 (0x002b0000)
libcoroipcc.so.4 => /usr/lib/libcoroipcc.so.4 (0x008f6000)
[snip]$ ldd tools/lvm
(no clvmd libraries leak into the build)
linux-gate.so.1 => (0x00480000)
libdevmapper.so.1.02 => /lib/libdevmapper.so.1.02 (0x004b1000)
librt.so.1 => /lib/librt.so.1 (0x00137000)
libdl.so.2 => /lib/libdl.so.2 (0x00e8c000)
libtinfo.so.5 => /lib/libtinfo.so.5 (0x003be000)
libc.so.6 => /lib/libc.so.6 (0x00931000)
libselinux.so.1 => /lib/libselinux.so.1 (0x008ce000)
libsepol.so.1 => /lib/libsepol.so.1 (0x00141000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00110000)
/lib/ld-linux.so.2 (0x00276000)$ ./configure --with-clvmd=all (default to cman)
checking whether to build cluster LVM daemon... cman
$ ./configure --with-clvmd=cman
checking whether to build cluster LVM daemon... cman
$ ./configure --with-clvmd=corosync (all dependencies installed)
checking whether to build cluster LVM daemon... corosync checking for pkg-config... /usr/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking for PKGCONFIGINIT... no
pkg-config initialized
checking for COROSYNC... yes
checking for QUORUM... yes
checking for CONFDB... yes
checking corosync/confdb.h usability... yes checking corosync/confdb.h presence... yes checking for corosync/confdb.h... yes
checking for CPG... yes
checking for DLM... yes
$ make && ldd daemons/clvmd/clvmd
[snip]
libpthread.so.0 => /lib/libpthread.so.0 (0x0050a000)
libconfdb.so.4 => /usr/lib/libconfdb.so.4 (0x005ec000)
libcpg.so.4 => /usr/lib/libcpg.so.4 (0x00b61000)
libdlm.so.3 => /usr/lib/libdlm.so.3 (0x007cd000)
libquorum.so.4 => /usr/lib/libquorum.so.4 (0x0020b000)
libcoroipcc.so.4 => /usr/lib/libcoroipcc.so.4 (0x00606000)
[snip]$ ldd tools/lvm
(no clvmd libraries leak into the build)
linux-gate.so.1 => (0x00bf4000)
libdevmapper.so.1.02 => /lib/libdevmapper.so.1.02 (0x00ef4000)
librt.so.1 => /lib/librt.so.1 (0x00585000)
libdl.so.2 => /lib/libdl.so.2 (0x00be9000)
libtinfo.so.5 => /lib/libtinfo.so.5 (0x00dc8000)
libc.so.6 => /lib/libc.so.6 (0x00110000)
libselinux.so.1 => /lib/libselinux.so.1 (0x00ecc000)
libsepol.so.1 => /lib/libsepol.so.1 (0x007e2000)
libpthread.so.0 => /lib/libpthread.so.0 (0x005b2000)
/lib/ld-linux.so.2 (0x00ea6000)$ ./configure --with-clvmd=corosync (without confdb - expected failure)
checking whether to build cluster LVM daemon... corosync checking for pkg-config... /usr/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking for PKGCONFIGINIT... no
pkg-config initialized
checking for COROSYNC... yes
checking for QUORUM... yes
checking for CONFDB... no
configure: error: bailing out... confdb library is required
$ ./configure --with-clvmd=openais (without confdb - optional)
checking whether to build cluster LVM daemon... openais checking for pkg-config... /usr/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking for PKGCONFIGINIT... no
pkg-config initialized
checking for COROSYNC... yes
checking for SALCK... yes
checking for CONFDB... no
checking corosync/confdb.h usability... no checking corosync/confdb.h presence... no checking for corosync/confdb.h... no
checking for CPG... yes
$ make && ldd daemons/clvmd/clvmd
[snip]
libcpg.so.4 => /usr/lib/libcpg.so.4 (0x00429000)
libSaLck.so.3 => /usr/lib/libSaLck.so.3 (0x001b9000)
libcoroipcc.so.4 => /usr/lib/libcoroipcc.so.4 (0x0075c000)
[snip]$ ldd tools/lvm
(no clvmd libraries leak into the build)
linux-gate.so.1 => (0x0075b000)
libdevmapper.so.1.02 => /lib/libdevmapper.so.1.02 (0x00862000)
librt.so.1 => /lib/librt.so.1 (0x00fa5000)
libdl.so.2 => /lib/libdl.so.2 (0x0094e000)
libtinfo.so.5 => /lib/libtinfo.so.5 (0x007f0000)
libc.so.6 => /lib/libc.so.6 (0x00110000)
libselinux.so.1 => /lib/libselinux.so.1 (0x0097e000)
libsepol.so.1 => /lib/libsepol.so.1 (0x00f24000)
libpthread.so.0 => /lib/libpthread.so.0 (0x0040b000)
/lib/ld-linux.so.2 (0x00e45000)$ ./configure --with-clvmd=openais
checking whether to build cluster LVM daemon... openais checking for pkg-config... /usr/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking for PKGCONFIGINIT... no
pkg-config initialized
checking for COROSYNC... yes
checking for SALCK... yes
checking for CONFDB... yes
checking corosync/confdb.h usability... yes checking corosync/confdb.h presence... yes checking for corosync/confdb.h... yes
checking for CPG... yes
$ make && ldd daemons/clvmd/clvmd
[snip]
libconfdb.so.4 => /usr/lib/libconfdb.so.4 (0x00cac000)
libcpg.so.4 => /usr/lib/libcpg.so.4 (0x00952000)
libSaLck.so.3 => /usr/lib/libSaLck.so.3 (0x008dd000)
libcoroipcc.so.4 => /usr/lib/libcoroipcc.so.4 (0x00a8a000)
[snip]$ ldd tools/lvm
(no clvmd libraries leak into the build)
linux-gate.so.1 => (0x00f4d000)
libdevmapper.so.1.02 => /lib/libdevmapper.so.1.02 (0x005d4000)
librt.so.1 => /lib/librt.so.1 (0x001e7000)
libdl.so.2 => /lib/libdl.so.2 (0x00630000)
libtinfo.so.5 => /lib/libtinfo.so.5 (0x00747000)
libc.so.6 => /lib/libc.so.6 (0x001f1000)
libselinux.so.1 => /lib/libselinux.so.1 (0x00e4d000)
libsepol.so.1 => /lib/libsepol.so.1 (0x0097d000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00496000)
/lib/ld-linux.so.2 (0x00914000)$ ./configure --with-clvmd=corosync,cman
checking whether to build cluster LVM daemon... corosync,cman checking for pkg-config... /usr/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking for PKGCONFIGINIT... no
pkg-config initialized
checking for CMAN... yes
checking for COROSYNC... yes
checking for QUORUM... yes
checking for CONFDB... yes
checking corosync/confdb.h usability... yes checking corosync/confdb.h presence... yes
checking for corosync/confdb.h... yes
checking for CPG... yes
checking for DLM... yes
$ make && ldd daemons/clvmd/clvmd
[snip]
libcman.so.3 => /usr/lib/libcman.so.3 (0x00b77000)
libconfdb.so.4 => /usr/lib/libconfdb.so.4 (0x00697000)
libdlm.so.3 => /usr/lib/libdlm.so.3 (0x006b8000)
libcpg.so.4 => /usr/lib/libcpg.so.4 (0x0040d000)
libquorum.so.4 => /usr/lib/libquorum.so.4 (0x0072d000)
libcoroipcc.so.4 => /usr/lib/libcoroipcc.so.4 (0x00a43000)
[snip]$ ldd tools/lvm
(no clvmd libraries leak into the build)
linux-gate.so.1 => (0x00cc5000)
libdevmapper.so.1.02 => /lib/libdevmapper.so.1.02 (0x0024c000)
librt.so.1 => /lib/librt.so.1 (0x00a0e000)
libdl.so.2 => /lib/libdl.so.2 (0x00224000)
libtinfo.so.5 => /lib/libtinfo.so.5 (0x00405000)
libc.so.6 => /lib/libc.so.6 (0x00264000)
libselinux.so.1 => /lib/libselinux.so.1 (0x004b7000)
libsepol.so.1 => /lib/libsepol.so.1 (0x0070f000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00177000)
/lib/ld-linux.so.2 (0x00556000)$ ./configure --with-clvmd=corosync,openais
checking whether to build cluster LVM daemon... corosync,openais checking for pkg-config... /usr/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking for PKGCONFIGINIT... no
pkg-config initialized
checking for COROSYNC... yes
checking for QUORUM... yes
checking for SALCK... yes
checking for CONFDB... yes
checking corosync/confdb.h usability... yes
checking corosync/confdb.h presence... yes
checking for corosync/confdb.h... yes
checking for CPG... yes
checking for DLM... yes
$ make && ldd daemons/clvmd/clvmd
[snip]
libconfdb.so.4 => /usr/lib/libconfdb.so.4 (0x00c1e000)
libcpg.so.4 => /usr/lib/libcpg.so.4 (0x00633000)
libSaLck.so.3 => /usr/lib/libSaLck.so.3 (0x00a7b000)
libdlm.so.3 => /usr/lib/libdlm.so.3 (0x00745000)
libquorum.so.4 => /usr/lib/libquorum.so.4 (0x00334000)
libcoroipcc.so.4 => /usr/lib/libcoroipcc.so.4 (0x00598000)
[snip]$ ldd tools/lvm
(no clvmd libraries leak into the build)
linux-gate.so.1 => (0x00660000)
libdevmapper.so.1.02 => /lib/libdevmapper.so.1.02 (0x0024e000)
librt.so.1 => /lib/librt.so.1 (0x0080f000)
libdl.so.2 => /lib/libdl.so.2 (0x002bd000)
libtinfo.so.5 => /lib/libtinfo.so.5 (0x00110000)
libc.so.6 => /lib/libc.so.6 (0x002c2000)
libselinux.so.1 => /lib/libselinux.so.1 (0x00aa2000)
libsepol.so.1 => /lib/libsepol.so.1 (0x0020e000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00776000)
/lib/ld-linux.so.2 (0x00b3b000)$ ./configure --with-clvmd=cman,openais
checking whether to build cluster LVM daemon... cman,openais checking for pkg-config... /usr/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking for PKGCONFIGINIT... no
pkg-config initialized
checking for CMAN... yes
checking for COROSYNC... yes
checking for SALCK... yes
checking for CONFDB... yes
checking corosync/confdb.h usability... yes checking corosync/confdb.h presence... yes checking for corosync/confdb.h... yes
checking for CPG... yes
checking for DLM... yes
$ make && ldd daemons/clvmd/clvmd
[snip]
libcman.so.3 => /usr/lib/libcman.so.3 (0x0018c000)
libconfdb.so.4 => /usr/lib/libconfdb.so.4 (0x001ec000)
libdlm.so.3 => /usr/lib/libdlm.so.3 (0x0012f000)
libcpg.so.4 => /usr/lib/libcpg.so.4 (0x00a6d000)
libSaLck.so.3 => /usr/lib/libSaLck.so.3 (0x00110000)
libcoroipcc.so.4 => /usr/lib/libcoroipcc.so.4 (0x0055b000)
[snip]$ ldd tools/lvm
(no clvmd libraries leak into the build)
linux-gate.so.1 => (0x00ce0000)
libdevmapper.so.1.02 => /lib/libdevmapper.so.1.02 (0x00a30000)
librt.so.1 => /lib/librt.so.1 (0x00d76000)
libdl.so.2 => /lib/libdl.so.2 (0x00bb7000)
libtinfo.so.5 => /lib/libtinfo.so.5 (0x00afe000)
libc.so.6 => /lib/libc.so.6 (0x00e66000)
libselinux.so.1 => /lib/libselinux.so.1 (0x00810000)
libsepol.so.1 => /lib/libsepol.so.1 (0x008f8000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00b8e000)
/lib/ld-linux.so.2 (0x0034c000)$ ./configure --with-clvmd=cman,corosync,openais
checking whether to build cluster LVM daemon... cman,corosync,openais checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes checking for PKGCONFIGINIT... no
pkg-config initialized
checking for CMAN... yes
checking for COROSYNC... yes
checking for QUORUM... yes
checking for SALCK... yes
checking for CONFDB... yes
checking corosync/confdb.h usability... yes
checking corosync/confdb.h presence... yes
checking for corosync/confdb.h... yes
checking for CPG... yes
checking for DLM... yes
$ make && ldd daemons/clvmd/clvmd
[snip]
libcman.so.3 => /usr/lib/libcman.so.3 (0x00a7f000)
libconfdb.so.4 => /usr/lib/libconfdb.so.4 (0x0089d000)
libdlm.so.3 => /usr/lib/libdlm.so.3 (0x00af9000)
libcpg.so.4 => /usr/lib/libcpg.so.4 (0x00b30000)
libSaLck.so.3 => /usr/lib/libSaLck.so.3 (0x00d44000)
libquorum.so.4 => /usr/lib/libquorum.so.4 (0x00f5c000)
libcoroipcc.so.4 => /usr/lib/libcoroipcc.so.4 (0x00927000)
[snip]$ ldd tools/lvm
(no clvmd libraries leak into the build)
linux-gate.so.1 => (0x00fa6000)
libdevmapper.so.1.02 => /lib/libdevmapper.so.1.02 (0x00969000)
librt.so.1 => /lib/librt.so.1 (0x00fca000)
libdl.so.2 => /lib/libdl.so.2 (0x00cf4000)
libtinfo.so.5 => /lib/libtinfo.so.5 (0x00364000)
libc.so.6 => /lib/libc.so.6 (0x003f5000)
libselinux.so.1 => /lib/libselinux.so.1 (0x008df000)
libsepol.so.1 => /lib/libsepol.so.1 (0x002db000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00c2e000)
/lib/ld-linux.so.2 (0x007f3000)tested on RHEL4/RHEL5/Fedora:
./configure --with-clvmd=gulm,cman,openais
configure: error: requested clvmd configuration is not valid
PATCH 1/15 configure.in: improve --with-clvmd description
It is possible to build all clvmd locking backends at once but it doesn't really make sense in real life.
Improve the text to describe the most common scenarios.
---
:100644 100644 18bac05... f9e5d8d... M configure.in
configure.in | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-)
configure.in +6 -1
@@ -325,7 +325,12 @@ AC_MSG_RESULT($REALTIME) dnl -- Build cluster LVM daemon AC_MSG_CHECKING(whether to build cluster LVM daemon) AC_ARG_WITH(clvmd, - [ --with-clvmd=TYPE Build cluster LVM Daemon: cman/gulm/corosync/none/all + [ --with-clvmd=TYPE Build cluster LVM Daemon. + The following locking combinations are valid: + * cman,gulm (RHEL4 or equivalent) + * cman (RHEL5 or equivalent) + * cman,corosync,openais (or selection of them) + * none (disable build) [TYPE=none] ], [ CLVMD="$withval" ], [ CLVMD="none" ])
Signature · 1 line
1.5.4.3
PATCH 2/15 configure.in: define clvmd build types
In reply to Fabio M. Di Nittoset variables we will use later on to do multiple sanity checks on the clvmd build
---
:100644 100644 f9e5d8d... c58bb95... M configure.in
configure.in | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-)
configure.in +14 -0
@@ -344,6 +344,20 @@ if test x$CLVMD != xnone && test x$CLUSTER = xnone; then CLUSTER=internal fi +dnl -- define build types +if [[ `expr x"$CLVMD" : '.*gulm.*'` != 0 ]]; then + BUILDGULM=yes +fi +if [[ `expr x"$CLVMD" : '.*corosync.*'` != 0 ]]; then + BUILDCOROSYNC=yes +fi +if [[ `expr x"$CLVMD" : '.*openais.*'` != 0 ]]; then + BUILDOPENAIS=yes +fi +if [[ `expr x"$CLVMD" : '.*cman.*'` != 0 ]]; then + BUILDCMAN=yes +fi + dnl -- Look for corosync libraries if required. if [[ "x$CLVMD" = xall -o `expr x"$CLVMD" : '.*corosync.*'` != 0 ]]; then PKG_CHECK_MODULES(QUORUM, libquorum, [],
Signature · 1 line
1.5.4.3
PATCH 3/15 configure.in: Add sanity check for requested clvmd build
In reply to Fabio M. Di NittoStart restricting the combinations of backends that can be built within clvmd.
---
:100644 100644 c58bb95... a6d90e7... M configure.in
configure.in | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-)
configure.in +8 -0
@@ -358,6 +358,14 @@ if [[ `expr x"$CLVMD" : '.*cman.*'` != 0 ]]; then BUILDCMAN=yes fi +dnl -- sanity check around user selection +if test x$BUILDGULM = xyes; then + if test x$BUILDCOROSYNC = xyes || \ + test x$BUILDOPENAIS = xyes; then + AC_MSG_ERROR([requested clvmd configuration is not valid]) + fi +fi + dnl -- Look for corosync libraries if required. if [[ "x$CLVMD" = xall -o `expr x"$CLVMD" : '.*corosync.*'` != 0 ]]; then PKG_CHECK_MODULES(QUORUM, libquorum, [],
Signature · 1 line
1.5.4.3
PATCH 4/15 configure.in: Add dummy pkg-config initialization
In reply to Fabio M. Di NittoPKG_CHECK_MODULES macro is expanded to initialize the pkg-config environment only at the first invokation.
In our configure.in all PKG_CHECK_MODULES are/will be conditionals.
This change will make sure to init the enviroment properly and only if required.
---
:100644 100644 a6d90e7... e9a1206... M configure.in
configure.in | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-)
configure.in +9 -0
@@ -366,6 +366,15 @@ if test x$BUILDGULM = xyes; then fi fi +dnl -- Init pkg-config with dummy invokation: +dnl -- this is required because PKG_CHECK_MODULES macro is expanded +dnl -- to initialize the pkg-config environment only at the first invokation, +dnl -- that would be conditional in this configure.in. +if test x$CLVMD != xnone; then + PKG_CHECK_MODULES(PKGCONFIGINIT, pkgconfiginit, [], + [AC_MSG_RESULT([pkg-config initialized])]) +fi + dnl -- Look for corosync libraries if required. if [[ "x$CLVMD" = xall -o `expr x"$CLVMD" : '.*corosync.*'` != 0 ]]; then PKG_CHECK_MODULES(QUORUM, libquorum, [],
Signature · 1 line
1.5.4.3
PATCH 5/15 configure.in: Add check_lib_no_libs support macro
In reply to Fabio M. Di NittoAC_CHECK_LIB by default add the result to LIBS= for linking. In some cases we want to check if a library is available, using a proper macro, without adding the result to the global build environment.check_lib_no_libs provides this functionality.
---
:100644 100644 e9a1206... 40974db... M configure.in
configure.in | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-)
configure.in +14 -0
@@ -375,6 +375,20 @@ if test x$CLVMD != xnone; then [AC_MSG_RESULT([pkg-config initialized])]) fi +dnl -- helper macro to check libs without adding them to LIBS +check_lib_no_libs() { + lib_no_libs_arg1=$1 + shift + lib_no_libs_arg2=$1 + shift + lib_no_libs_args=$@ + AC_CHECK_LIB([$lib_no_libs_arg1], + [$lib_no_libs_arg2],, + [AC_MSG_ERROR([bailing out])], + [$lib_no_libs_args]) + LIBS=$ac_check_lib_save_LIBS +} + dnl -- Look for corosync libraries if required. if [[ "x$CLVMD" = xall -o `expr x"$CLVMD" : '.*corosync.*'` != 0 ]]; then PKG_CHECK_MODULES(QUORUM, libquorum, [],
Signature · 1 line
1.5.4.3
PATCH 6/15 clvmd: improve gulm build
In reply to Fabio M. Di NittoAdd sanity checks for libccs and libgulm.
Propagate the build info in a more consisten way.
---
:100644 100644 40974db... cc4697d... M configure.in
:100644 100644 6054ded... f643644... M daemons/clvmd/Makefile.in
configure.in | 18 ++++++++++++++++++ daemons/clvmd/Makefile.in | 11 ++++++++--- 2 files changed, 26 insertions(+), 3 deletions(-)
configure.in +18 -0
@@ -389,6 +389,20 @@ check_lib_no_libs() { LIBS=$ac_check_lib_save_LIBS } +dnl -- Look for gulm libraries if required. +if test x$BUILDGULM = xyes; then + PKG_CHECK_MODULES(CCS, libccs, [], + [AC_CHECK_HEADERS(ccs.h,,AC_MSG_ERROR(bailing out)) + check_lib_no_libs ccs ccs_connect + AC_MSG_RESULT([no pkg for libccs library, using -lccs]) + CCS_LIBS="-lccs"]) + PKG_CHECK_MODULES(GULM, libgulm, [], + [AC_CHECK_HEADERS(libgulm.h,,AC_MSG_ERROR(bailing out)) + check_lib_no_libs gulm lg_core_login + AC_MSG_RESULT([no pkg for libgulm library, using -lgulm]) + GULM_LIBS="-lgulm"]) +fi + dnl -- Look for corosync libraries if required. if [[ "x$CLVMD" = xall -o `expr x"$CLVMD" : '.*corosync.*'` != 0 ]]; then PKG_CHECK_MODULES(QUORUM, libquorum, [],
@@ -861,6 +875,8 @@ LVM_LIBAPI=`echo "$VER" | $AWK -F '[[()]]' '{print $2}'` ################################################################################ AC_SUBST(APPLIB) AC_SUBST(BUILD_DMEVENTD) +AC_SUBST(CCS_CFLAGS) +AC_SUBST(CCS_LIBS) AC_SUBST(CFLAGS) AC_SUBST(CFLOW_CMD) AC_SUBST(CLDFLAGS)
@@ -889,6 +905,8 @@ AC_SUBST(DM_LIB_VERSION) AC_SUBST(DM_LIB_PATCHLEVEL) AC_SUBST(FSADM) AC_SUBST(GROUP) +AC_SUBST(GULM_CFLAGS) +AC_SUBST(GULM_LIBS) AC_SUBST(HAVE_LIBDL) AC_SUBST(HAVE_REALTIME) AC_SUBST(HAVE_SELINUX)
daemons/clvmd/Makefile.in +8 -3
@@ -15,12 +15,16 @@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ -QUORUM_LIBS = @QUORUM_LIBS@ -QUORUM_CFLAGS = @QUORUM_CFLAGS@ +CCS_LIBS = @CCS_LIBS@ +CCS_CFLAGS = @CCS_CFLAGS@ CONFDB_LIBS = @CONFDB_LIBS@ CONFDB_CFLAGS = @CONFDB_CFLAGS@ CPG_LIBS = @CPG_LIBS@ CPG_CFLAGS = @CPG_CFLAGS@ +GULM_LIBS = @GULM_LIBS@ +GULM_CFLAGS = @GULM_CFLAGS@ +QUORUM_LIBS = @QUORUM_LIBS@ +QUORUM_CFLAGS = @QUORUM_CFLAGS@ SOURCES = \ clvmd-command.c \
@@ -57,7 +61,8 @@ endif ifeq ("$(GULM)", "yes") SOURCES += clvmd-gulm.c tcp-comms.c - LMLIBS += -lccs -lgulm + LMLIBS += $(CCS_LIBS) $(GULM_LIBS) + CFLAGS += $(CCS_CFLAGS) $(GULM_CFLAGS) DEFS += -DUSE_GULM endif
Signature · 1 line
1.5.4.3
PATCH 7/15 clvmd: improve libconfdb check
In reply to Fabio M. Di NittoAdd sanity checks for libconfdb.
Propagate the build info in a more consisten way.
---
:100644 100644 cc4697d... a38173d... M configure.in
:100644 100644 f643644... e00c733... M daemons/clvmd/Makefile.in
configure.in | 26 ++++++++++++++++++++++++++ daemons/clvmd/Makefile.in | 10 ++++++---- 2 files changed, 32 insertions(+), 4 deletions(-)
configure.in +26 -0
@@ -416,6 +416,32 @@ if [[ "x$CLVMD" = xall -o `expr x"$CLVMD" : '.*corosync.*'` != 0 ]]; then CPG_LIBS="-lcpg"]) fi +dnl -- Below are checks for libraries common to more than one build. + +dnl -- Check confdb library. +dnl -- mandatory for corosync build. +dnl -- optional for openais/cman build. + +if test x$CHECKCONFDB = xyes; then + PKG_CHECK_MODULES(CONFDB, libconfdb,, + [HAVE_PKG_CONFDB=no]) + + if test x$BUILDCOROSYNC = xyes && \ + test x$HAVE_PKG_CONFDB = xno; then + AC_MSG_ERROR([bailing out... confdb library is required]) + fi + + AC_CHECK_HEADERS(corosync/confdb.h, + [HAVE_CONFDB_H=yes], + [HAVE_CONFDB_H=no]) + + if test x$HAVE_PKG_CONFDB = xno && \ + test x$HAVE_CONFDB_H = xyes; then + AC_MSG_RESULT([no pkg for confdb library, using -lconfdb]) + CONFDB_LIBS="-lconfdb" + fi +fi + ################################################################################ dnl -- Build cluster log daemon AC_MSG_CHECKING(whether to build cluster log daemon)
daemons/clvmd/Makefile.in +6 -4
@@ -68,20 +68,22 @@ endif ifeq ("$(CMAN)", "yes") SOURCES += clvmd-cman.c - LMLIBS += -ldlm -lcman + LMLIBS += $(CONFDB_LIBS) -ldlm -lcman + CFLAGS += $(CONFDB_CFLAGS) DEFS += -DUSE_CMAN endif ifeq ("$(OPENAIS)", "yes") SOURCES += clvmd-openais.c - LMLIBS += -lSaLck -lcpg + LMLIBS += $(CONFDB_LIBS) -lSaLck -lcpg + CFLAGS += $(CONFDB_CFLAGS) DEFS += -DUSE_OPENAIS endif ifeq ("$(COROSYNC)", "yes") SOURCES += clvmd-corosync.c - LMLIBS += $(QUORUM_LIBS) $(CONFDB_LIBS) $(CPG_LIBS) -ldlm - CFLAGS += $(QUORUM_CFLAGS) $(CONFDB_CFLAGS) $(CPG_CFLAGS) + LMLIBS += $(CONFDB_LIBS) $(CPG_LIBS) $(QUORUM_LIBS) -ldlm + CFLAGS += $(CONFDB_CFLAGS) $(CPG_CFLAGS) $(QUORUM_CFLAGS) DEFS += -DUSE_COROSYNC endif
Signature · 1 line
1.5.4.3
PATCH 8/15 clvmd: improve libcpg check.
In reply to Fabio M. Di NittoAdd sanity checks for libcpg.
Propagate the build info in a more consisten way.
---
:100644 100644 a38173d... 81379c0... M configure.in
:100644 100644 e00c733... 2c9915c... M daemons/clvmd/Makefile.in
configure.in | 5 +++++ daemons/clvmd/Makefile.in | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-)
configure.in +5 -0
@@ -442,6 +442,11 @@ if test x$CHECKCONFDB = xyes; then fi fi +dnl -- Check cpg library. +if test x$CHECKCPG = xyes; then + PKG_CHECK_MODULES(CPG, libcpg) +fi + ################################################################################ dnl -- Build cluster log daemon AC_MSG_CHECKING(whether to build cluster log daemon)
daemons/clvmd/Makefile.in +2 -2
@@ -75,8 +75,8 @@ endif ifeq ("$(OPENAIS)", "yes") SOURCES += clvmd-openais.c - LMLIBS += $(CONFDB_LIBS) -lSaLck -lcpg - CFLAGS += $(CONFDB_CFLAGS) + LMLIBS += $(CONFDB_LIBS) $(CPG_LIBS) -lSaLck + CFLAGS += $(CONFDB_CFLAGS) $(CPG_CFLAGS) DEFS += -DUSE_OPENAIS endif
Signature · 1 line
1.5.4.3
PATCH 9/15 clvmd: improve libdlm check
In reply to Fabio M. Di NittoAdd sanity checks for libdlm.
Propagate the build info in a more consisten way.
---
:100644 100644 81379c0... ac3c009... M configure.in
:100644 100644 2c9915c... 5e35522... M daemons/clvmd/Makefile.in
configure.in | 11 +++++++++++ daemons/clvmd/Makefile.in | 10 ++++++---- 2 files changed, 17 insertions(+), 4 deletions(-)
configure.in +11 -0
@@ -447,6 +447,15 @@ if test x$CHECKCPG = xyes; then PKG_CHECK_MODULES(CPG, libcpg) fi +dnl -- Check dlm library. +if test x$CHECKDLM = xyes; then + PKG_CHECK_MODULES(DLM, libdlm, [], + [AC_CHECK_HEADERS(libdlm.h,,AC_MSG_ERROR(bailing out)) + check_lib_no_libs dlm dlm_lock -lpthread + AC_MSG_RESULT([no pkg for libdlm library, using -ldlm -lpthread]) + DLM_LIBS="-ldlm -lpthread"]) +fi + ################################################################################ dnl -- Build cluster log daemon AC_MSG_CHECKING(whether to build cluster log daemon)
@@ -926,6 +935,8 @@ AC_SUBST(CPG_LIBS) AC_SUBST(CSCOPE_CMD) AC_SUBST(DEBUG) AC_SUBST(DEVMAPPER) +AC_SUBST(DLM_CFLAGS) +AC_SUBST(DLM_LIBS) AC_SUBST(DMEVENTD) AC_SUBST(DM_COMPAT) AC_SUBST(DM_DEVICE_GID)
daemons/clvmd/Makefile.in +6 -4
@@ -21,6 +21,8 @@ CONFDB_LIBS = @CONFDB_LIBS@ CONFDB_CFLAGS = @CONFDB_CFLAGS@ CPG_LIBS = @CPG_LIBS@ CPG_CFLAGS = @CPG_CFLAGS@ +DLM_LIBS = @DLM_LIBS@ +DLM_CFLAGS = @DLM_CFLAGS@ GULM_LIBS = @GULM_LIBS@ GULM_CFLAGS = @GULM_CFLAGS@ QUORUM_LIBS = @QUORUM_LIBS@
@@ -68,8 +70,8 @@ endif ifeq ("$(CMAN)", "yes") SOURCES += clvmd-cman.c - LMLIBS += $(CONFDB_LIBS) -ldlm -lcman - CFLAGS += $(CONFDB_CFLAGS) + LMLIBS += $(CONFDB_LIBS) $(DLM_LIBS) -lcman + CFLAGS += $(CONFDB_CFLAGS) $(DLM_CFLAGS) DEFS += -DUSE_CMAN endif
@@ -82,8 +84,8 @@ endif ifeq ("$(COROSYNC)", "yes") SOURCES += clvmd-corosync.c - LMLIBS += $(CONFDB_LIBS) $(CPG_LIBS) $(QUORUM_LIBS) -ldlm - CFLAGS += $(CONFDB_CFLAGS) $(CPG_CFLAGS) $(QUORUM_CFLAGS) + LMLIBS += $(CONFDB_LIBS) $(CPG_LIBS) $(DLM_LIBS) $(QUORUM_LIBS) + CFLAGS += $(CONFDB_CFLAGS) $(CPG_CFLAGS) $(DLM_CFLAGS) $(QUORUM_CFLAGS) DEFS += -DUSE_COROSYNC endif
Signature · 1 line
1.5.4.3
PATCH 10/15 clvmd: improve cman build
In reply to Fabio M. Di NittoAdd sanity checks for libcman.
Propagate the build info in a more consisten way.
---
:100644 100644 ac3c009... 2b35462... M configure.in
:100644 100644 5e35522... 3baa4b9... M daemons/clvmd/Makefile.in
configure.in | 13 +++++++++++++ daemons/clvmd/Makefile.in | 6 ++++-- 2 files changed, 17 insertions(+), 2 deletions(-)
configure.in +13 -0
@@ -403,6 +403,17 @@ if test x$BUILDGULM = xyes; then GULM_LIBS="-lgulm"]) fi +dnl -- Look for cman libraries if required. +if test x$BUILDCMAN = xyes; then + PKG_CHECK_MODULES(CMAN, libcman, [], + [AC_CHECK_HEADERS(libcman.h,,AC_MSG_ERROR(bailing out)) + check_lib_no_libs cman cman_init + AC_MSG_RESULT([no pkg for libcman library, using -lcman]) + CMAN_LIBS="-lcman"]) + CHECKCONFDB=yes + CHECKDLM=yes +fi + dnl -- Look for corosync libraries if required. if [[ "x$CLVMD" = xall -o `expr x"$CLVMD" : '.*corosync.*'` != 0 ]]; then PKG_CHECK_MODULES(QUORUM, libquorum, [],
@@ -925,6 +936,8 @@ AC_SUBST(CLDWHOLEARCHIVE) AC_SUBST(CLUSTER) AC_SUBST(CLVMD) AC_SUBST(CLOGD) +AC_SUBST(CMAN_CFLAGS) +AC_SUBST(CMAN_LIBS) AC_SUBST(CMDLIB) AC_SUBST(CONFDB_CFLAGS) AC_SUBST(CONFDB_LIBS)
daemons/clvmd/Makefile.in +4 -2
@@ -17,6 +17,8 @@ VPATH = @srcdir@ CCS_LIBS = @CCS_LIBS@ CCS_CFLAGS = @CCS_CFLAGS@ +CMAN_LIBS = @CMAN_LIBS@ +CMAN_CFLAGS = @CMAN_CFLAGS@ CONFDB_LIBS = @CONFDB_LIBS@ CONFDB_CFLAGS = @CONFDB_CFLAGS@ CPG_LIBS = @CPG_LIBS@
@@ -70,8 +72,8 @@ endif ifeq ("$(CMAN)", "yes") SOURCES += clvmd-cman.c - LMLIBS += $(CONFDB_LIBS) $(DLM_LIBS) -lcman - CFLAGS += $(CONFDB_CFLAGS) $(DLM_CFLAGS) + LMLIBS += $(CMAN_LIBS) $(CONFDB_LIBS) $(DLM_LIBS) + CFLAGS += $(CMAN_CFLAGS) $(CONFDB_CFLAGS) $(DLM_CFLAGS) DEFS += -DUSE_CMAN endif
Signature · 1 line
1.5.4.3
PATCH 11/15 clvmd: improve corosync build
In reply to Fabio M. Di NittoUse common library check infrastructure.
---
:100644 100644 2b35462... 5211add... M configure.in
configure.in | 23 +++++++++++++---------- 1 files changed, 13 insertions(+), 10 deletions(-)
configure.in +13 -10
@@ -414,17 +414,20 @@ if test x$BUILDCMAN = xyes; then CHECKDLM=yes fi +dnl -- Look for corosync that's required also for openais build +dnl -- only enough recent version of corosync ship pkg-config files. +dnl -- We can safely rely on that to detect the correct bits. +if test x$BUILDCOROSYNC = xyes || \ + test x$BUILDOPENAIS = xyes; then + PKG_CHECK_MODULES(COROSYNC, corosync) + CHECKCONFDB=yes +fi + dnl -- Look for corosync libraries if required. -if [[ "x$CLVMD" = xall -o `expr x"$CLVMD" : '.*corosync.*'` != 0 ]]; then - PKG_CHECK_MODULES(QUORUM, libquorum, [], - [AC_MSG_RESULT([no pkg for quorum library, using -lquorum]); - QUORUM_LIBS="-lquorum"]) - PKG_CHECK_MODULES(CONFDB, libconfdb, [], - [AC_MSG_RESULT([no pkg for confdb library, using -lconfdb]); - CONFDB_LIBS="-lconfdb"]) - PKG_CHECK_MODULES(CPG, libcpg, [], - [AC_MSG_RESULT([no pkg for libcpg library, using -lcpg]); - CPG_LIBS="-lcpg"]) +if test x$BUILDCOROSYNC = xyes; then + PKG_CHECK_MODULES(QUORUM, libquorum) + CHECKCPG=yes + CHECKDLM=yes fi dnl -- Below are checks for libraries common to more than one build.
Signature · 1 line
1.5.4.3
PATCH 12/15 clvmd: improve openais build
In reply to Fabio M. Di NittoAdd sanity checks for libSaLck.
Propagate the build info in a more consisten way.
---
:100644 100644 5211add... df8c6e9... M configure.in
:100644 100644 3baa4b9... a79952c... M daemons/clvmd/Makefile.in
configure.in | 8 ++++++++ daemons/clvmd/Makefile.in | 6 ++++-- 2 files changed, 12 insertions(+), 2 deletions(-)
configure.in +8 -0
@@ -430,6 +430,12 @@ if test x$BUILDCOROSYNC = xyes; then CHECKDLM=yes fi +dnl -- Look for openais libraries if required. +if test x$BUILDOPENAIS = xyes; then + PKG_CHECK_MODULES(SALCK, libSaLck) + CHECKCPG=yes +fi + dnl -- Below are checks for libraries common to more than one build. dnl -- Check confdb library.
@@ -991,6 +997,8 @@ AC_SUBST(PKGCONFIG) AC_SUBST(POOL) AC_SUBST(QUORUM_CFLAGS) AC_SUBST(QUORUM_LIBS) +AC_SUBST(SALCK_CFLAGS) +AC_SUBST(SALCK_LIBS) AC_SUBST(SNAPSHOTS) AC_SUBST(STATICDIR) AC_SUBST(STATIC_LINK)
daemons/clvmd/Makefile.in +4 -2
@@ -29,6 +29,8 @@ GULM_LIBS = @GULM_LIBS@ GULM_CFLAGS = @GULM_CFLAGS@ QUORUM_LIBS = @QUORUM_LIBS@ QUORUM_CFLAGS = @QUORUM_CFLAGS@ +SALCK_LIBS = @SALCK_LIBS@ +SALCK_CFLAGS = @SALCK_CFLAGS@ SOURCES = \ clvmd-command.c \
@@ -79,8 +81,8 @@ endif ifeq ("$(OPENAIS)", "yes") SOURCES += clvmd-openais.c - LMLIBS += $(CONFDB_LIBS) $(CPG_LIBS) -lSaLck - CFLAGS += $(CONFDB_CFLAGS) $(CPG_CFLAGS) + LMLIBS += $(CONFDB_LIBS) $(CPG_LIBS) $(SALCK_LIBS) + CFLAGS += $(CONFDB_CFLAGS) $(CPG_CFLAGS) $(SALCK_CFLAGS) DEFS += -DUSE_OPENAIS endif
Signature · 1 line
1.5.4.3
PATCH 13/15 clvmd/Makefile: cut down on unnecessary checks
In reply to Fabio M. Di NittoRemove some duplication that's no longer necessary.
---
:100644 100644 a79952c... c23b51e... M daemons/clvmd/Makefile.in
daemons/clvmd/Makefile.in | 31 ++++--------------------------- 1 files changed, 4 insertions(+), 27 deletions(-)
daemons/clvmd/Makefile.in +4 -27
@@ -38,55 +38,32 @@ SOURCES = \ lvm-functions.c \ refresh_clvmd.c -ifneq (,$(findstring gulm,, "@CLVMD@,")) - GULM = yes -endif - -ifneq (,$(findstring cman,, "@CLVMD@,")) - CMAN = yes -endif - -ifneq (,$(findstring openais,, "@CLVMD@,")) - OPENAIS = yes -endif - -ifneq (,$(findstring corosync,, "@CLVMD@,")) - COROSYNC = yes -endif - -ifneq (,$(findstring all,, "@CLVMD@,")) - GULM = yes - CMAN = yes - OPENAIS = yes - COROSYNC = yes -endif - ifeq ("@DEBUG@", "yes") DEFS += -DDEBUG endif -ifeq ("$(GULM)", "yes") +ifneq (,$(findstring gulm,, "@CLVMD@,")) SOURCES += clvmd-gulm.c tcp-comms.c LMLIBS += $(CCS_LIBS) $(GULM_LIBS) CFLAGS += $(CCS_CFLAGS) $(GULM_CFLAGS) DEFS += -DUSE_GULM endif -ifeq ("$(CMAN)", "yes") +ifneq (,$(findstring cman,, "@CLVMD@,")) SOURCES += clvmd-cman.c LMLIBS += $(CMAN_LIBS) $(CONFDB_LIBS) $(DLM_LIBS) CFLAGS += $(CMAN_CFLAGS) $(CONFDB_CFLAGS) $(DLM_CFLAGS) DEFS += -DUSE_CMAN endif -ifeq ("$(OPENAIS)", "yes") +ifneq (,$(findstring openais,, "@CLVMD@,")) SOURCES += clvmd-openais.c LMLIBS += $(CONFDB_LIBS) $(CPG_LIBS) $(SALCK_LIBS) CFLAGS += $(CONFDB_CFLAGS) $(CPG_CFLAGS) $(SALCK_CFLAGS) DEFS += -DUSE_OPENAIS endif -ifeq ("$(COROSYNC)", "yes") +ifneq (,$(findstring corosync,, "@CLVMD@,")) SOURCES += clvmd-corosync.c LMLIBS += $(CONFDB_LIBS) $(CPG_LIBS) $(DLM_LIBS) $(QUORUM_LIBS) CFLAGS += $(CONFDB_CFLAGS) $(CPG_CFLAGS) $(DLM_CFLAGS) $(QUORUM_CFLAGS)
Signature · 1 line
1.5.4.3
PATCH 14/15 set clvmd build to default to cman locking backend
In reply to Fabio M. Di Nittobuild all, as previously suggested, does not make sense.
Allow all to be set to avoid breaking backward compatibility, but use cman instead.
---
:100644 100644 df8c6e9... 496ffe6... M configure.in
configure.in | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
configure.in +2 -2
@@ -334,8 +334,8 @@ AC_ARG_WITH(clvmd, [TYPE=none] ], [ CLVMD="$withval" ], [ CLVMD="none" ]) -if test x$CLVMD = xyes; then - CLVMD=all +if test x$CLVMD = xyes || test x$CLVMD = xall; then + CLVMD=cman fi AC_MSG_RESULT($CLVMD)
Signature · 1 line
1.5.4.3
PATCH 14/15 set clvmd build to default to cman locking backend
Quoted 3 lines · Fabio M. Di Nitto
build all, as previously suggested, does not make sense. Allow all to be set to avoid breaking backward compatibility, but use cman instead.
How easy would it be for 'all' to build all the ones that can be built on a given system based on the checks for libs required for each?
Alasdair
PATCH 14/15 set clvmd build to default to cman locking backend
Quoted 8 lines · Alasdair G Kergon
Quoted 3 lines · Fabio M. Di Nitto
build all, as previously suggested, does not make sense. Allow all to be set to avoid breaking backward compatibility, but use cman instead.
How easy would it be for 'all' to build all the ones that can be built on a given system based on the checks for libs required for each?
Probably not too difficult.
I'll need to investigate it and come back to you with a patch.
Fabio
PATCH 15/15 Allow corosync and openais backends to co-exist
In reply to Fabio M. Di NittoThe openais backend uses cpg and SaLck from the old openais whitetank branch. The SaLck service is known to be broken in any version of openais < 1.0 and it will never be fixed.
Port the openais code to the new corosync cpg api so that it can be built with openais > 1.0 and working SaLck.
Rename cpg call back functions in both openais and corosync locking backends to avoid clashes at link time.
---
:100644 100644 3de278d... cc5def5... M daemons/clvmd/clvmd-comms.h
:100644 100644 be8ff78... 239942c... M daemons/clvmd/clvmd-corosync.c
:100644 100644 3101069... 7c058a8... M daemons/clvmd/clvmd-openais.c
daemons/clvmd/clvmd-comms.h | 4 +- daemons/clvmd/clvmd-corosync.c | 16 ++++++------ daemons/clvmd/clvmd-openais.c | 49 +++++++++++++++++++++------------------ 3 files changed, 36 insertions(+), 33 deletions(-)
daemons/clvmd/clvmd-comms.h +2 -2
@@ -1,6 +1,6 @@/* * Copyright (C) 2002-2004 Sistina Software, Inc. All rights reserved. -* Copyright (C) 2004 Red Hat, Inc. All rights reserved. +* Copyright (C) 2004-2009 Red Hat, Inc. All rights reserved. * * This file is part of LVM2. *
@@ -77,7 +77,7 @@ struct cluster_ops *init_cman_cluster(void);#ifdef USE_OPENAIS # include <openais/saAis.h> -# include <openais/totem/totem.h> +# include <corosync/totem/totem.h> # define OPENAIS_CSID_LEN (sizeof(int))# define OPENAIS_MAX_CLUSTER_MESSAGE MESSAGE_SIZE_MAX# define OPENAIS_MAX_CLUSTER_MEMBER_NAME_LEN SA_MAX_NAME_LENGTH
daemons/clvmd/clvmd-corosync.c +8 -8
@@ -55,13 +55,13 @@/* Timeout value for several corosync calls */ #define LOCKSPACE_NAME "clvmd" -static void cpg_deliver_callback (cpg_handle_t handle, +static void corosync_cpg_deliver_callback (cpg_handle_t handle,const struct cpg_name *groupName,uint32_t nodeid,uint32_t pid,void *msg,size_t msg_len); -static void cpg_confchg_callback(cpg_handle_t handle, +static void corosync_cpg_confchg_callback(cpg_handle_t handle, const struct cpg_name *groupName, const struct cpg_address *member_list, size_t member_list_entries, const struct cpg_address *left_list, size_t left_list_entries,
@@ -87,9 +87,9 @@ static dlm_lshandle_t *lockspace;static struct cpg_name cpg_group_name;/* Corosync callback structs */ -cpg_callbacks_t cpg_callbacks = { - .cpg_deliver_fn = cpg_deliver_callback, - .cpg_confchg_fn = cpg_confchg_callback, +cpg_callbacks_t corosync_cpg_callbacks = { + .cpg_deliver_fn = corosync_cpg_deliver_callback, + .cpg_confchg_fn = corosync_cpg_confchg_callback, };quorum_callbacks_t quorum_callbacks = {
@@ -205,7 +205,7 @@ static char *print_corosync_csid(const char *csid)return buf; } -static void cpg_deliver_callback (cpg_handle_t handle, +static void corosync_cpg_deliver_callback (cpg_handle_t handle, const struct cpg_name *groupName, uint32_t nodeid, uint32_t pid,
@@ -225,7 +225,7 @@ static void cpg_deliver_callback (cpg_handle_t handle, msg_len-COROSYNC_CSID_LEN, (char*)&nodeid); } -static void cpg_confchg_callback(cpg_handle_t handle, +static void corosync_cpg_confchg_callback(cpg_handle_t handle, const struct cpg_name *groupName, const struct cpg_address *member_list, size_t member_list_entries, const struct cpg_address *left_list, size_t left_list_entries,
@@ -294,7 +294,7 @@ static int _init_cluster(void) node_hash =dm_hash_create (100 ); err =cpg_initialize (&cpg_handle, - &cpg_callbacks); + &corosync_cpg_callbacks);if (err !=CS_OK ) {syslog (LOG_ERR ,"Cannot initialise Corosync CPG service: %d" , err);
daemons/clvmd/clvmd-openais.c +26 -23
103 lines not on this page · raw message
Signature · 1 line
1.5.4.3