Hi all,

If you are testing the patches, then you may need the below extra patch 
to work.
I will publish V2 including the below patch after comments of V1.

Thanks,
Minh

----------------

diff --git a/src/amf/amfnd/di.cc b/src/amf/amfnd/di.cc
--- a/src/amf/amfnd/di.cc
+++ b/src/amf/amfnd/di.cc
@@ -430,7 +430,7 @@ uint32_t avnd_evt_tmr_rcv_msg_rsp_evh(AV
      AVND_TMR_EVT *tmr = &evt->info.tmr;
      AVND_DND_MSG_LIST *rec = 0;
      uint32_t rc = NCSCC_RC_SUCCESS;
-
+    bool rec_tobe_deleted = false;
      TRACE_ENTER();

      /* retrieve the message record */
@@ -446,16 +446,19 @@ uint32_t avnd_evt_tmr_rcv_msg_rsp_evh(AV
              } else {
                  LOG_WA("Node Down timer retries is over");
                  avnd_last_step_clean(cb);
-                m_AVND_DIQ_REC_FIND_POP(cb, rec);
-                avnd_diq_rec_del(cb, rec);
+                rec_tobe_deleted = true;
              }
      } else {
-        m_AVND_DIQ_REC_FIND_POP(cb, rec);
-        avnd_diq_rec_del(cb, rec);
+        LOG_WA("Unexpected message response timeout with msg_type(%u)", 
rec->msg.info.avd->msg_type);
+        rec_tobe_deleted = true;
      }

      ncshm_give_hdl(tmr->opq_hdl);

+    if (rec_tobe_deleted) {
+        m_AVND_DIQ_REC_FIND_POP(cb, rec);
+        avnd_diq_rec_del(cb, rec);
+    }
  done:
      TRACE_LEAVE();
      return rc;

On 23/03/17 15:59, Minh Hon Chau wrote:
> Summary: AMF: Execute pending jobs in AMFD in shutdown phase [#2376]
> Review request for Trac Ticket(s): 2376
> Peer Reviewer(s): AMF maintainers
> Pull request to: <<LIST THE PERSON WITH PUSH ACCESS HERE>>
> Affected branch(es): all
> Development branch: default
>
> --------------------------------
> Impacted area       Impact y/n
> --------------------------------
>   Docs                    n
>   Build system            n
>   RPM/packaging           n
>   Configuration files     n
>   Startup scripts         n
>   SAF services            y
>   OpenSAF services        n
>   Core libraries          n
>   Samples                 n
>   Tests                   n
>   Other                   n
>
>
> Comments (indicate scope for each "y" above):
> ---------------------------------------------
>   <<EXPLAIN/COMMENT THE PATCH SERIES HERE>>
>
> changeset f4a38b69ab5bfc569a5db070ef7913c0f68c98be
> Author:       Minh Hon Chau <[email protected]>
> Date: Thu, 23 Mar 2017 15:42:55 +1100
>
>       AMF: Replace unused message SHUTDOWN_APP_SU_MSG for NODE_DOWN_MSG 
> [#2376]
>
>       When opensafd orders amfnd to shutdown node, amfnd firstly removes all
>       assignments, secondly terminates all components. The step of assignment
>       removal which includes applications' assignment that produces many IMM
>       updates towards amfd, amfd could have many pending IMM update jobs at 
> this
>       stage. Therefore, amfd should by somehow try to execute all pending jobs
>       after the first stage and before the second stage in which amfnd 
> terminates
>       IMM components. Based on this analysis, a new message called 
> NODE_DOWN_MSG
>       is introduced as following
>
>        AMFND AMFD | | "Remove all assignments" | | |--NODE_DOWN_MSG-->|
>       |<------ACK--------| | | "Terminates all components" | |
>
>       This patch is the first patch of series to introduce NODE_DOWN_MSG, 
> which is
>       a replacement of unused message SHUTDOWN_APP_SU_MSG.
>
> changeset b9dd37770a480af8ec104d594849ec0015a2d04f
> Author:       Minh Hon Chau <[email protected]>
> Date: Thu, 23 Mar 2017 15:42:57 +1100
>
>       AMF: Handle node_down message [#2376]
>
>       This patch is how amfnd and amfd handles node_down message. Before amfnd
>       enters component termination, amfnd sends node_down message to amfd, a 
> timer
>       is started. In amfd, upon reception of node_down message, amfd will try 
> to
>       execute all of its pending jobs. A node ack is sent if amfd finish all 
> its
>       jobs. If the timer is expired or amfnd receives node ack message for
>       NODE_DOWN_MSG, amfnd will continue its component termination phase
>
> changeset 8b7adc4edae950b4fcf6675527e676518fae8dc5
> Author:       Minh Hon Chau <[email protected]>
> Date: Thu, 23 Mar 2017 15:42:57 +1100
>
>       AMFD: Job queue differentiation [#2376]
>
>       amfd needs to prioritize to execute IMM updates jobs in its queue. This
>       patch makes a differentiation of job type in amfd's queue so that amfd 
> can
>       know to execute IMM jobs first
>
>
> Complete diffstat:
> ------------------
>   src/amf/amfd/evt.h          |   2 +-
>   src/amf/amfd/imm.cc         |  59 
> +++++++++++++++++++++++++++++++++++++++++++++++++++--------
>   src/amf/amfd/imm.h          |  36 ++++++++++++++++++++++++++----------
>   src/amf/amfd/main.cc        |   6 +++---
>   src/amf/amfd/ndfsm.cc       |  59 
> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>   src/amf/amfd/proc.h         |   1 +
>   src/amf/amfnd/avnd_defs.h   |   2 ++
>   src/amf/amfnd/avnd_di.h     |   1 +
>   src/amf/amfnd/avnd_mds.h    |   1 +
>   src/amf/amfnd/di.cc         |  61 
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
>   src/amf/amfnd/main.cc       |   2 +-
>   src/amf/amfnd/mds.cc        |   2 +-
>   src/amf/amfnd/susm.cc       |  12 ++++++++++--
>   src/amf/amfnd/term.cc       |   9 +++++++--
>   src/amf/common/amf_d2nmsg.h |  11 ++++++++---
>   src/amf/common/d2nedu.c     |  12 ++++++------
>   16 files changed, 238 insertions(+), 38 deletions(-)
>
>
> Testing Commands:
> -----------------
>   - TC1: Execute headless tests of admin operation continutation (shutdown 
> SI) multiple times
>   - TC2: Execute opensaf stop in all nodes
>
>
> Testing, Expected Results:
> --------------------------
>   - TC1: The pending IMM update jobs are executed by indication of node_down 
> message from amfnd
>   - TC2: Works as normal
>
>
> Conditions of Submission:
> -------------------------
>   ack from reviewer(s)
>
>
> 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 ~/.hgrc file (i.e. username, 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.
>
>


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to