You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by su...@apache.org on 2016/10/12 23:27:04 UTC

[3/4] incubator-trafodion git commit: TRAFODION-2235 - Fixed zclient logic to ignore ZNODEEXISTS error when creating directory tree.

TRAFODION-2235 - Fixed zclient logic to ignore ZNODEEXISTS error
when creating directory tree.


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/3d65adcb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/3d65adcb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/3d65adcb

Branch: refs/heads/master
Commit: 3d65adcb3fcbc5c92f6ca18f413bd374b36827a0
Parents: 41c384e
Author: Zalo Correa <za...@esgyn.com>
Authored: Tue Oct 11 12:57:06 2016 -0700
Committer: Zalo Correa <za...@esgyn.com>
Committed: Tue Oct 11 12:57:06 2016 -0700

----------------------------------------------------------------------
 core/sqf/monitor/linux/zclient.cxx | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/3d65adcb/core/sqf/monitor/linux/zclient.cxx
----------------------------------------------------------------------
diff --git a/core/sqf/monitor/linux/zclient.cxx b/core/sqf/monitor/linux/zclient.cxx
index 01ab4e5..2f766ad 100644
--- a/core/sqf/monitor/linux/zclient.cxx
+++ b/core/sqf/monitor/linux/zclient.cxx
@@ -728,7 +728,11 @@ int CZClient::MakeClusterZNodes( void )
                         , rootDir.c_str() );
         }
         rc = RegisterZNode( rootDir.c_str(), NULL, 0 );
-        if (rc) return(rc); // Return the error
+        if ( rc && rc != ZNODEEXISTS )
+        {
+            return(rc); // Return the error
+        }
+        rc = ZOK;
         break;
     default:
         char buf[MON_STRING_BUF_SIZE];
@@ -758,6 +762,11 @@ int CZClient::MakeClusterZNodes( void )
                         , instanceDir.c_str() );
         }
         rc = RegisterZNode( instanceDir.c_str(), NULL, 0 );
+        if ( rc && rc != ZNODEEXISTS )
+        {
+            return(rc); // Return the error
+        }
+        rc = ZOK;
         break;
     default:
         char buf[MON_STRING_BUF_SIZE];
@@ -787,6 +796,11 @@ int CZClient::MakeClusterZNodes( void )
                         , clusterDir.c_str() );
         }
         rc = RegisterZNode( clusterDir.c_str(), NULL, 0 );
+        if ( rc && rc != ZNODEEXISTS )
+        {
+            return(rc); // Return the error
+        }
+        rc = ZOK;
         break;
     default:
         char buf[MON_STRING_BUF_SIZE];