Summary: osaf: add ability to reload config from fmd.conf [#3006]
Review request for Ticket(s): 3006
Peer Reviewer(s): Hans, Minh
Pull request to: *** LIST THE PERSON WITH PUSH ACCESS HERE ***
Affected branch(es): develop
Development branch: ticket-3006
Base revision: e13f0ee64a0255dd54bc70b1f8d601fbb6162428
Personal repository: git://git.code.sf.net/u/userid-2226215/review
--------------------------------
Impacted area Impact y/n
--------------------------------
Docs n
Build system n
RPM/packaging n
Configuration files n
Startup scripts n
SAF services y
OpenSAF services y
Core libraries y
Samples n
Tests n
Other n
Comments (indicate scope for each "y" above):
---------------------------------------------
revision b5206b54fbc5462eaf6f0599d2c449f22087635d
Author: Gary Lee <gary....@dektech.com.au>
Date: Mon, 4 Feb 2019 21:33:11 +1100
rded: reload split brain prevention parameters on SIGHUP [#3006]
If enabled at runtime and this node is active, promote this node
in consensus service.
If disabled at runtime, watch threads will terminate gracefully when
the plugin exits after losing connectivty to the consensus service.
revision 0a043e5b320e8c05beccf7b7ac3c9150abdf6cc5
Author: Gary Lee <gary....@dektech.com.au>
Date: Mon, 4 Feb 2019 20:57:32 +1100
amfd: reload split brain prevention parameters on SIGHUP [#3006]
revision fd617aeb6c8f23d8b404a85f6aaa8c6b28ae26a1
Author: Gary Lee <gary....@dektech.com.au>
Date: Mon, 4 Feb 2019 20:56:10 +1100
fmd: reload split brain prevention parameters on SIGHUP [#3006]
revision a3c6f632f2377afc47c0ae04861f9a4a0e06f498
Author: Gary Lee <gary....@dektech.com.au>
Date: Mon, 4 Feb 2019 20:52:42 +1100
osaf: add ability to reload config from fmd.conf [#3006]
Add ReloadConfiguration() function - when called it will
read fmd.conf and look for 'export FMS_XXXXX=', and overwrite
current environment variable settings in the caller.
This allows split brain prevention parameters to be changed at
runtime without a node restart.
Complete diffstat:
------------------
src/amf/amfd/cb.h | 1 +
src/amf/amfd/main.cc | 32 ++++++++++++++++++++
src/amf/amfd/osaf-amfd.in | 1 +
src/fm/fmd/fm_main.cc | 2 ++
src/osaf/consensus/consensus.cc | 67
+++++++++++++++++++++++++++++++----------
src/osaf/consensus/consensus.h | 20 ++++++++----
src/osaf/consensus/key_value.cc | 41 +++++++++++++------------
src/rde/rded/osaf-rded.in | 1 +
src/rde/rded/rde_main.cc | 59
+++++++++++++++++++++++++++++++++---
src/rde/rded/rde_rda.h | 3 ++
src/rde/rded/role.cc | 27 +++++++++++++----
src/rde/rded/role.h | 1 +
12 files changed, 203 insertions(+), 52 deletions(-)
Testing Commands:
-----------------
1)
Start cluster with FMS_SPLIT_BRAIN_PREVENTION=0
On both active / standby SCs:
modify fmd.conf and set FMS_SPLIT_BRAIN_PREVENTION=1
pkill -SIGHUP osafamfd
pkill -SIGHUP osaffmd
pkill -SIGHUP osafrded
Ensure split brain prevention works as expected
2)
Leave cluster from Step 1 running
On both active / standby SCs:
modify fmd.conf and set FMS_SPLIT_BRAIN_PREVENTION=0
pkill -SIGHUP osafamfd
pkill -SIGHUP osaffmd
pkill -SIGHUP osafrded
Ensure split brain prevention is no longer in effect
Testing, Expected Results:
--------------------------
As above
Conditions of Submission:
-------------------------
Ack from any reviewer
Arch Built Started Linux distro
-------------------------------------------
mips n n
mips64 n n
x86 n n
x86_64 y y
powerpc n n
powerpc64 n n
Reviewer Checklist:
-------------------
[Submitters: make sure that your review doesn't trigger any checkmarks!]
Your checkin has not passed review because (see checked entries):
___ Your RR template is generally incomplete; it has too many blank
entries
that need proper data filled in.
___ You have failed to nominate the proper persons for review and push.
___ Your patches do not have proper short+long header
___ You have grammar/spelling in your header that is unacceptable.
___ You have exceeded a sensible line length in your
headers/comments/text.
___ You have failed to put in a proper Trac Ticket # into your commits.
___ You have incorrectly put/left internal data in your comments/files
(i.e. internal bug tracking tool IDs, product names etc)
___ You have not given any evidence of testing beyond basic build tests.
Demonstrate some level of runtime or other sanity testing.
___ You have ^M present in some of your files. These have to be removed.
___ You have needlessly changed whitespace or added whitespace crimes
like trailing spaces, or spaces before tabs.
___ You have mixed real technical changes with whitespace and other
cosmetic code cleanup changes. These have to be separate commits.
___ You need to refactor your submission into logical chunks; there is
too much content into a single commit.
___ You have extraneous garbage in your review (merge commits etc)
___ You have giant attachments which should never have been sent;
Instead you should place your content in a public tree to be
pulled.
___ You have too many commits attached to an e-mail; resend as threaded
commits, or place in a public tree for a pull.
___ You have resent this content multiple times without a clear
indication
of what has changed between each re-send.
___ You have failed to adequately and individually address all of the
comments and change requests that were proposed in the initial
review.
___ You have a misconfigured ~/.gitconfig file (i.e. user.name,
user.email etc)
___ Your computer have a badly configured date and time; confusing the
the threaded patch review.
___ Your changes affect IPC mechanism, and you don't present any results
for in-service upgradability test.
___ Your changes affect user manual and documentation, your patch series
do not contain the patch that updates the Doxygen manual.