[ovs-git] [openvswitch/ovs] be87f2: ovn pacemaker: Fix return code errors in start/sto...

GitHub noreply at github.com
Tue May 23 18:36:19 UTC 2017


  Branch: refs/heads/branch-2.7
  Home:   https://github.com/openvswitch/ovs
  Commit: be87f2d49d14a92ec7850a8d0f2f1fd08ab43486
      https://github.com/openvswitch/ovs/commit/be87f2d49d14a92ec7850a8d0f2f1fd08ab43486
  Author: Numan Siddique <nusiddiq at redhat.com>
  Date:   2017-05-23 (Tue, 23 May 2017)

  Changed paths:
    M ovn/utilities/ovndb-servers.ocf

  Log Message:
  -----------
  ovn pacemaker: Fix return code errors in start/stop action

start action returns OCF_RUNNING_MASTER in certain scenarios.
But as per the OCF guidelines, status code OCF_RUNNING_MASTER shoud
be returned only in monitor action [1].

Whenever the start action returns OCF_RUNNING_MASTER, it is observed
in the testing that, pacemaker stops the ovsdb-server ocf resource
in that node. This patch fixes this issue by returning OCF_SUCESS in
such cases.

stop action returns OCF_RUNNING_MASTER if the ovsdb-servers are
running as master. But as per the OCF guidelines [2], stop action
should only return OCF_SUCCESS. If any other code is returned,
pacemaker cluster would block that resource in that node.

This patch fixes this issue by stopping the ovsdb-servers when they
are running as masters (which is the expected case) and returns
OCF_SUCCESS.

[1] - http://www.linux-ha.org/doc/dev-guides/_literal_ocf_running_master_literal_8.html
[2] - http://www.linux-ha.org/doc/dev-guides/_literal_stop_literal_action.html

CC: Andy Zhou <azhou at ovn.org>
Signed-off-by: Numan Siddique <nusiddiq at redhat.com>
Signed-off-by: Andy Zhou <azhou at ovn.org>


  Commit: 08a83956e83db502960b71ceabdfa9c1db482931
      https://github.com/openvswitch/ovs/commit/08a83956e83db502960b71ceabdfa9c1db482931
  Author: Numan Siddique <nusiddiq at redhat.com>
  Date:   2017-05-23 (Tue, 23 May 2017)

  Changed paths:
    M ovn/utilities/ovn-ctl

  Log Message:
  -----------
  ovn-ctl: Start ovn-northd even if ovsdb-servers are not running

When '--ovn-manage-ovsdb=no' is passed to "ovn-ctl start_northd", it
doesn't start ovsdb-servers, but it expects the ovsdb-servers to be
running. If the ovsdb-servers are not running, ovn-ctl exits without
starting ovn-northd. This could create problems when ovn-northd and
ovsdb-servers are managed separately, for example when pacemaker is
used to manage ocf:ovndb-servers and ovn-northd as separate resources.
In the cases where a slave is promoted as master, it is possible that
pacemaker might start ovn-northd service before starting
ovsdb-servers.

This patch addresses this issue by not checking the status of
ovsdb-server pids when ovn-manage-ovsdb is set to true when
'start_northd' is called. ovn-northd will eventually connect to the
ovsdb-servers when they are started. So there is no harm in removing
this check.

Signed-off-by: Numan Siddique <nusiddiq at redhat.com>
Signed-off-by: Andy Zhou <azhou at ovn.org>


Compare: https://github.com/openvswitch/ovs/compare/36056d89cc07...08a83956e83d


More information about the git mailing list