Re: [Pacemaker] ifdown ethX + corosync + DRBD = split-brain?

2013-07-25 Thread Viacheslav Dubrovskyi

19.07.2013 14:38, Howley, Tom wrote:

Hi,

I have been doing some testing of a fairly standard pacemaker/corosync setup 
with DRBD (with resource-level fencing) and have noticed the following in 
relation to testing network failures:

- Handling of all ports being blocked is OK, based on hundreds of tests.
- Handling of cable-pulls seems OK, based on only 10 tests.
- ifdown ethX leads to split-brain roughly 50% of the time due to two 
underlying issues:

1. corosync (possibly by design) handles loss of network interface differently to other 
network failures. I can only see this from the point of view of the   logs: "[TOTEM 
] The network interface is down.", which is different from cable-pull log, where I 
don't see that message. I'm guessing this as I don't know the code.
2. corosync allows a non-quorate partition, in my case a single node, to update 
the CIB. This behaviour has been previously confirmed in reply to previous 
mails on this list and it has been mentioned that there may be improvements in 
this area in the future. This on its own seems like a bug to me.

My question is: is it possible for me to configure corosync/drbd to handle the ifdown 
scenario or do I simply have to tell people "do not test with ifdown", as I 
have seen mentioned in a few places on the web? If I do have to leave out ifdown testing, 
how can I be sure that I haven't missed out testing some real network failure scenario.
When you shut down an interface, IP is removed. As a result, DRBD can 
not bind to IP.
In real life, it's not going to happen. So just tell people "do not test 
with ifdown".


--
WBR,
Viacheslav Dubrovskyi


___
Pacemaker mailing list: Pacemaker@oss.clusterlabs.org
http://oss.clusterlabs.org/mailman/listinfo/pacemaker

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org


Re: [Pacemaker] Linking lib/cib and lib/pengine to each other?

2013-03-26 Thread Viacheslav Dubrovskyi
26.03.2013 19:41, Andrew Beekhof пишет:
>>> Hi.
>>>
>>> I'm building a package for my distributive. Everything is built, but the
>>> package does not pass our internal tests. I get errors like this:
>>> verify-elf: ERROR: ./usr/lib/libpe_status.so.4.1.0: undefined symbol:
>>> get_object_root
> Was this the only undefined symbol?
For  lib/cib -> lib/pengine yes.
Another undefined symbols from lib/common and it's easy fixed.
> It might be better to remove use of that function instead.
Maybe yes, but I do not know what the developers were thinking when done so.
For me as maintainer easy fix linkage.
>
>>> It mean, that libpe_status.so not linked with libcib.so where defined
>>> get_object_root. I can easy fix it adding
>>> libpe_status_la_LIBADD  =  $(top_builddir)/lib/cib/libcib.la
>>> in lib/pengine/Makefile.am
>>>
>>> But for this I need build libcib before lib/pengine. And it's impossible
>>> too, because libcib used symbols from lib/pengine. So we have situation,
>>> when two library must be linked to each other.
>>>
>>> And this is very bad because then the in fact it should be one library.
>>> Or symbols should be put in a third library, such as common.
>>>
>>> Can anyone comment on this situation?
>> Patch for fix this error.
>>
>>

-- 
WBR,
Viacheslav Dubrovskyi


___
Pacemaker mailing list: Pacemaker@oss.clusterlabs.org
http://oss.clusterlabs.org/mailman/listinfo/pacemaker

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org


Re: [Pacemaker] Linking lib/cib and lib/pengine to each other?

2013-03-25 Thread Viacheslav Dubrovskyi
23.03.2013 08:27, Viacheslav Dubrovskyi пишет:
> Hi.
>
> I'm building a package for my distributive. Everything is built, but the
> package does not pass our internal tests. I get errors like this:
> verify-elf: ERROR: ./usr/lib/libpe_status.so.4.1.0: undefined symbol:
> get_object_root
>
> It mean, that libpe_status.so not linked with libcib.so where defined
> get_object_root. I can easy fix it adding
> libpe_status_la_LIBADD  =  $(top_builddir)/lib/cib/libcib.la
> in lib/pengine/Makefile.am
>
> But for this I need build libcib before lib/pengine. And it's impossible
> too, because libcib used symbols from lib/pengine. So we have situation,
> when two library must be linked to each other.
>
> And this is very bad because then the in fact it should be one library.
> Or symbols should be put in a third library, such as common.
>
> Can anyone comment on this situation?
Patch for fix this error.

-- 
WBR,
Viacheslav Dubrovskyi

diff --git a/Makefile.am b/Makefile.am
index 4f742e4..fdf19eb 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -23,7 +23,7 @@ EXTRA_DIST  = autogen.sh ConfigureMe README.in libltdl.tar m4/gnulib
 MAINTAINERCLEANFILES= Makefile.in aclocal.m4 configure DRF/config-h.in \
 DRF/stamp-h.in libtool.m4 ltdl.m4 libltdl.tar
 
-CORE	= $(LIBLTDL_DIR) replace include lib mcp pengine cib crmd fencing lrmd tools xml
+CORE	= $(LIBLTDL_DIR) replace include lib mcp cib pengine crmd fencing lrmd tools xml
 SUBDIRS	= $(CORE) cts extra doc
 
 doc_DATA = AUTHORS COPYING COPYING.LIB
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 5563819..4ebd91b 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -39,7 +39,7 @@ clean-local:
 	rm -f *.pc
 
 ## Subdirectories...
-SUBDIRS	= gnu common pengine transition cib fencing services lrmd cluster
+SUBDIRS	= gnu common cib pengine transition fencing services lrmd cluster
 DIST_SUBDIRS =  $(SUBDIRS) ais
 
 if BUILD_CS_PLUGIN
diff --git a/lib/cib/Makefile.am b/lib/cib/Makefile.am
index 6ab02fc..c73a329 100644
--- a/lib/cib/Makefile.am
+++ b/lib/cib/Makefile.am
@@ -32,11 +32,14 @@ if ENABLE_ACL
 libcib_la_SOURCES   += cib_acl.c
 endif
 
-libcib_la_LDFLAGS	= -version-info 3:0:0 $(top_builddir)/lib/common/libcrmcommon.la $(CRYPTOLIB) \
-			$(top_builddir)/lib/pengine/libpe_rules.la
-
+libcib_la_LDFLAGS	= -version-info 3:0:0 -L$(top_builddir)/lib/pengine/.libs
+libcib_la_LIBADD= $(CRYPTOLIB) $(top_builddir)/lib/pengine/libpe_rules.la $(top_builddir)/lib/common/libcrmcommon.la
 libcib_la_CFLAGS	= -I$(top_srcdir)
 
+libcib_la_DEPENDENCIES  = libpe_rules
+libpe_rules:
+	make -C ../../lib/pengine libpe_rules.la
+
 clean-generic:
 	rm -f *.log *.debug *.xml *~
 
diff --git a/lib/pengine/Makefile.am b/lib/pengine/Makefile.am
index 9cb2392..a173522 100644
--- a/lib/pengine/Makefile.am
+++ b/lib/pengine/Makefile.am
@@ -28,10 +28,11 @@ noinst_HEADERS	= unpack.h variant.h
 
 libpe_rules_la_LDFLAGS	= -version-info 2:2:0
 libpe_rules_la_SOURCES	= rules.c common.c
+libpe_rules_la_LIBADD	= $(top_builddir)/lib/common/libcrmcommon.la
 
 libpe_status_la_LDFLAGS	= -version-info 5:0:1
 libpe_status_la_SOURCES	=  status.c unpack.c utils.c complex.c native.c group.c clone.c rules.c common.c
-libpe_status_la_LIBADD	=  @CURSESLIBS@
+libpe_status_la_LIBADD  =  @CURSESLIBS@ $(top_builddir)/lib/common/libcrmcommon.la $(top_builddir)/lib/cib/libcib.la
 
 clean-generic:
 	rm -f *.log *.debug *~
diff --git a/lib/services/Makefile.am b/lib/services/Makefile.am
index 3ee3347..ef8fbc3 100644
--- a/lib/services/Makefile.am
+++ b/lib/services/Makefile.am
@@ -26,7 +26,7 @@ noinst_HEADERS  = upstart.h systemd.h services_private.h
 libcrmservice_la_SOURCES = services.c services_linux.c
 libcrmservice_la_LDFLAGS = -version-info 1:0:0
 libcrmservice_la_CFLAGS  = $(GIO_CFLAGS)
-libcrmservice_la_LIBADD   = $(GIO_LIBS)
+libcrmservice_la_LIBADD   = $(GIO_LIBS) $(top_builddir)/lib/common/libcrmcommon.la
 
 if BUILD_UPSTART
 libcrmservice_la_SOURCES += upstart.c
diff --git a/lib/transition/Makefile.am b/lib/transition/Makefile.am
index 49c7113..7279c59 100644
--- a/lib/transition/Makefile.am
+++ b/lib/transition/Makefile.am
@@ -29,6 +29,7 @@ libtransitioner_la_SOURCES	= unpack.c graph.c utils.c
 
 libtransitioner_la_LDFLAGS	= -version-info 2:0:0
 libtransitioner_la_CFLAGS	= -I$(top_builddir)
+libtransitioner_la_LIBADD   = $(top_builddir)/lib/common/libcrmcommon.la
 
 clean-generic:
 	rm -f *~
___
Pacemaker mailing list: Pacemaker@oss.clusterlabs.org
http://oss.clusterlabs.org/mailman/listinfo/pacemaker

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org


[Pacemaker] Linking lob/cib and lib/pengine to each other?

2013-03-22 Thread Viacheslav Dubrovskyi
Hi.

I'm building a package for my distributive. Everything is built, but the
package does not pass our internal tests. I get errors like this:
verify-elf: ERROR: ./usr/lib/libpe_status.so.4.1.0: undefined symbol:
get_object_root

It mean, that libpe_status.so not linked with libcib.so where defined
get_object_root. I can easy fix it adding
libpe_status_la_LIBADD  =  $(top_builddir)/lib/cib/libcib.la
in lib/pengine/Makefile.am

But for this I need build libcib before lib/pengine. And it's impossible
too, because libcib used symbols from lib/pengine. So we have situation,
when two library must be linked to each other.

And this is very bad because then the in fact it should be one library.
Or symbols should be put in a third library, such as common.

Can anyone comment on this situation?

-- 
WBR,
Viacheslav Dubrovskyi


___
Pacemaker mailing list: Pacemaker@oss.clusterlabs.org
http://oss.clusterlabs.org/mailman/listinfo/pacemaker

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org