[Openais] [PATCH] main: let poll really stop before totempg_finalize

2011-07-25 Thread Jan Friesse
Signed-off-by: Jan Friesse 
---
 exec/main.c |   24 +++-
 1 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/exec/main.c b/exec/main.c
index be9e118..1c4fb37 100644
--- a/exec/main.c
+++ b/exec/main.c
@@ -184,6 +184,8 @@ static int32_t corosync_not_enough_fds_left = 0;
 
 static void serialize_unlock (void);
 
+static void serialize_lock (void);
+
 hdb_handle_t corosync_poll_handle_get (void)
 {
return (corosync_poll_handle);
@@ -211,14 +213,7 @@ static void unlink_all_completed (void)
serialize_unlock ();
api->timer_delete (corosync_stats_timer_handle);
poll_stop (corosync_poll_handle);
-   totempg_finalize ();
-
-   /*
-* Remove pid lock file
-*/
-   unlink (corosync_lock_file);
-
-   corosync_exit_error (AIS_DONE_EXIT);
+   serialize_lock ();
 }
 
 void corosync_shutdown_request (void)
@@ -1887,6 +1882,17 @@ int main (int argc, char **argv, char **envp)
 */
poll_run (corosync_poll_handle);
 
+   /*
+* Exit was requested
+*/
+   totempg_finalize ();
+
+   /*
+* Remove pid lock file
+*/
+   unlink (corosync_lock_file);
+
+   corosync_exit_error (AIS_DONE_EXIT);
+
return EXIT_SUCCESS;
 }
-
-- 
1.7.1

___
Openais mailing list
Openais@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/openais


Re: [Openais] [PATCH] main: let poll really stop before totempg_finalize

2011-07-25 Thread Steven Dake
Reviewed-by: Steven Dake 

On 07/25/2011 06:23 AM, Jan Friesse wrote:
> Signed-off-by: Jan Friesse 
> ---
>  exec/main.c |   24 +++-
>  1 files changed, 15 insertions(+), 9 deletions(-)
> 
> diff --git a/exec/main.c b/exec/main.c
> index be9e118..1c4fb37 100644
> --- a/exec/main.c
> +++ b/exec/main.c
> @@ -184,6 +184,8 @@ static int32_t corosync_not_enough_fds_left = 0;
>  
>  static void serialize_unlock (void);
>  
> +static void serialize_lock (void);
> +
>  hdb_handle_t corosync_poll_handle_get (void)
>  {
>   return (corosync_poll_handle);
> @@ -211,14 +213,7 @@ static void unlink_all_completed (void)
>   serialize_unlock ();
>   api->timer_delete (corosync_stats_timer_handle);
>   poll_stop (corosync_poll_handle);
> - totempg_finalize ();
> -
> - /*
> -  * Remove pid lock file
> -  */
> - unlink (corosync_lock_file);
> -
> - corosync_exit_error (AIS_DONE_EXIT);
> + serialize_lock ();
>  }
>  
>  void corosync_shutdown_request (void)
> @@ -1887,6 +1882,17 @@ int main (int argc, char **argv, char **envp)
>*/
>   poll_run (corosync_poll_handle);
>  
> + /*
> +  * Exit was requested
> +  */
> + totempg_finalize ();
> +
> + /*
> +  * Remove pid lock file
> +  */
> + unlink (corosync_lock_file);
> +
> + corosync_exit_error (AIS_DONE_EXIT);
> +
>   return EXIT_SUCCESS;
>  }
> -

___
Openais mailing list
Openais@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/openais


[Openais] Corosync quesion - ps auxf output

2011-07-25 Thread José Pablo Méndez Soto
Hello,

According to http://www.clusterlabs.org/wiki/Debian_Lenny_HowTo, if one
installs pacemaker package alone on a debian based distro, it will install
on top of Corosync, but if one installs as:

aptitude install pacemaker heartbeat

then Pacemaker would be installed on top of heartbeat. I didn´t install
heartbeat as it seems the community is moving away from it and toward
Corosync. Can someone please explain why then my ps auxf shows  heartbeat
all over the places?

root 17767  0.2  0.3 212236  5256 ?Ssl  00:35   0:00
/usr/sbin/corosync
root 17775  0.0  0.7  77684 12232 ?SLs  00:35   0:00\_
/usr/lib/heartbeat/stonithd
103  17776  0.1  0.3  80544  5008 ?S00:35   0:00  \_
/usr/lib/heartbeat/cib
root 1  0.0  0.1  92616  2776 ?S00:35   0:00
\_ /usr/lib/heartbeat/lrmd
103  17778  0.0  0.2  81568  3340 ?S00:35   0:00  \_
/usr/lib/heartbeat/attrd
103  17779  0.0  0.1  81916  2840 ?S00:35   0:00  \_
/usr/lib/heartbeat/pengine
103  17780  0.0  0.2  87796  3644 ?S00:35   0:00  \_
/usr/lib/heartbeat/crmd

root@shekel:~/corosync# apt-cache policy heartbeat
heartbeat:
  Installed: (none)
  Candidate: 1:3.0.3-2

Is this just the name of a folder where the "heartbeating" lives?

Thanks,


 *José
*
___
Openais mailing list
Openais@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/openais

Re: [Openais] Corosync quesion - ps auxf output

2011-07-25 Thread Andrew Beekhof
2011/7/26 José Pablo Méndez Soto :
> Hello,
>
> According to http://www.clusterlabs.org/wiki/Debian_Lenny_HowTo, if one
> installs pacemaker package alone on a debian based distro, it will install
> on top of Corosync, but if one installs as:
>
> aptitude install pacemaker heartbeat
>
> then Pacemaker would be installed on top of heartbeat. I didn´t install
> heartbeat as it seems the community is moving away from it and toward
> Corosync. Can someone please explain why then my ps auxf shows  heartbeat
> all over the places?

Those are pacemaker processes, not heartbeat ones.

>
> root 17767  0.2  0.3 212236  5256 ?    Ssl  00:35   0:00
> /usr/sbin/corosync
> root 17775  0.0  0.7  77684 12232 ?    SLs  00:35   0:00        \_
> /usr/lib/heartbeat/stonithd
> 103  17776  0.1  0.3  80544  5008 ?    S    00:35   0:00  \_
> /usr/lib/heartbeat/cib
> root 1  0.0  0.1  92616  2776 ?    S    00:35   0:00
> \_ /usr/lib/heartbeat/lrmd
> 103  17778  0.0  0.2  81568  3340 ?    S    00:35   0:00  \_
> /usr/lib/heartbeat/attrd
> 103  17779  0.0  0.1  81916  2840 ?    S    00:35   0:00  \_
> /usr/lib/heartbeat/pengine
> 103  17780  0.0  0.2  87796  3644 ?    S    00:35   0:00  \_
> /usr/lib/heartbeat/crmd
>
> root@shekel:~/corosync# apt-cache policy heartbeat
> heartbeat:
>   Installed: (none)
>   Candidate: 1:3.0.3-2
>
> Is this just the name of a folder where the "heartbeating" lives?
>
> Thanks,
>
>
>  José
>
>
> ___
> Openais mailing list
> Openais@lists.linux-foundation.org
> https://lists.linux-foundation.org/mailman/listinfo/openais
>
___
Openais mailing list
Openais@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/openais