Re: [devel] [PATCH 0/1] Review Request for amf: add support for container/contained [#70]

2018-08-05 Thread Gary Lee
Hi Alex I can reproduce the coredump by doing “immcfg -f AppConfig-2N.xml” (the amf_demo sample). It looks better with the patch. Thanks Gary From: Alex Jones Organization: Ribbon Date: Saturday, 4 August 2018 at 12:59 am To: Gary Lee , , , Cc: Subject: Re: [devel] [PATCH 0/1

Re: [devel] [PATCH 0/1] Review Request for amf: add support for container/contained [#70]

2018-08-02 Thread Gary Lee
free'd On 3/8/18, 11:25 am, "Gary Lee" wrote: Hi Alex I haven’t had a chance to look at it, but I did run our regression tests with the patch. amfd is segfaulting regularly, with backtraces like the attachment. Tha

Re: [devel] [PATCH 0/1] Review Request for amf: add support for container/contained [#70]

2018-08-02 Thread Gary Lee
Hi Alex I haven’t had a chance to look at it, but I did run our regression tests with the patch. amfd is segfaulting regularly, with backtraces like the attachment. Thanks Gary From: Alex Jones Organization: Ribbon Date: Thursday, 2 August 2018 at 3:52 am To: , , , Cc:

[devel] [PATCH 1/2] osaf: add function to read takeover requests [#2905]

2018-07-31 Thread Gary Lee
--- src/osaf/consensus/consensus.cc | 17 + src/osaf/consensus/consensus.h | 3 +++ 2 files changed, 20 insertions(+) diff --git a/src/osaf/consensus/consensus.cc b/src/osaf/consensus/consensus.cc index 800b776e6..2a8e9bb1c 100644 --- a/src/osaf/consensus/consensus.cc +++

[devel] [PATCH 2/2] rded: perform KV store operations outside main thread [#2905]

2018-07-31 Thread Gary Lee
Sometimes the 'watch' command in the KV plugin will not return a takeover request, if the KV store does not respond in time. Then rded would try to read the takeover request in the main thread after receiving a takeover request notification. This can cause rded to not respond to AMF callbacks in

[devel] [PATCH 0/2] Review Request for rded: perform KV store operations outside main thread [#2905]

2018-07-31 Thread Gary Lee
revision 5c9104ebf210c390b6157341f802720086a8 Author: Gary Lee Date: Wed, 1 Aug 2018 04:43:58 + rded: perform KV store operations outside main thread [#2905] Sometimes the 'watch' command in the KV plugin will not return a takeover request, if the KV store does not respond in time. Then rded would t

[devel] [PATCH 1/1] amfd: remove redundant const_cast [#2907]

2018-07-31 Thread Gary Lee
--- src/amf/amfd/clm.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/amf/amfd/clm.cc b/src/amf/amfd/clm.cc index e113a65f9..1e67ff389 100644 --- a/src/amf/amfd/clm.cc +++ b/src/amf/amfd/clm.cc @@ -631,7 +631,7 @@ AvdJobDequeueResultT ClmTrackStart::exec(AVD_CL_CB*

[devel] [PATCH 0/1] Review Request for amfd: remove redundant const_cast [#2907]

2018-07-31 Thread Gary Lee
revision e463518e3d09eb6936c074a269cee24e7a1672e7 Author: Gary Lee Date: Wed, 1 Aug 2018 03:42:14 + amfd: remove redundant const_cast [#2907] Complete diffstat: -- src/amf/amfd/clm.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Testing Commands: - *** LIST THE COMMAND

Re: [devel] [PATCH 1/1] amfd: check for queued updates on attribute [#2884]

2018-07-31 Thread Gary Lee
2018 04:07 AM, Gary Lee wrote: > If there is a queued update on a particular object's attribute, > also queue further 'sync' updates so we don't end up with an > inconsistent value. > --- > src/amf/amfd/imm.cc | 35 +-- >

Re: [devel] [PATCH 1/1] amf: Recover node that disconnnect from active AMFD [#2880]

2018-07-23 Thread Gary Lee
Hi Nagu Do you have any comments on this? It seems OK to me, but I know you've worked on similar scenarios with TIPC flickering before, where reboot is issued from the PL side. Thanks Gary On 09/07/18 16:37, thuan.tran wrote: There is a abnormal state that AMFND on remote node keep sending

Re: [devel] [PATCH 1/1] dtm: Add --extract-trace option to osaflog command V2 [#2894]

2018-07-23 Thread Gary Lee
Hi Minh ack (review only). Perhaps std::getline() could have been used, but it doesn't really matter. Thanks Gary On 24/07/18 08:59, Minh Hon Chau wrote: Hi, I would like to push the patch by tomorrow if there's no comment on it. Thanks Minh On 20/07/18 13:33, Minh Chau wrote: If a

Re: [devel] [PATCH 1/1] amfnd: Unset OSAF_LOCAL_NODE_LOG and THREAD_TRACE_BUFFER [#2893]

2018-07-17 Thread Gary Lee
Hi Minh Ack (review only). It should be OK to call unsetenv all the time though? man page:    The unsetenv() function deletes the variable name from the environment.  If name does not exist in the  environment,    then the function succeeds, and the environment is unchanged. On

Re: [devel] [PATCH 1/1] amfnd: Store next pointer AVND_SU_SI_REC before avnd_su_si_remove [#2896]

2018-07-15 Thread Gary Lee
Hi Minh Ack (review) Thanks Gary On 13/7/18, 9:27 pm, "Minh Chau" wrote: In scenario of removing assignment, amfnd calls avnd_su_si_remove(cb, tmp->su, tmp); Inside avnd_su_si_remove(), the @tmp points to an object AVND_SU_SI_REC which could be deleted. amfnd continues use

Re: [devel] [PATCH 1/1] smf: use cb_lock to sync cbk count access between threads [#2882]

2018-07-12 Thread Gary Lee
Hi Nagu The AMF agent library appears to do that. I guess extra care needs to be taken to remove such "cb locks" before MDS API calls are made. Gary On 12/07/18 14:08, nagen...@hasolutions.in wrote: Hi Thuan, Since MDS thread is RT and application thread can be non-RT, so I think there

Re: [devel] [PATCH 1/1] base: Limit buffer size by making size of THREAD_TRACE_BUFFER configurable [#2888]

2018-07-11 Thread Gary Lee
Hi Minh ack with 2 minor comments (see below) Thanks Gary On 03/07/18 17:49, Minh Chau wrote: When THREAD_TRACE_BUFFER enables, it uses by default a list 10240 trace string as a circular buffer. There is a concern that how much extra memory of all threads may use. This patch makes

Re: [devel] [PATCH 1/1] smf: use cb_lock to sync cbk count access between threads [#2882]

2018-07-10 Thread Gary Lee
Hi Thuan Looks OK to me, but I would remove the assert. We shouldn't do that in library code. Thanks Gary On 10/7/18, 6:52 pm, "thuan.tran" wrote: Sometimes, callback agent dispatch and fail at saSmfReponse() because cbk list is empty, agent by somehow handle evt before increase

Re: [devel] [PATCH 1/1] imm: fix mismatched free() / delete / delete [] [#2769]

2018-07-10 Thread Gary Lee
Hi Vu Ack (review only) On 2/7/18, 4:23 pm, "Vu Minh Nguyen" wrote: Valgrind reports mismatched free() / delete / delete []. --- src/imm/immnd/ImmModel.cc | 32 ++-- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git

[devel] [PATCH 0/1] Review Request for amfd: check for queued updates on attribute [#2884]

2018-07-05 Thread Gary Lee
revision 0b6fd070e19d15b85dde045e29d9aba1d0862af7 Author: Gary Lee Date: Fri, 6 Jul 2018 02:02:46 + amfd: check for queued updates on attribute [#2884] If there is a queued update on a particular object's attribute, also queue further 'sync' updates so we don't end up with an inconsistent value. Complet

[devel] [PATCH 1/1] amfd: check for queued updates on attribute [#2884]

2018-07-05 Thread Gary Lee
If there is a queued update on a particular object's attribute, also queue further 'sync' updates so we don't end up with an inconsistent value. --- src/amf/amfd/imm.cc | 35 +-- src/amf/amfd/imm.h | 9 ++--- 2 files changed, 35 insertions(+), 9 deletions(-)

Re: [devel] [PATCH 1/1] amfd: put sync jobs into queue if IMM is busy [#2863]

2018-07-04 Thread Gary Lee
Hi Minh You are the right. That line is redundant. I will remove it. Thanks Gary On 05/07/18 09:45, Minh Hon Chau wrote: Hi Gary, ack with a minor comment with [M] Thanks, Minh On 04/07/18 11:15, Gary Lee wrote: ---   src/amf/amfd/cb.h   |  3 ++-   src/amf/amfd/clm.cc |  4 ++--   src

Re: [devel] [PATCH 1/1] osaf: reduce load on keyvalue store [#2883]

2018-07-03 Thread Gary Lee
Hi I will push this next Monday if no one has comments. Thanks Gary On 25/6/18, 1:10 pm, "Gary Lee" wrote: * increase timeout in etcd3 plugin * reduce retry frequency on KV store. This can overload the KV store even more when the KV store is already timing out * w

Re: [devel] [PATCH 1/1] amfd: Check IMM status before calling saImmOiDispatch [#2885]

2018-07-03 Thread Gary Lee
Hi Minh Ack (review only) Gary On 3/7/18, 9:26 pm, "Minh Chau" wrote: Currently amfd already check @avd_imm_status before setting fd, amfd should also check @avd_imm_status before calling saImmOiDispatch --- src/amf/amfd/main.cc | 3 ++- 1 file changed, 2 insertions(+),

[devel] [PATCH 1/1] amfd: put sync jobs into queue if IMM is busy [#2863]

2018-07-03 Thread Gary Lee
--- src/amf/amfd/cb.h | 3 ++- src/amf/amfd/clm.cc | 4 ++-- src/amf/amfd/clm.h | 4 ++-- src/amf/amfd/imm.cc | 33 - src/amf/amfd/imm.h | 18 +- src/amf/amfd/ntf.cc | 2 +- 6 files changed, 40 insertions(+), 24 deletions(-) diff --git

[devel] [PATCH 0/1] Review Request for amfd: put sync jobs into queue if IMM is busy [#2863]

2018-07-03 Thread Gary Lee
revision 47decce67b854afa8404202704ade356ceb2a8b2 Author: Gary Lee Date: Wed, 4 Jul 2018 01:08:34 + amfd: put sync jobs into queue if IMM is busy [#2863] Complete diffstat: -- src/amf/amfd/cb.h | 3 ++- src/amf/amfd/clm.cc | 4 ++-- src/amf/amfd/clm.h | 4 ++-- src/amf/amfd/i

Re: [devel] doc: Review update for #2306, #456

2018-06-28 Thread Gary Lee
Hi Minh Ack with minor comments. "This option enables the tracing buffered in every threads of OpenSAF services" - perhaps replace with "This option enables per-thread (a circular buffer per-thread) tracing of an OpenSAF service". Maybe you can explicitly state: add 'export

Re: [devel] [PATCH 1/1] amf: correct changing attribute saAmfCtDefDisableRestart [#2876]

2018-06-26 Thread Gary Lee
Ack with minor comments (review only) Use bool instead of SaBoolT. Variables names should follow the Google Style Guide https://google.github.io/styleguide/cppguide.html#Variable_Names So is_changed is probably better. On 22/6/18, 11:43 am, "thang.nguyen" wrote: Currently changing

[devel] [PATCH 0/1] Review Request for osaf: reduce load on keyvalue store [#2883]

2018-06-24 Thread Gary Lee
revision a7b0102bdf586c82bccaf42727f5cfc5864c05f0 Author: Gary Lee Date: Mon, 25 Jun 2018 02:59:54 + osaf: reduce load on keyvalue store [#2883] * increase timeout in etcd3 plugin * reduce retry frequency on KV store. This can overload the KV store even more when the KV store is already timing out * when 'watch ke

[devel] [PATCH 1/1] osaf: reduce load on keyvalue store [#2883]

2018-06-24 Thread Gary Lee
* increase timeout in etcd3 plugin * reduce retry frequency on KV store. This can overload the KV store even more when the KV store is already timing out * when 'watch key' returns, try to use the value returned instead of unnecessarily reading it again --- src/osaf/consensus/consensus.cc

Re: [devel] [PATCH 1/1] amf: correct changing attribute saAmfCtDefDisableRestart [#2876]

2018-06-20 Thread Gary Lee
Hi Thang Is it possible to update the value, eg. comp_type->saAmfCtDefDisableRestart, outside the loop going through the nodes? I think with the change, it will send unnecessary updates if you set it to the same value? /Gary -Original Message- From: "thang.nguyen" Date: Tuesday, 19

Re: [devel] [PATCH 1/1] amfd: put sync jobs into queue if IMM is busy [#2863]

2018-06-12 Thread Gary Lee
Hi Minh OK, I'll try to rewrite the patch. /Gary On 13/06/18 14:35, Minh Hon Chau wrote: Hi Gary Can we reuse @avd_imm_status instead? Thanks Minh On 05/06/18 13:39, Gary Lee wrote: ---   src/amf/amfd/cb.h   |  7 +++   src/amf/amfd/clm.cc |  4 ++--   src/amf/amfd/clm.h  |  4

Re: [devel] [PATCH 1/1] base: ensure _file is always initialised [#2872]

2018-06-08 Thread Gary Lee
Hi The commit msg should read: If trace is enabled (via sigusr2) after the last TRACE_ENTER() statement is run, but *before* ~Trace() is called, then _file is left as nullptr when logtrace_output() is called in ~Trace(). This will segfault. On 08/06/18 13:12, Gary Lee wrote: If trace

[devel] [PATCH 1/1] base: ensure _file is always initialised [#2872]

2018-06-07 Thread Gary Lee
If trace is enabled after the last TRACE() statement is run, but *before* ~Trace() is called, then _file is left as nullptr when logtrace_output() is called in ~Trace(). This will segfault. --- src/base/logtrace.h | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git

[devel] [PATCH 0/1] Review Request for base: ensure _file is always initialised [#2872]

2018-06-07 Thread Gary Lee
revision 9ac0ec916e55c52ec2484f69ff6a23c725842eb7 Author: Gary Lee Date: Fri, 8 Jun 2018 12:52:51 +1000 base: ensure _file is always initialised [#2872] If trace is enabled after the last TRACE() statement is run, but *before* ~Trace() is called, then _file is left as nullptr when logtrace_output() is called

[devel] [PATCH 1/1] amfd: put sync jobs into queue if IMM is busy [#2863]

2018-06-04 Thread Gary Lee
--- src/amf/amfd/cb.h | 7 +++ src/amf/amfd/clm.cc | 4 ++-- src/amf/amfd/clm.h | 4 ++-- src/amf/amfd/imm.cc | 36 +++- src/amf/amfd/imm.h | 18 +- src/amf/amfd/ntf.cc | 2 +- 6 files changed, 44 insertions(+), 27 deletions(-) diff

[devel] [PATCH 0/1] Review Request for amfd: put sync jobs into queue if IMM is busy [#2863]

2018-06-04 Thread Gary Lee
revision 93f9129e651418ecf6e7ddf7c12d2a0b6bad0dab Author: Gary Lee Date: Tue, 5 Jun 2018 13:30:18 +1000 amfd: put sync jobs into queue if IMM is busy [#2863] Complete diffstat: -- src/amf/amfd/cb.h | 7 +++ src/amf/amfd/clm.cc | 4 ++-- src/amf/amfd/clm.h | 4 ++-- src/amf/amfd/i

Re: [devel] [PATCH 1/1] base: Improve backtrace print in daemon.c [#2853]

2018-05-24 Thread Gary Lee
Hi Hans Ack Thanks Gary On 16/5/18, 5:27 pm, "Hans Nordeback" wrote: --- src/base/daemon.c | 52 ++--- tools/cluster_sim_uml/build_uml | 1 + 2 files changed, 49 insertions(+), 4 deletions(-)

[devel] [PATCH 0/1] Review Request for rded: run controller promotion code in new thread V2 [#2857]

2018-05-23 Thread Gary Lee
nly change is addition of a single line: + election_end_time_ = base::kTimespecMax; This is to ensure we don't launch another thread, before SetRole. revision 047b0545824d8a6118a98b933ea8ed89ebab4a3a Author: Gary Lee <gary@dektech.com.au> Date: Thu, 24 May 2018 14:12:46 +1000 rded

[devel] [PATCH 1/1] rded: run controller promotion code in new thread [#2857]

2018-05-23 Thread Gary Lee
Currently, the consensus code relating to node promotion is run from the main thread. We can improve rded's responsiveness by moving this code into another thread. --- src/rde/rded/rde_cb.h| 3 +- src/rde/rded/rde_main.cc | 6 +++- src/rde/rded/role.cc | 83

[devel] [PATCH 1/1] rded: run controller promotion code in new thread [#2857]

2018-05-18 Thread Gary Lee
Currently, the consensus code relating to node promotion is run from the main thread. We can improve rded's responsiveness by moving this code into another thread. --- src/rde/rded/rde_cb.h| 3 +- src/rde/rded/rde_main.cc | 6 +++- src/rde/rded/role.cc | 82

[devel] [PATCH 0/1] Review Request for rded: run controller promotion code in new thread [#2857]

2018-05-18 Thread Gary Lee
n OpenSAF servicesy Core libraries n Samples n Tests n Other n Comments (indicate scope for each "y" above): - revision a12571713545342e03bafce4cfd6c0b4ab28094b Author

[devel] [PATCH 1/1] osaf: fix issue with unlock if etcdctl times out [#2848]

2018-05-10 Thread Gary Lee
In etcd3.plugin, if the unlock transaction times out for some reason, unlock() would return 1, indicating it is owned by someone else when it isn't because lock_owner was not being called correctly. Also PromoteThisNode() would indicate a successful lock attempt when it failed, because rc was

[devel] [PATCH 0/1] Review Request for osaf: fix issue with unlock if etcdctl times out [#2848]

2018-05-10 Thread Gary Lee
n OpenSAF servicesy Core libraries y Samples n Tests n Other n Comments (indicate scope for each "y" above): - revision 0855c361a9c736bfdac4dfd7f5c834a338963a3b Au

[devel] [PATCH 1/1] rded: prevent unnecessary takeover [#2843]

2018-04-25 Thread Gary Lee
rded should not automatically include itself in the cluster member list. Instead it should rely solely on AMFND service up, so that the count is consistent across nodes. Also adjust some split-brain prevention related values. More time is required to ensure we should have an accurate view of

[devel] [PATCH 0/1] Review Request for rded: prevent unnecessary takeover [#2843]

2018-04-25 Thread Gary Lee
revision 0018bdeb4df610289560be30c57d505b77af7705 Author: Gary Lee <gary@dektech.com.au> Date: Wed, 25 Apr 2018 18:18:25 +1000 rded: prevent unnecessary takeover [#2843] rded should not automatically include itself in the cluster member list. Instead it should rely solely on AMFND service up, so that the cou

Re: [devel] [PATCH 0/6] Review Request for split-brain: select active SC from largest network partition V4 [#2795]

2018-04-13 Thread Gary Lee
Sorry, it should read: Note: Patches 1 to 5 are identical to V3. Patch 6 (osaf: remove timestamp from takeover request) is the diff between V3 and V4. On 13/04/18 21:50, Gary Lee wrote: Summary: split-brain: select active SC from largest network partition V4 [#2795] Review request for Ticket

[devel] [PATCH 6/6] osaf: remove timestamp from takeover request [#2795]

2018-04-13 Thread Gary Lee
* update create() in the plugins to include a timeout parameter * remove timestamp from the takeover request and utilise the built-in timeout functionality in the KV store --- src/osaf/consensus/consensus.cc | 165 --- src/osaf/consensus/consensus.h

[devel] [PATCH 1/6] osaf: extend API to include a create key and an enhanced set key function [#2795]

2018-04-13 Thread Gary Lee
- add create_key function (fails if key already exists) - add setkey_match_prev function (set value if previous value matches) - add missing quotes - add etcd3.plugin --- src/osaf/consensus/plugins/etcd.plugin | 86 +++- src/osaf/consensus/plugins/etcd3.plugin | 366

[devel] [PATCH 3/6] amfd: adapt to new Consensus API [#2795]

2018-04-13 Thread Gary Lee
--- src/amf/amfd/role.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amf/amfd/role.cc b/src/amf/amfd/role.cc index c8aa9cf1f..790983ee7 100644 --- a/src/amf/amfd/role.cc +++ b/src/amf/amfd/role.cc @@ -1217,7 +1217,7 @@ uint32_t amfd_switch_stdby_actv(AVD_CL_CB *cb) {

[devel] [PATCH 4/6] fmd: adapt to new Consensus API [#2795]

2018-04-13 Thread Gary Lee
--- src/fm/fmd/fm_cb.h| 2 +- src/fm/fmd/fm_main.cc | 26 +- src/fm/fmd/fm_mds.cc | 2 ++ src/fm/fmd/fm_rda.cc | 27 ++- 4 files changed, 30 insertions(+), 27 deletions(-) diff --git a/src/fm/fmd/fm_cb.h b/src/fm/fmd/fm_cb.h index

[devel] [PATCH 5/6] rded: adapt to new Consensus API [#2795]

2018-04-13 Thread Gary Lee
- add 3 new internal message: RDE_MSG_NODE_UP RDE_MSG_NODE_DOWN RDE_MSG_TAKEOVER_REQUEST_CALLBACK - subscribe to AMFND service up events to keep track of the number of cluster members - listen for takeover requests in KV store --- src/rde/rded/rde_cb.h| 12 ++--

[devel] [PATCH 2/6] osaf: add lock takeover request fuction [#2795]

2018-04-13 Thread Gary Lee
- add create and set (if previous value matches) functions to KeyValue class - add Consensus::MonitorTakeoverRequest() function for use by RDE to answer takeover requests - add Consensus::CreateTakeoverRequest() - before a SC is promoted to active, it will create a takeover request in the KV

[devel] [PATCH 0/6] Review Request for split-brain: select active SC from largest network partition V4 [#2795]

2018-04-13 Thread Gary Lee
Note: Patches 1 to 4 are identical to V3. Patch 5 (osaf: remove timestamp from takeover request) is the diff between V3 and V4. revision c8ca1da49c61d207cc7c1fa706f35fb3950b492d Author: Gary Lee <gary@dektech.com.au> Date: Fri, 13 Apr 2018 21:40:24 +1000 osaf: remove timesta

Re: [devel] [PATCH 0/5] Review Request for split-brain: select active SC from largest network partition V3 [#2795]

2018-04-13 Thread Gary Lee
/18 16:16, Hans Nordebäck wrote: Hi, On 04/12/2018 04:15 PM, Gary Lee wrote: Hi On 12/04/18 23:34, Anders Widell wrote: Ack with comments: * There is no need to use "const" when passing function arguments by value. E.g. the argument "const uint64_t cluster_size"

Re: [devel] [PATCH 0/5] Review Request for split-brain: select active SC from largest network partition V3 [#2795]

2018-04-12 Thread Gary Lee
matically deletes the takeover request when it expires? That way we would not require synchronized clocks. [GL] Good idea. I did question why I hadn't use TTL/lease once I had finished the ticket. :-) Will see what I can do! regards, Anders Widell On 04/11/2018 09:35 AM, Gary Lee wrote: Summary:

[devel] [PATCH 5/5] rded: adapt to new Consensus API [#2795]

2018-04-11 Thread Gary Lee
- add 3 new internal message: RDE_MSG_NODE_UP RDE_MSG_NODE_DOWN RDE_MSG_TAKEOVER_REQUEST_CALLBACK - subscribe to AMFND service up events to keep track of the number of cluster members - listen for takeover requests in KV store --- src/rde/rded/rde_cb.h| 12 ++--

[devel] [PATCH 1/5] osaf: extend API to include a create key and an enhanced set key function [#2795]

2018-04-11 Thread Gary Lee
- add create_key function (fails if key already exists) - add setkey_match_prev function (set value if previous value matches) - add missing quotes - add etcd3.plugin --- src/osaf/consensus/plugins/etcd.plugin | 86 +++- src/osaf/consensus/plugins/etcd3.plugin | 366

[devel] [PATCH 0/5] Review Request for split-brain: select active SC from largest network partition V3 [#2795]

2018-04-11 Thread Gary Lee
revision c7bc78656d5de11f6147727bd8612274fb6e438f Author: Gary Lee <gary@dektech.com.au> Date: Wed, 11 Apr 2018 17:16:46 +1000 rded: adapt to new Consensus API [#2795] - add 3 new internal message: RDE_MSG_NODE_UP RDE_MSG_NODE_DOWN RDE_MSG_TAKEOVER_REQUEST_CALLBACK - subscribe to AMFND service up even

[devel] [PATCH 3/5] amfd: adapt to new Consensus API [#2795]

2018-04-11 Thread Gary Lee
--- src/amf/amfd/role.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amf/amfd/role.cc b/src/amf/amfd/role.cc index c8aa9cf1f..790983ee7 100644 --- a/src/amf/amfd/role.cc +++ b/src/amf/amfd/role.cc @@ -1217,7 +1217,7 @@ uint32_t amfd_switch_stdby_actv(AVD_CL_CB *cb) {

[devel] [PATCH 4/5] fmd: adapt to new Consensus API [#2795]

2018-04-11 Thread Gary Lee
--- src/fm/fmd/fm_cb.h| 2 +- src/fm/fmd/fm_main.cc | 26 +- src/fm/fmd/fm_mds.cc | 2 ++ src/fm/fmd/fm_rda.cc | 27 ++- 4 files changed, 30 insertions(+), 27 deletions(-) diff --git a/src/fm/fmd/fm_cb.h b/src/fm/fmd/fm_cb.h index

[devel] [PATCH 2/5] osaf: add lock takeover request fuction [#2795]

2018-04-11 Thread Gary Lee
- add create and set (if previous value matches) functions to KeyValue class - add Consensus::MonitorTakeoverRequest() function for use by RDE to answer takeover requests - add Consensus::CreateTakeoverRequest() - before a SC is promoted to active, it will create a takeover request in the KV

[devel] [PATCH 1/5] osaf: extend API to include a create key and an enhanced set key function [#2795]

2018-04-06 Thread Gary Lee
- add create_key function (fails if key already exists) - add setkey_match_prev function (set value if previous value matches) - add missing quotes - add etcd3.plugin --- src/osaf/consensus/plugins/etcd.plugin | 86 +++- src/osaf/consensus/plugins/etcd3.plugin | 355

[devel] [PATCH 5/5] rded: adapt to new Consensus API [#2795]

2018-04-06 Thread Gary Lee
- add 3 new internal message: RDE_MSG_NODE_UP RDE_MSG_NODE_DOWN RDE_MSG_TAKEOVER_REQUEST_CALLBACK - subscribe to AMFND service up events to keep track of the number of cluster members - listen for takeover requests in KV store --- src/rde/rded/rde_cb.h| 12 ++--

[devel] [PATCH 4/5] fmd: adapt to new Consensus API [#2795]

2018-04-06 Thread Gary Lee
--- src/fm/fmd/fm_main.cc | 26 +- src/fm/fmd/fm_mds.cc | 2 ++ src/fm/fmd/fm_rda.cc | 15 +-- 3 files changed, 20 insertions(+), 23 deletions(-) diff --git a/src/fm/fmd/fm_main.cc b/src/fm/fmd/fm_main.cc index 73c9b9ccd..3371ec5e8 100644 ---

[devel] [PATCH 2/5] osaf: add lock takeover request fuction [#2795]

2018-04-06 Thread Gary Lee
- add create and set (if previous value matches) functions to KeyValue class - add Consensus::MonitorTakeoverRequest() function for use by RDE to answer takeover requests - add Consensus::CreateTakeoverRequest() - before a SC is promoted to active, it will create a takeover request in the KV

[devel] [PATCH 3/5] amfd: adapt to new Consensus API [#2795]

2018-04-06 Thread Gary Lee
--- src/amf/amfd/role.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amf/amfd/role.cc b/src/amf/amfd/role.cc index c8aa9cf1f..790983ee7 100644 --- a/src/amf/amfd/role.cc +++ b/src/amf/amfd/role.cc @@ -1217,7 +1217,7 @@ uint32_t amfd_switch_stdby_actv(AVD_CL_CB *cb) {

[devel] [PATCH 0/5] Review Request for split-brain: select active SC from largest network partition V2 [#2795]

2018-04-06 Thread Gary Lee
uot; above): - Changes from V1: Delete takeover request *after* obtaining lock Add etcd3.plugin revision b23363e798e8f02eae550f520a1525afe11362bc Author: Gary Lee <gary@dektech.com.au> Date: Fri, 6 Apr 2018 16:07:41 +1000 rded: adapt to new Consensus API [#2795] - add 3 new

[devel] [PATCH 3/5] amfd: adapt to new Consensus API [#2795]

2018-04-04 Thread Gary Lee
--- src/amf/amfd/role.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amf/amfd/role.cc b/src/amf/amfd/role.cc index c8aa9cf1f..790983ee7 100644 --- a/src/amf/amfd/role.cc +++ b/src/amf/amfd/role.cc @@ -1217,7 +1217,7 @@ uint32_t amfd_switch_stdby_actv(AVD_CL_CB *cb) {

[devel] [PATCH 5/5] rded: adapt to new Consensus API [#2795]

2018-04-04 Thread Gary Lee
- add 3 new internal message: RDE_MSG_NODE_UP RDE_MSG_NODE_DOWN RDE_MSG_TAKEOVER_REQUEST_CALLBACK - subscribe to AMFND service up events to keep track of the number of cluster members - listen for takeover requests in KV store --- src/rde/rded/rde_cb.h| 12 ++---

[devel] [PATCH 4/5] fmd: adapt to new Consensus API [#2795]

2018-04-04 Thread Gary Lee
--- src/fm/fmd/fm_main.cc | 26 +- src/fm/fmd/fm_mds.cc | 2 ++ src/fm/fmd/fm_rda.cc | 15 +-- 3 files changed, 20 insertions(+), 23 deletions(-) diff --git a/src/fm/fmd/fm_main.cc b/src/fm/fmd/fm_main.cc index 73c9b9ccd..3371ec5e8 100644 ---

[devel] [PATCH 0/5] Review Request for split-brain: select active SC from largest network partition [#2795]

2018-04-04 Thread Gary Lee
revision 65b5489d7209987a7246b94419d1358235d15abb Author: Gary Lee <gary@dektech.com.au> Date: Wed, 4 Apr 2018 16:18:14 +1000 rded: adapt to new Consensus API [#2795] - add 3 new internal message: RDE_MSG_NODE_UP RDE_MSG_NODE_DOWN RDE_MSG_TAKEOVER_REQUEST_CALLBACK - subscribe to AMFND service up even

[devel] [PATCH 1/5] osaf: extend API to include a create key and an enhanced set key function [#2795]

2018-04-04 Thread Gary Lee
- add create_key function (fails if key already exists) - add setkey_match_prev function (set value if previous value matches) - add missing quotes --- src/osaf/consensus/plugins/etcd.plugin | 86 ++ 1 file changed, 77 insertions(+), 9 deletions(-) diff --git

[devel] [PATCH 2/5] osaf: add lock takeover request fuction [#2795]

2018-04-04 Thread Gary Lee
- add create and set (if previous value matches) functions to KeyValue class - add Consensus::MonitorTakeoverRequest() function for use by RDE to answer takeover requests - add Consensus::CreateTakeoverRequest() - before a SC is promoted to active, it will create a takeover request in the KV

Re: [devel] [PATCH 1/1] amf: do not dereference null pointer [#2791]

2018-03-22 Thread Gary Lee
to analyze the flows in MDS code to figure out the root cause, but it is of vain. Can you please give me the reproducible scenario, I will try out by adding debug logs Thanks, Syam. -Original Message- From: Ravi Sekhar Reddy Konda Sent: Monday, March 19, 2018 10:28 AM To: Gary Lee <g

Re: [devel] [PATCH 1/1] amf: do not dereference null pointer [#2791]

2018-03-16 Thread Gary Lee
urn NCSCC_RC_REQ_TIMOUT from the MDS and > let the Application handle it > > Thanks, > Ravi > > -Original Message- > From: Gary Lee [mailto:gary@dektech.com.au] > Sent: Thursday, March 01, 2018 11:02 AM > To: hans.nordeb...@ericsson.com; ravisekhar.ko

Re: [devel] [PATCH 1/1] amfd: Trigger dependent SI assignment if currActiveAssignment is less than preferred active assignment [#2803]

2018-03-15 Thread Gary Lee
ack from me (review) On 16/03/18 16:14, Minh Hon Chau wrote: Hi Hans, I will update the PR. Hi Gary, Ravi, Do we have any comments? Thanks, Minh On 16/03/18 01:51, Hans Nordebäck wrote: Hi Minh, ack review only. Good if the AMF Programmer's Reference also be updated regarding this, (si

Re: [devel] [PATCH 1/1] fmd: avoid conflict with split-brain prevention if two nodes are elected [#2801]

2018-03-14 Thread Gary Lee
d lock as last operation in opensafd stop? /HansN On 03/09/2018 06:57 AM, Gary Lee wrote: If we have a 'tied election' and split-brain prevention is enabled, then the 'old active' is fenced, or the 'old active' will self-reboot when it is notified a new node is active. We need to disable this redundan

Re: [devel] [PATCH 1/1] rde: avoid SIGPIPE in send functions [#2800]

2018-03-12 Thread Gary Lee
with minor comment: Return type from strlen() is size_t, and return type from send() is ssize_t. So a more type-correct way to implement this is outlined in my inlined comments in the code below. regards, Anders Widell On 03/09/2018 02:44 AM, Gary Lee wrote: ---   src/rde/agent/rda_papi.cc | 8

[devel] [PATCH 1/1] fmd: avoid conflict with split-brain prevention if two nodes are elected [#2801]

2018-03-08 Thread Gary Lee
If we have a 'tied election' and split-brain prevention is enabled, then the 'old active' is fenced, or the 'old active' will self-reboot when it is notified a new node is active. We need to disable this redundant check in fmd. Otherwise, the 'new active' will also reboot, along with the 'old

[devel] [PATCH 0/1] Review Request for fmd: avoid conflict with split-brain prevention if two nodes are elected [#2801]

2018-03-08 Thread Gary Lee
uot; above): - revision 49325b25b08d47015be2aa892fe5500b50928788 Author: Gary Lee <gary@dektech.com.au> Date: Fri, 9 Mar 2018 16:51:17 +1100 fmd: avoid conflict with split-brain prevention if two nodes are elected [#2801] If we have a 'tied election' and split-brain preve

[devel] [PATCH 0/1] Review Request for rde: avoid SIGPIPE in send functions [#2800]

2018-03-08 Thread Gary Lee
revision e7601d2a04d99ecaa1022880370ead597187647f Author: Gary Lee <gary@dektech.com.au> Date: Fri, 9 Mar 2018 12:37:01 +1100 rde: avoid SIGPIPE in send functions [#2800] Complete diffstat: -- src/rde/agent/rda_papi.cc | 8 +--- src/rde/rded/rde_rda.cc | 8 +--- 2 files changed, 10

[devel] [PATCH 1/1] rde: avoid SIGPIPE in send functions [#2800]

2018-03-08 Thread Gary Lee
--- src/rde/agent/rda_papi.cc | 8 +--- src/rde/rded/rde_rda.cc | 8 +--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/rde/agent/rda_papi.cc b/src/rde/agent/rda_papi.cc index a07d2b06f..57ad57761 100644 --- a/src/rde/agent/rda_papi.cc +++

Re: [devel] [PATCH 1/1] osaf: add example config for etcd [#2784]

2018-03-07 Thread Gary Lee
:09, Anders Widell wrote: Ack with comment: I think the file should be called README.etcd instead of etcd.readme. Shouldn't it be added to the Makefile as well? regards, Anders Widell On 03/07/2018 04:42 AM, Gary Lee wrote: ---   src/osaf/consensus/plugins/etcd.readme | 32

[devel] [PATCH 1/1] osaf: use local etcd instance only [#2797]

2018-03-06 Thread Gary Lee
--- src/osaf/consensus/plugins/etcd.plugin | 25 - 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/src/osaf/consensus/plugins/etcd.plugin b/src/osaf/consensus/plugins/etcd.plugin index f8d3c7f25..586059b32 100644 --- a/src/osaf/consensus/plugins/etcd.plugin

[devel] [PATCH 0/1] Review Request for osaf: use local etcd instance only [#2797]

2018-03-06 Thread Gary Lee
revision 8ba1cf4a10e1756b50ce39beb717f496a2b36040 Author: Gary Lee <gary@dektech.com.au> Date: Wed, 7 Mar 2018 15:11:56 +1100 osaf: use local etcd instance only [#2797] Complete diffstat: -- src/osaf/consensus/plugins/etcd.plugin | 25 - 1 file changed, 16 insertions(+), 9 deleti

[devel] [PATCH 1/1] osaf: add example config for etcd [#2784]

2018-03-06 Thread Gary Lee
--- src/osaf/consensus/plugins/etcd.readme | 32 1 file changed, 32 insertions(+) create mode 100644 src/osaf/consensus/plugins/etcd.readme diff --git a/src/osaf/consensus/plugins/etcd.readme b/src/osaf/consensus/plugins/etcd.readme new file mode 100644 index

[devel] [PATCH 0/1] Review Request for osaf: add example config for etcd [#2784]

2018-03-06 Thread Gary Lee
revision eba49de4b62bb2274fd5bd97cf7395456fa587e3 Author: Gary Lee <gary@dektech.com.au> Date: Wed, 7 Mar 2018 14:24:24 +1100 osaf: add example config for etcd [#2784] Added Files: src/osaf/consensus/plugins/etcd.readme Complete diffstat: -- src/osaf/consensus/plugins/

Re: [devel] [users] Errors in running OpenSaf 5.3 in a Ubuntu VM

2018-03-05 Thread Gary Lee
Hi Perhaps you just need to run ldconfig. Gary On 06/03/18 08:19, Feng Xie wrote: Hi, I am new in using OpenSAF. I encountered an error in running the latest OpenSaf software in a Ubuntu Linux VM. I would appreciate if somebody can provide some hint on this issue in specific and some

[devel] [PATCH 1/1] amf: do not dereference null pointer [#2791]

2018-02-28 Thread Gary Lee
Callers of ava_mds_send() assume *o_msg is not null, if the return code is NCSCC_RC_SUCCESS. --- src/amf/agent/ava_mds.cc | 4 1 file changed, 4 insertions(+) diff --git a/src/amf/agent/ava_mds.cc b/src/amf/agent/ava_mds.cc index 440885332..cd139365d 100644 --- a/src/amf/agent/ava_mds.cc

[devel] [PATCH 0/1] Review Request for amf: do not dereference null pointer [#2791]

2018-02-28 Thread Gary Lee
revision 91c24d80f69c283d7107cd98fbcc6dffd3c7639e Author: Gary Lee <gary@dektech.com.au> Date: Thu, 1 Mar 2018 14:27:25 +1100 amf: do not dereference null pointer [#2791] Callers of ava_mds_send() assume *o_msg is not null, if the return code is NCSCC_RC_SUCCESS. Complete diffstat: -- src/amf/agen

[devel] [PATCH 1/1] amfnd: remove duplicate log entry [#2783]

2018-02-27 Thread Gary Lee
--- src/amf/amfnd/err.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/amf/amfnd/err.cc b/src/amf/amfnd/err.cc index a0529b96c..1d6eb3757 100644 --- a/src/amf/amfnd/err.cc +++ b/src/amf/amfnd/err.cc @@ -458,9 +458,6 @@ uint32_t avnd_err_process(AVND_CB *cb,

Re: [devel] [PATCH 1/1] amfd: Handle su_cnt_adm_opr properly in Nodegroup adm resp procesing [#2588]

2018-02-22 Thread Gary Lee
Hi Ravi ack Thanks On 22/02/18 21:37, ravi-sekhar wrote: --- src/amf/amfd/sgproc.cc | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/amf/amfd/sgproc.cc b/src/amf/amfd/sgproc.cc index 610c205..2bee875 100644 --- a/src/amf/amfd/sgproc.cc +++

[devel] [PATCH 0/1] Review Request for amfnd: remove duplicate log entry [#2783]

2018-02-18 Thread Gary Lee
revision 88b55873c7e747092a660df6ed8c5f7366e5a599 Author: Gary Lee <gary@dektech.com.au> Date: Mon, 19 Feb 2018 11:42:17 +1100 amfnd: remove duplicate log entry [#2783] Complete diffstat: -- src/amf/amfnd/err.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) Testing Commands: --

Re: [devel] [PATCH 1/1] amf: Validate env variable format set in comptype/comp objects [#2409]

2018-02-18 Thread Gary Lee
Ack, review only. Will push on Nguyen's behalf. On Fri, 16 Feb 2018 at 7:29 pm, Ravi Sekhar Reddy Konda < ravisekhar.ko...@oracle.com> wrote: > Hi Nguyen, > > Ack, code review only > > Regards, > Ravi > > -Original Message- > From: Nguyen Luu [mailto:nguyen.tk@dektech.com.au] >

[devel] [PATCH 0/1] Review Request for fmd: prevent data races between MDS and main threads V2 [#2763]

2018-02-12 Thread Gary Lee
d9331cc7c15a4 Author: Gary Lee <gary@dektech.com.au> Date: Tue, 13 Feb 2018 14:53:24 +1100 fmd: prevent data races between MDS and main threads [#2763] Complete diffstat: -- src/fm/fmd/fm_cb.h| 89 ++- src/fm/

[devel] [PATCH 1/1] fmd: prevent data races between MDS and main threads [#2763]

2018-02-12 Thread Gary Lee
--- src/fm/fmd/fm_cb.h| 89 ++- src/fm/fmd/fm_main.cc | 38 +++--- src/fm/fmd/fm_mds.cc | 35 +++- src/fm/fmd/fm_mds.h | 2 ++ src/fm/fmd/fm_mem.h | 8 - 5 files changed, 86 insertions(+), 86

Re: [devel] Review Request for doc: update overview PR for split brain prevention with consensus service [#64]

2018-02-12 Thread Gary Lee
Hi Ravi/Anders AndersW> This is slightly out of scope since there are many RAFT implementations, but I agree it could be a good idea to provide a sample configuration for etcd along with the sample etcd plugin. I will try to provide a sample plugin for an external etcd server,

Re: [devel] [PATCH 1/1] fmd: prevent data races between MDS and main threads [#2763]

2018-02-07 Thread Gary Lee
Hi Anders Thanks, please see [GL]. On 08/02/18 02:06, Anders Widell wrote: Ack with minor comments inline, marked AndersW>. regards, Anders Widell On 02/06/2018 03:43 AM, Gary Lee wrote: ---   src/fm/fmd/fm_cb.h    | 89 ++-   src/fm/

Re: [devel] [PATCH 1/1] amf: validate env variable format set in comptype/comp objects [#2409]

2018-02-06 Thread Gary Lee
Hi Nguyen Some comments below marked with [GL]. Thanks Gary On 6/2/18, 6:35 pm, "Nguyen Luu" wrote: Valid environment variable should have the format 'var=value'. AMF currently does not validate this format during CREATE CCBs for comptype and

Re: [devel] [PATCH 1/1] amfnd: Discard new assignment while su is under failover [#2773]

2018-02-06 Thread Gary Lee
Hi Minh Ack (review) Thanks Gary On 6/2/18, 5:15 pm, "Minh Chau" wrote: When two errors happen to component and both escalates to a su failover. For the first su failover recovery, amfd will send new assignment to su. However, the second error happens

[devel] [PATCH 0/1] Review Request for fmd: prevent data races between MDS and main threads [#2763]

2018-02-05 Thread Gary Lee
revision d51ded1a789b252e7f75c96737276069b8806748 Author: Gary Lee <gary@dektech.com.au> Date: Tue, 6 Feb 2018 13:37:35 +1100 fmd: prevent data races between MDS and main threads [#2763] Complete diffstat: -- src/fm/fmd/fm_cb.h| 89 ++-

<    1   2   3   4   5   6   7   8   9   10   >