[ovs-dev] [PATCH] ovn: fix OVNDB process is stopped when master node demote to the slave by pacemaker

Andy Zhou azhou at ovn.org
Wed Dec 7 21:36:00 UTC 2016


On Tue, Dec 6, 2016 at 9:41 PM, Guoshuai Li <ligs at dtdream.com> wrote:

> When the master node's OVNDB process fails, the local node demote to the
> slave.
> Failure cause is that the OVNDB process is stop, So the need to re-run the
> process up.
> if return $OCF_NOT_RUNNING will not demote the node to slave.
>
> Signed-off-by: Guoshuai Li <ligs at dtdream.com>
> ---
>  ovn/utilities/ovndb-servers.ocf | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/ovn/utilities/ovndb-servers.ocf
> b/ovn/utilities/ovndb-servers.ocf
> index 1cf6f20..8a64e88 100755
> --- a/ovn/utilities/ovndb-servers.ocf
> +++ b/ovn/utilities/ovndb-servers.ocf
> @@ -283,7 +283,7 @@ ovsdb_server_promote() {
>  ovsdb_server_demote() {
>      ovsdb_server_check_status
>      if [ $? = $OCF_NOT_RUNNING ]; then
> -        return $OCF_NOT_RUNNING
> +        ovsdb_server_start
>

The logic here looks odd to me. demote() operation should be done against
running OVNDBs.

Why is OVNDB stopped in the first place?  If they are stopped by admin, it
would be odd that ocf script
would restart them.


More information about the dev mailing list