Summary: clm: modify log string and respawn clmna for failed node join requests 
[#816]
Review request for Trac Ticket(s): #816 
Peer Reviewer(s): HansF and/or RameshB 
Pull request to: <<LIST THE PERSON WITH PUSH ACCESS HERE>>
Affected branch(es): opensaf-4.4.x, default
Development branch: <<IF ANY GIVE THE REPO URL>>

--------------------------------
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):
---------------------------------------------
This patch series do the following:

patch 1 of 3 : Adds null check to avoid crash during node requests from 
unconfigured/misconfigured nodes.
patch 2 of 3 : Improves log strings for failed node join requests in scenarios 
involving
- unconfigured/misconfigured node join request
- duplicate node join requests
- nodes with connectivity problems

patch 3 of 3 : clmna shall pass on the error code(for configuration problems 
also)  to NID
such that NID respawns CLMNA


changeset 5de25467f5d25ccdff0bbbc7d9f0fbe95cf43c2e
Author: Mathivanan N.P.<[email protected]>
Date:   Wed, 26 Mar 2014 20:14:34 -0400

        clm: add null check for unconfigured node join request [#816] When a 
node
        tries to join with a node name that is not configured or just gets 
simply
        mis-configured, then CLM crashes causing due to lack of null check 
during
        the processing of node join request. When this issue happens, the 
following
        logging is done by CLM:

        Mar 26 18:44:52 SC-1 local0.err osafclmd[418]: ER CLM NodeName: 'SC-3' 
doesn't match entry in imm.xml. Specify a correct node
        name in/etc/opensaf/node_name.
        This patch 1 of 1 adds a null check such that CLM server doesn't 
crashes.

changeset bc69e7c6d6f9f5bf8eaaf81d92a130ac65928f4e
Author: Mathivanan N.P.<[email protected]>
Date:   Wed, 26 Mar 2014 20:30:32 -0400

        clm: change log message for unconfigured nodes, connectivity problems 
[#816]
        When a node join request from an unconfigured/misconfigured node is
        attempted, then CLM prints the following log message:

        Mar 26 18:44:52 SC-1 local0.err osafclmd[418]: ER CLM NodeName: 'SC-3' 
doesn't match entry in
        imm.xml. Specify a correct node name in/etc/opensaf/node_name.

        This log message is currently categorized as ERROR. However, there are 
suggestions to
        improve the current log message such that the message more closely 
depicts
        the case of unconfigured or misconfigured nodes. The log string is now
        changed as below:

        Mar 26 20:23:32 SC-1 local0.notice osafclmd[420]: NO CLM NodeName: 
'PL-8' is not a configured cluster node.
        Mar 26 20:23:32 SC-1 local0.notice osafclmd[420]: NO 
/etc/opensaf/node_name should contain the
        rdn value of a configured CLM node object name

        In the case of problems with connectivity problems, the following 
modified
        log strings are added: 
        "Send timed out. Check status(network, process) of ACTIVE controller."
        and 
        "Send failed: %u. Check network connectivity"


changeset 11f7ed6e040e6e42f6acad397e14a14a8576aadb
Author: Mathivanan N.P.<[email protected]>
Date:   Wed, 26 Mar 2014 20:45:34 -0400

        clm: clmna to be respawned by nid when node join request fails [#816]
        When a node join request for an unconfigured/misconfigured node or when 
a node join
        request with a duplicate node_name is attempted, then clmna should 
report
        those errors to NID such that NID attempts to respawan clmna. With the
        introduction of this change, the following happens(can be seen in the
        syslog) in the case of a unconfigured/misconfigured node join request:

        At the ACTIVE controller syslog: 
        Mar 26 20:23:32 SC-1 local0.notice osafclmd[420]: NO CLM NodeName: 
'PL-8' is not a configured cluster node.
        Mar 26 20:23:32 SC-1 local0.notice osafclmd[420]: NO 
/etc/opensaf/node_name
        should contain the rdn value of a configured CLM node object name

        At the unconfigured/misconfigured node, the syslog will be like as 
below:
        Mar 26 19:03:54 PL-3 local0.notice osafclmna[871]: Started
        Mar 26 19:03:54 PL-3 local0.err osafclmna[871]: ER PL-8 is not a 
configured node
        Mar 26 19:03:54 PL-3 local0.err opensafd[837]: ER Failed DESC:CLMNA
        Mar 26 19:03:54 PL-3 local0.err opensafd[837]: ER Going for recovery
        Mar 26 19:03:54 PL-3 local0.err opensafd[837]: ER Trying To RESPAWN
        /usr/local/lib/opensaf/clc-cli/osaf-clmna attempt #1

        Mar 26 19:03:54 PL-3 local0.err opensafd[837]: ER Sending SIGKILL to 
CLMNA, pid=868
        Mar 26 19:03:54 PL-3 local0.err osafclmna[871]: ER Exiting 
        Mar 26 19:03:54 PL-3 local0.notice osafclmna[871]: exiting for shutdown
        Mar 26 19:04:09 PL-3 local0.notice osafclmna[895]: Started 
        Mar 26 19:04:09 PL-3 local0.err osafclmna[895]: ER PL-8 is not a 
configured node
        Mar 26 19:04:09 PL-3 local0.err osafclmna[895]: ER Exiting 
        Mar 26 19:04:09 PL-3 local0.err opensafd[837]: ER Could Not RESPAWN 
CLMNA
        Mar 26 19:04:09 PL-3 local0.err opensafd[837]: ER Failed DESC:CLMNA
        Mar 26 19:04:09 PL-3 local0.err opensafd[837]: ER Trying To RESPAWN 
        /usr/local/lib/opensaf/clc-cli/osaf-clmna attempt #2 

        Mar 26 19:04:09 PL-3 local0.err opensafd[837]: ER Sending SIGKILL to 
CLMNA, pid=892
        Mar 26 19:04:09 PL-3 local0.notice osafclmna[895]: exiting for shutdown
        Mar 26 19:04:24 PL-3 local0.notice osafclmna[919]: Started 
        Mar 26 19:04:25 PL-3 local0.err osafclmna[919]: ER PL-8 is not a 
configured node
        Mar 26 19:04:25 PL-3 local0.err osafclmna[919]: ER Exiting
        Mar 26 19:04:25 PL-3 local0.err opensafd[837]: ER Could Not RESPAWN 
CLMNA
        Mar 26 19:04:25 PL-3 local0.err opensafd[837]: ER Failed DESC:CLMNA Mar 
26
        19:04:25 PL-3 local0.err opensafd[837]: ER FAILED TO RESPAWN Mar 26 
19:04:27
        PL-3 local0.notice osafclmna[919]: exiting for shutdown Mar 26 19:04:28 
PL-3
        local0.notice osafimmnd[864]: exiting for shutdown

        For cases when a duplicate node join request comes, the following syslog
        message will be seen at the ACTIVE controller:

        Mar 26 19:07:43 SC-1 local0.err osafclmd[418]: ER Duplicate node join 
request for CLM node: 'SC-2'. Specify a unique node name 
in/etc/opensaf/node_name
        Mar 26 19:07:59 SC-1 local0.err osafclmd[418]: ER Duplicate node join 
request for CLM node: 'SC-2'. Specify a unique node name 
in/etc/opensaf/node_name


        And the following will be seen at the node on which the duplicate 
request is
        attempted:
        Mar 26 19:07:43 PL-3 local0.err osafclmna[1459]: ER SC-2 is already up. 
Specify a unique name in/etc/opensaf/node_name
        Mar 26 19:07:43 PL-3 local0.err opensafd[1425]: ER Failed   DESC:CLMNA
        Mar 26 19:07:43 PL-3 local0.err opensafd[1425]: ER Going for recovery
        Mar 26 19:07:43 PL-3 local0.err opensafd[1425]: ER Trying To RESPAWN 
/usr/local/lib/opensaf/clc-cli/osaf-clmna attempt #1
        Mar 26 19:07:43 PL-3 local0.err opensafd[1425]: ER Sending SIGKILL to 
CLMNA, pid=1456
        Mar 26 19:07:43 PL-3 local0.err osafclmna[1459]: ER Exiting
        Mar 26 19:07:44 PL-3 local0.notice osafclmna[1459]: exiting for shutdown
        Mar 26 19:07:59 PL-3 local0.notice osafclmna[1483]: Started
        Mar 26 19:07:59 PL-3 local0.err osafclmna[1483]: ER SC-2 is already up. 
Specify a unique name in/etc/opensaf/node_name
        Mar 26 19:07:59 PL-3 local0.err osafclmna[1483]: ER Exiting
        Mar 26 19:07:59 PL-3 local0.err opensafd[1425]: ER Could Not RESPAWN 
CLMNA
        Mar 26 19:07:59 PL-3 local0.err opensafd[1425]: ER Failed   DESC:CLMNA
        Mar 26 19:07:59 PL-3 local0.err opensafd[1425]: ER Trying To RESPAWN 
/usr/local/lib/opensaf/clc-cli/osaf-clmna attempt #2
        Mar 26 19:07:59 PL-3 local0.err opensafd[1425]: ER Sending SIGKILL to 
CLMNA, pid=1480
        Mar 26 19:07:59 PL-3 local0.notice osafclmna[1483]: exiting for shutdown


Complete diffstat:
------------------
 osaf/services/saf/clmsv/clms/clms_evt.c  |  60 
+++++++++++++++++++++++++++++++++++++-----------------------
 osaf/services/saf/clmsv/nodeagent/main.c |  15 +++++++++++----
 2 files changed, 48 insertions(+), 27 deletions(-)


Testing Commands:
-----------------
- Start a cluster with 3 or more nodes.
- one of the nodes should contain /etc/opensaf/node_name
set to a node name that does not contain the rdn value
of the clm node as specified in nodes.cfg or during
dynamic addition of a clm node through IMM commands.
- The active should not crash.
- The log string should give an indiciation of the problem.
- CLMNA is re-instantiated on the node on which this misconfiguration
occurs. 


Testing, Expected Results:
--------------------------
Same as above.

Conditions of Submission:
-------------------------
Ack from Hans and/or Ramesh.

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.


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to