[Pacemaker] Starting of multiple booth in the same node
Jiaju Zhang
jjzhang at suse.de
Tue Jun 19 09:34:44 UTC 2012
Hi Yuichi,
On Thu, 2012-06-14 at 19:20 +0900, Yuichi SEINO wrote:
> Hi Jiaju,
>
> I have a question about booth.
> Can you allow multiple booth to start in the same node?
>
> If it is restrict, then I think that we need to change the error message.
> Currently, the following error message is output when multiple booth started.
>
> ERROR: failed to bind socket Address already in use
> or
> ERROR: bind error -1: Address already in use (98)
>
> Though, this error message is also output for another case. So I want
> to identify starting of multiple booth
> from a error message. I guess that we can determine this case from the pid file.
I'm attaching a patch which intends to fix this issue. Could you give it
a try to see if it works for you?
Thanks a lot;)
Jiaju
Reported-by: Yuich SEINO <seino.cluster2 at gmail.com>
Signed-off-by: Jiaju Zhang <jjzhang at suse.de>
---
src/main.c | 26 ++++++--------------------
1 files changed, 6 insertions(+), 20 deletions(-)
diff --git a/src/main.c b/src/main.c
index 8e51007..4736a93 100644
--- a/src/main.c
+++ b/src/main.c
@@ -447,14 +447,12 @@ static int setup_timer(void)
return timerlist_init();
}
-static int setup(int type)
+static int loop(void)
{
- int rv;
-
- rv = setup_config(type);
- if (rv < 0)
- goto fail;
-
+ void (*workfn) (int ci);
+ void (*deadfn) (int ci);
+ int rv, i;
+
rv = setup_timer();
if (rv < 0)
goto fail;
@@ -472,18 +470,6 @@ static int setup(int type)
goto fail;
client_add(rv, process_listener, NULL);
- return 0;
-
-fail:
- return -1;
-}
-
-static int loop(void)
-{
- void (*workfn) (int ci);
- void (*deadfn) (int ci);
- int rv, i;
-
while (1) {
rv = poll(pollfd, client_maxi + 1, poll_timeout);
if (rv == -1 && errno == EINTR)
@@ -947,7 +933,7 @@ static int do_server(int type)
int fd = -1;
int rv = -1;
- rv = setup(type);
+ rv = setup_config(type);
if (rv < 0)
goto out;
More information about the Pacemaker
mailing list