Re: [Pacemaker] how to keep ftp connection when swap from primary to secondary

2010-08-27 Thread Ultrabug

On 26/08/2010 18:44, liang...@asc-csa.gc.ca wrote:

Hi,



Hi


I installed ipvsadm and ran

ipvsadm --start-daemon=master --mcast-interface=eth0

in master node and

ipvsadm --start-daemon=backup --mcast-interface=eth0

in backup node. But still i lost ftp connection during node swap.



Did you actually check that connections get replicated using `ipvadm -Lc` ?

In recent kernels there is a IPVS Helper for FTP (see CONFIG_IP_VS_FTP 
on your kernel). I don't use it myself but maybe it could help you 
achieve what you want.


I'll stop here since we're drifting topic on this ML, if something is 
unclear to you, feel free to mail me directly.


Kind regards,



Liang Ma
Contractuel | Consultant | SED Systems Inc.
Ground Systems Analyst
Agence spatiale canadienne | Canadian Space Agency
6767, Route de l'Aéroport, Longueuil (St-Hubert), QC, Canada, J3Y 8Y9
Tél/Tel : (450) 926-5099 | Téléc/Fax: (450) 926-5083
Courriel/E-mail : [liang...@space.gc.ca]
Site web/Web site : [www.space.gc.ca ]




-Original Message-
From: Ma, Liang
Sent: August 26, 2010 12:17 PM
To: 'The Pacemaker cluster resource manager'
Subject: RE: [Pacemaker] how to keep ftp connection when swap from primary to 
secondary

Thank you Raoul. I will try it.

Liang Ma
Contractuel | Consultant | SED Systems Inc.
Ground Systems Analyst
Agence spatiale canadienne | Canadian Space Agency
6767, Route de l'Aéroport, Longueuil (St-Hubert), QC, Canada, J3Y 8Y9
Tél/Tel : (450) 926-5099 | Téléc/Fax: (450) 926-5083
Courriel/E-mail : [liang...@space.gc.ca]
Site web/Web site : [www.space.gc.ca ]




-Original Message-
From: Raoul Bhatia [IPAX] [mailto:r.bha...@ipax.at]
Sent: August 26, 2010 11:17 AM
To: The Pacemaker cluster resource manager
Subject: Re: [Pacemaker] how to keep ftp connection when swap from primary to 
secondary

On 08/26/2010 04:42 PM, liang...@asc-csa.gc.ca wrote:

I have followed the guide in "Clusters from Scratch" written by Andrew
Beekhof and successfully setup an Active/Passive pair of cluster
servers. The cluster runs in Fedora 13 and includes services like
apache, vsftpd and nfs. Drbd is used to allow data consistence during a
failover. Everything works fine except ftp lose its connection when the
service swaps from primary to the secondary or vice versa. I know to
keep the ftp connection, one may need to keep the connection states for
the session across the nodes. But I couldn't find clue how to do it.
Does anyone there have any idea how to keep the ftp connection when
swapping nodes, if it is possible?


hi,

as of now, we're not syncing our connections between the load
balancers, but i would suggest
http://www.linuxvirtualserver.org/docs/sync.html and the like.


cheers,
raoul



___
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://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker


Re: [Pacemaker] Proposing patch for ld --as-needed

2010-07-27 Thread Ultrabug
On Monday 26 July 2010 09:58:09 Simon Horman wrote:
> On Mon, Jul 26, 2010 at 09:32:20AM +0200, Andrew Beekhof wrote:
> > On Mon, Jul 26, 2010 at 9:26 AM, Simon Horman  wrote:
> > > On Thu, Jul 22, 2010 at 05:05:07PM +0900, Simon Horman wrote:
> > >> > # This patch sets the build processs 'ld --as-needed' compliant
> > >> > #
> > >> > # First chunck corrects the linking order so that libpe_status is
> > >> > linked # after libpengine. This is needed because the linker
> > >> > evaluates statements # sequentially starting from the inner most
> > >> > lib and libpengine uses functions # that are defined in
> > >> > libpe_status.
> > >> > #
> > >> > # Second chunck explicitly adds CURSESLIBS dependency to
> > >> > libpe_status. # This is requested from the configure.ac upon
> > >> > ncurses detection so we # need to provide 'printw' or any linking
> > >> > with libpe_status will fail.
> > >> 
> > >> This looks good to me.
> > > 
> > > Andrew, Dejan,
> > > 
> > > could you consider applying this change?
> > 
> > Done.
> 
> Thanks
> 

Thanks a lot guys !

> > Forgot to give attribution though, sorry :-(
> 
> Thats fine by me :-)
> 
> ___
> 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://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker

___
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://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker


Re: [Pacemaker] Proposing patch for ld --as-needed

2010-07-22 Thread Ultrabug

On 22/07/2010 01:56, Simon Horman wrote:

On Wed, Jul 21, 2010 at 09:40:10PM +0200, Ultrabug wrote:

On Wednesday 21 July 2010 03:49:42 Simon Horman wrote:

On Tue, Jul 20, 2010 at 05:35:01PM +0200, Ultrabug wrote:

- Original Message -
From: Simon Horman
To: The Pacemaker cluster resource manager
  Sent: Tue, 20 Jul 2010 05:10:32 +0200
(CEST)
Subject: Re: [Pacemaker] Proposing patch for ld --as-needed

On Sat, Jul 17, 2010 at 01:12:20PM +0200, Ultrabug wrote:

Dear list,

I would like to ask you about a possible upstream modification regarding
the -- as-needed ld flag for which we Gentoo users need to patch the
pacemaker sources to get it compile.

I'm attaching the patch which, as you can see, is relatively small and
simple (looks to me at least). The question is whether or not you think
this could be done upstream ?

Thank you for your interest in this and all you work,


Out of interest, could you explain why this is needed?
Is it because gold is being used as the linker?


[ please don't top-post ]


[ noticed after sending, sorry ]



Thanks for the link.

I guess what is happening without --as-needed is that the curses
library is being dragged in somewhere, somehow - without your proposed
change CURSESLIBS is used exactly nowhere.



Actually the two chunks of the patch have different purposes.

The first one is needed because the linking order has a meaning on a as-needed
system and libpengine uses functions that are defined in libpe_status.

Here is an example of failing build : http://paste.pocoo.org/show/239905/
If you try to compile a program that uses libpengine that doesn't need
libpe_status, e.g. gcc -Wl,--as-needed ptest.c -o ptest -lpe_status -lpengine
(shortened version of actual linking from pacemaker build.log) linking will
fail. Linker evaluates that statement sequentially starting from the inner
most lib:
   1) do I need libpe_status? No, forget about it.
   2) do I need libpengine? Yes, please.
   3) is everything all right? Ups, I don't know what `was_processing_warning'
is, die...


The second one explicitly adds CURSESLIBS dependency to libpe_status.
If pacemaker detects ncurses, you get HAVE_NCURSES_H and e.g.
status_print (used in  lib/pengine/native.c etc.) becomes wrapper
around "printw" (see configure.ac). You need to provide `printw' or any linking
with libpe_status will fail.
Fail build example : http://paste.pocoo.org/show/239916/


So I think that your change is a step in the right direction,
though for completeness I think that you also need to give the same
treatment to libpe_rule as common.c seems to make curses calls.

Could you considering updating your patch to include my proposed
additions below? And could you please include a description that describes
what the patch does? Perhaps something like this:



Sure, if you agree with the explanations above, I'll summarize them and add
them in the patch which I'll resubmit to you for integration.


I think tat you have a better handle on this problem than me.
So yes, please summarise your explanation above and use
it as a preamble to the patch.

[snip]


Sure mate, here it is attached. I hope it's explained well enough.
Thanks for your help and interest.

Kind regards




___
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://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker


# This patch sets the build processs 'ld --as-needed' compliant
#
# First chunck corrects the linking order so that libpe_status is linked
# after libpengine. This is needed because the linker evaluates statements
# sequentially starting from the inner most lib and libpengine uses functions
# that are defined in libpe_status.
#
# Second chunck explicitly adds CURSESLIBS dependency to libpe_status.
# This is requested from the configure.ac upon ncurses detection so we
# need to provide 'printw' or any linking with libpe_status will fail.
--- pengine/Makefile.am
+++ pengine/Makefile.am
@@ -58,6 +58,7 @@
 # -L$(top_builddir)/lib/pils -lpils -export-dynamic -module -avoid-version
 libpengine_la_SOURCES  = pengine.c allocate.c utils.c constraints.c \
native.c group.c clone.c master.c graph.c
+libpengine_la_LIBADD= $(top_builddir)/lib/pengine/libpe_status.la

 pengine_SOURCES= main.c
 pengine_LDADD  = $(COMMONLIBS) $(top_builddir)/lib/cib/libcib.la
--- lib/pengine/Makefile.am
+++ lib/pengine/Makefile.am
@@ -34,7 +34,7 @@

 libpe_status_la_LDFLAGS= -version-info 2:0:0
 libpe_status_la_SOURCES=  $(rule_files) $(status_files)
-libpe_status_la_LIBADD = -llrm
+libpe_status_la_LIBADD = -llrm @CURSESLIBS@

 clean-generic:
rm -f *.log *.debug *~
___

Re: [Pacemaker] Proposing patch for ld --as-needed

2010-07-21 Thread Ultrabug
On Wednesday 21 July 2010 03:49:42 Simon Horman wrote:
> On Tue, Jul 20, 2010 at 05:35:01PM +0200, Ultrabug wrote:
> > - Original Message -
> > From: Simon Horman 
> > To: The Pacemaker cluster resource manager
> >  Sent: Tue, 20 Jul 2010 05:10:32 +0200
> > (CEST)
> > Subject: Re: [Pacemaker] Proposing patch for ld --as-needed
> > 
> > On Sat, Jul 17, 2010 at 01:12:20PM +0200, Ultrabug wrote:
> > >Dear list,
> > >
> > >I would like to ask you about a possible upstream modification regarding
> > >the -- as-needed ld flag for which we Gentoo users need to patch the
> > >pacemaker sources to get it compile.
> > >
> > >I'm attaching the patch which, as you can see, is relatively small and
> > >simple (looks to me at least). The question is whether or not you think
> > >this could be done upstream ?
> > >
> > >Thank you for your interest in this and all you work,
> > 
> > Out of interest, could you explain why this is needed?
> > Is it because gold is being used as the linker?
> 
> [ please don't top-post ]

[ noticed after sending, sorry ]

> 
> Thanks for the link.
> 
> I guess what is happening without --as-needed is that the curses
> library is being dragged in somewhere, somehow - without your proposed
> change CURSESLIBS is used exactly nowhere.
> 

Actually the two chunks of the patch have different purposes.

The first one is needed because the linking order has a meaning on a as-needed 
system and libpengine uses functions that are defined in libpe_status.

Here is an example of failing build : http://paste.pocoo.org/show/239905/
If you try to compile a program that uses libpengine that doesn't need 
libpe_status, e.g. gcc -Wl,--as-needed ptest.c -o ptest -lpe_status -lpengine 
(shortened version of actual linking from pacemaker build.log) linking will 
fail. Linker evaluates that statement sequentially starting from the inner 
most lib:
  1) do I need libpe_status? No, forget about it.
  2) do I need libpengine? Yes, please.
  3) is everything all right? Ups, I don't know what `was_processing_warning' 
is, die...


The second one explicitly adds CURSESLIBS dependency to libpe_status.
If pacemaker detects ncurses, you get HAVE_NCURSES_H and e.g.
status_print (used in  lib/pengine/native.c etc.) becomes wrapper
around "printw" (see configure.ac). You need to provide `printw' or any linking 
with libpe_status will fail.
Fail build example : http://paste.pocoo.org/show/239916/

> So I think that your change is a step in the right direction,
> though for completeness I think that you also need to give the same
> treatment to libpe_rule as common.c seems to make curses calls.
> 
> Could you considering updating your patch to include my proposed
> additions below? And could you please include a description that describes
> what the patch does? Perhaps something like this:
> 

Sure, if you agree with the explanations above, I'll summarize them and add 
them in the patch which I'll resubmit to you for integration.

>   Explicitly link curses to libpengine
> 
>   When the ld option --as-needed is used the build fails, complaining
>   about missing curses symbols. This appears to be because without
>   the option curses was implicitly linked, somehow. But with the
>   option the implicit linking disapears, presumably because curses is
>   trimmed from the libraries linked to another library that is
>   subsequently linked to pengine, implicitly or otherwise.
> 
>   This patch resolves the problem by implicitly linking curses.
> 
>   It is of note that without this patch CURSESLIBS is not used anywhere.
> 
> > >--- pengine/Makefile.am
> > >+++ pengine/Makefile.am
> > >@@ -58,6 +58,7 @@
> > >
> > > # -L$(top_builddir)/lib/pils -lpils -export-dynamic -module
> > > -avoid-version libpengine_la_SOURCES  = pengine.c allocate.c utils.c
> > > constraints.c \
> > > 
> > >   native.c group.c clone.c master.c graph.c
> > >
> > >+libpengine_la_LIBADD= $(top_builddir)/lib/pengine/libpe_status.la
> 
>+libpengine_la_LIBADD= $(top_builddir)/lib/pengine/libpe_status.la \
>+   $(top_builddir)/lib/pengine/libpe_rules.la
> 
> > > pengine_SOURCES   = main.c
> > > pengine_LDADD = $(COMMONLIBS) $(top_builddir)/lib/cib/libcib.la
> > >
> > >--- lib/pengine/Makefile.am
> > >+++ lib/pengine/Makefile.am
> > >@@ -34,7 +34,7 @@
> 
> libpe_rules_la_LDFLAGS  = -version-info 2:0:0
> libpe_rules_la_SOURCES  = $(rule_files)
>+libpe_status_la_LIBADD  =

[Pacemaker] Proposing patch for ld --as-needed

2010-07-17 Thread Ultrabug
Dear list,

I would like to ask you about a possible upstream modification regarding the --
as-needed ld flag for which we Gentoo users need to patch the pacemaker sources 
to get it compile.

I'm attaching the patch which, as you can see, is relatively small and simple 
(looks to me at least). The question is whether or not you think this could be 
done upstream ?

Thank you for your interest in this and all you work,

Kind regards,

Ultrabug
--- pengine/Makefile.am
+++ pengine/Makefile.am
@@ -58,6 +58,7 @@
 # -L$(top_builddir)/lib/pils -lpils -export-dynamic -module -avoid-version
 libpengine_la_SOURCES	= pengine.c allocate.c utils.c constraints.c \
 			native.c group.c clone.c master.c graph.c
+libpengine_la_LIBADD= $(top_builddir)/lib/pengine/libpe_status.la

 pengine_SOURCES	= main.c
 pengine_LDADD	= $(COMMONLIBS)	$(top_builddir)/lib/cib/libcib.la
--- lib/pengine/Makefile.am
+++ lib/pengine/Makefile.am
@@ -34,7 +34,7 @@

 libpe_status_la_LDFLAGS	= -version-info 2:0:0
 libpe_status_la_SOURCES	=  $(rule_files) $(status_files)
-libpe_status_la_LIBADD	= -llrm
+libpe_status_la_LIBADD	= -llrm @CURSESLIBS@

 clean-generic:
 	rm -f *.log *.debug *~
___
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://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker