Re: [devel] [PATCH 0/4] Review Request for osaf: allow split brain prevention parameter changes at runtime [#3006]

2019-02-06 Thread Gary Lee

Hi Minh

Good idea. Will add daemon_sighup_install().

Thanks

Gary

On 7/2/19 3:20 pm, Minh Hon Chau wrote:

Hi Gary,

ack with comment

- There's a  daemon_sigterm_install(), I think we could make a 
daemon_sighup_install() in the /base/daemon.c


- I see there's a @todo that stop the split brain prevention when it's 
running, when it's done we might have to document this runtime change.


Thanks

Minh

On 4/2/19 9:41 pm, Gary Lee wrote:

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 
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 
Date:    Mon, 4 Feb 2019 20:57:32 +1100

amfd: reload split brain prevention parameters on SIGHUP [#3006]



revision fd617aeb6c8f23d8b404a85f6aaa8c6b28ae26a1
Author:    Gary Lee 
Date:    Mon, 4 Feb 2019 20:56:10 +1100

fmd: reload split brain prevention parameters on SIGHUP [#3006]



revision a3c6f632f2377afc47c0ae04861f9a4a0e06f498
Author:    Gary Lee 
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_X=', 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

Re: [devel] [PATCH 0/4] Review Request for osaf: allow split brain prevention parameter changes at runtime [#3006]

2019-02-06 Thread Minh Hon Chau

Hi Gary,

ack with comment

- There's a  daemon_sigterm_install(), I think we could make a 
daemon_sighup_install() in the /base/daemon.c


- I see there's a @todo that stop the split brain prevention when it's 
running, when it's done we might have to document this runtime change.


Thanks

Minh

On 4/2/19 9:41 pm, Gary Lee wrote:

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

  Docsn
  Build systemn
  RPM/packaging   n
  Configuration files n
  Startup scripts n
  SAF servicesy
  OpenSAF servicesy
  Core libraries  y
  Samples n
  Tests   n
  Other   n


Comments (indicate scope for each "y" above):
-

revision b5206b54fbc5462eaf6f0599d2c449f22087635d
Author: Gary Lee 
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 
Date:   Mon, 4 Feb 2019 20:57:32 +1100

amfd: reload split brain prevention parameters on SIGHUP [#3006]



revision fd617aeb6c8f23d8b404a85f6aaa8c6b28ae26a1
Author: Gary Lee 
Date:   Mon, 4 Feb 2019 20:56:10 +1100

fmd: reload split brain prevention parameters on SIGHUP [#3006]



revision a3c6f632f2377afc47c0ae04861f9a4a0e06f498
Author: Gary Lee 
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_X=', 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 StartedLinux distro
---
mipsn  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

[devel] [PATCH 0/4] Review Request for osaf: allow split brain prevention parameter changes at runtime [#3006]

2019-02-04 Thread Gary Lee
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

 Docsn
 Build systemn
 RPM/packaging   n
 Configuration files n
 Startup scripts n
 SAF servicesy 
 OpenSAF servicesy 
 Core libraries  y 
 Samples n
 Tests   n
 Other   n


Comments (indicate scope for each "y" above):
-

revision b5206b54fbc5462eaf6f0599d2c449f22087635d
Author: Gary Lee 
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 
Date:   Mon, 4 Feb 2019 20:57:32 +1100

amfd: reload split brain prevention parameters on SIGHUP [#3006]



revision fd617aeb6c8f23d8b404a85f6aaa8c6b28ae26a1
Author: Gary Lee 
Date:   Mon, 4 Feb 2019 20:56:10 +1100

fmd: reload split brain prevention parameters on SIGHUP [#3006]



revision a3c6f632f2377afc47c0ae04861f9a4a0e06f498
Author: Gary Lee 
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_X=', 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 StartedLinux distro
---
mipsn  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 ch