StarlingX Upstream packaging
Go to file
Chris Friesen 42e57118c3 Add dbmon ocf script for containerized mariadb on AIO-DX
On a two-node system the openstack-helm chart for mariadb has issues.

If you run with a single replica then your failover times are very
long due to internal timeouts in kubernetes which prevent accessing
the backing volume on the newly-active node.

At the same time, you can't run a "garbd" pod the way we do on a full
lab configuration because there is no third node to run it on.

The only viable option we've found is to trigger something to
explicitly tell the mariadb pod on the active node to bootstrap a new
primary cluster if it loses quorum due to the other mariadb pod going
away unexpectedly.

Accordingly, this commit creates a new "dbmon" OCF script which
behaves basically as follows:

start -- return $OCF_SUCCESS
stop -- return $OCF_NOT_RUNNING
standby -- return $OCF_SUCCESS or $OCF_NOT_RUNNING depending on whether
           mariadb on this node is a member of the primary cluster
active -- if mariadb on this node is not a member of the primary cluster
          then tell it to bootstrap a new primary cluster.  Then check
          again and return $OCF_SUCCESS or $OCF_NOT_RUNNING depending on
          whether mariadb on this node is a member of the primary cluster
monitor -- If mariadb on this node is a member of the primary cluster
           then return $OCF_RUNNING_MASTER on the active controller and
           $OCF_SUCCESS on the standby controller.  If mariadb is not a
           member of the primary cluster return $OCF_NOT_RUNNING.

There are a few complicating factors.
If openstack application or mariadb chart not installed then treat it
like being a member of the primary cluster.
If the mariadb pod is still initializing treat it like not being a member
of the primary cluster.
If we're in a standard lab (with garbd running on a compute node) then
don't actually tell mariadb to bootstrap a new primary cluster but just
report whether it's a member of the primary cluster or not.

Story: 2004712
Task: 30410
Change-Id: I8d91dc13cb9a9adb7f7a7a95faadad4339ddb466
Signed-off-by: Chris Friesen <chris.friesen@windriver.com>
2019-04-10 12:06:24 -04:00
doc Clean up and standardize landing pages 2018-12-27 17:11:33 -08:00
openstack Add dbmon ocf script for containerized mariadb on AIO-DX 2019-04-10 12:06:24 -04:00
releasenotes Update config for release notes to include project name 2019-02-05 14:27:48 -08:00
.gitignore [Doc] Release Notes Management 2018-09-25 14:43:18 -05:00
.gitreview correct gitreview setting for master 2018-09-20 23:24:29 +08:00
.zuul.yaml Add relnotes publish job 2018-10-12 15:21:30 -05:00
CONTRIBUTORS.wrs StarlingX open source release updates 2018-05-31 07:37:19 -07:00
LICENSE StarlingX open source release updates 2018-05-31 07:37:19 -07:00
README.rst StarlingX open source release updates 2018-05-31 07:37:19 -07:00
centos_dev_docker_images.inc Create the stable/dev wheel and image build files 2019-03-20 14:09:35 -04:00
centos_helm.inc Adding a centos_helm.inc file for use by build-helm-charts 2018-11-14 10:49:11 -06:00
centos_iso_image.inc Explicitly include heatclient in the ISO 2019-03-29 15:07:15 -05:00
centos_pkg_dirs Remove unused openstack files that are no longer in use 2019-03-28 08:54:38 -05:00
centos_pkg_dirs_containers Add openstack-helm and openstack-helm-infra to containers build 2018-11-13 13:25:03 -06:00
centos_stable_wheels.inc Remove unused openstack files that are no longer in use 2019-03-28 08:54:38 -05:00
test-requirements.txt flake8 codestyle fixes and tox flake8 setting enable 2018-08-24 23:19:50 +08:00
tox.ini Remove unused openstack files that are no longer in use 2019-03-28 08:54:38 -05:00

README.rst

stx-upstream

StarlingX Upstream Packages