Loading ndb/include/kernel/signaldata/CmRegSignalData.hpp +5 −1 Original line number Diff line number Diff line Loading @@ -90,7 +90,11 @@ public: ZNOT_PRESIDENT = 5, /* We are not president */ ZNOT_DEAD = 6, /* We are not dead when we are starting */ ZINCOMPATIBLE_VERSION = 7, ZINCOMPATIBLE_START_TYPE = 8 ZINCOMPATIBLE_START_TYPE = 8, ZSINGLE_USER_MODE = 9, /* The cluster is in single user mode, * data node is not allowed to get added * in the cluster while in single user mode */ ZGENERIC = 100 /* The generic error code */ }; private: Loading ndb/include/mgmapi/ndbd_exit_codes.h +2 −0 Original line number Diff line number Diff line Loading @@ -65,6 +65,7 @@ typedef ndbd_exit_status_enum ndbd_exit_status; typedef ndbd_exit_classification_enum ndbd_exit_classification; /* Errorcodes before block division was used */ #define NDBD_EXIT_GENERIC 2300 #define NDBD_EXIT_PRGERR 2301 #define NDBD_EXIT_NODE_NOT_IN_CONFIG 2302 #define NDBD_EXIT_SYSTEM_ERROR 2303 Loading @@ -78,6 +79,7 @@ typedef ndbd_exit_classification_enum ndbd_exit_classification; #define NDBD_EXIT_SR_RESTARTCONFLICT 2311 #define NDBD_EXIT_NO_MORE_UNDOLOG 2312 #define NDBD_EXIT_SR_UNDOLOG 2313 #define NDBD_EXIT_SINGLE_USER_MODE 2314 #define NDBD_EXIT_MEMALLOC 2327 #define NDBD_EXIT_BLOCK_JBUFCONGESTION 2334 #define NDBD_EXIT_TIME_QUEUE_SHORT 2335 Loading ndb/include/ndb_version.h.in +1 −0 Original line number Diff line number Diff line Loading @@ -62,5 +62,6 @@ char ndb_version_string_buf[NDB_VERSION_STRING_BUF_SZ]; #define NDBD_DICT_LOCK_VERSION_5 MAKE_VERSION(5,0,23) #define NDBD_QMGR_SINGLEUSER_VERSION_5 MAKE_VERSION(5,0,25) #endif ndb/src/kernel/blocks/qmgr/QmgrMain.cpp +49 −2 Original line number Diff line number Diff line Loading @@ -153,6 +153,7 @@ void Qmgr::execCONTINUEB(Signal* signal) return; } Uint64 now = NdbTick_CurrentMillisecond(); if (now > (c_start_election_time + c_restartFailureTimeout)) { jam(); Loading Loading @@ -699,6 +700,39 @@ void Qmgr::execCM_REGREQ(Signal* signal) return; } if (getNodeState().getSingleUserMode()) { /** * The cluster is in single user mode. * Data node is not allowed to get added in the cluster * while in single user mode. */ // handle rolling upgrade { unsigned int get_major = getMajor(startingVersion); unsigned int get_minor = getMinor(startingVersion); unsigned int get_build = getBuild(startingVersion); if (startingVersion < NDBD_QMGR_SINGLEUSER_VERSION_5) { jam(); infoEvent("QMGR: detect upgrade: new node %u old version %u.%u.%u", (unsigned int)addNodePtr.i, get_major, get_minor, get_build); /** * The new node is old version, send ZINCOMPATIBLE_VERSION instead * of ZSINGLE_USER_MODE. */ sendCmRegrefLab(signal, Tblockref, CmRegRef::ZINCOMPATIBLE_VERSION); } else { jam(); sendCmRegrefLab(signal, Tblockref, CmRegRef::ZSINGLE_USER_MODE); }//if } return; }//if ptrCheckGuard(addNodePtr, MAX_NDB_NODES, nodeRec); Phase phase = addNodePtr.p->phase; if (phase != ZINIT) Loading Loading @@ -1093,6 +1127,19 @@ void Qmgr::execCM_REGREF(Signal* signal) jam(); progError(__LINE__, NDBD_EXIT_NODE_NOT_DEAD); break; case CmRegRef::ZSINGLE_USER_MODE: jam(); progError(__LINE__, NDBD_EXIT_SINGLE_USER_MODE); break; /** * For generic refuse error. * e.g. in online upgrade, we can use this error code instead * of the incompatible error code. */ case CmRegRef::ZGENERIC: jam(); progError(__LINE__, NDBD_EXIT_GENERIC); break; case CmRegRef::ZELECTION: jam(); if (candidate_gci > c_start.m_president_candidate_gci || Loading ndb/src/kernel/error/ndbd_exit_codes.c +3 −0 Original line number Diff line number Diff line Loading @@ -45,6 +45,7 @@ typedef struct ErrStruct { static const ErrStruct errArray[] = { {NDBD_EXIT_GENERIC, XRE, "Generic error"}, {NDBD_EXIT_PRGERR, XIE, "Assertion"}, {NDBD_EXIT_NODE_NOT_IN_CONFIG, XCE, "node id in the configuration has the wrong type, (i.e. not an NDB node)"}, Loading @@ -68,6 +69,8 @@ static const ErrStruct errArray[] = "No more free UNDO log, increase UndoIndexBuffer"}, {NDBD_EXIT_SR_UNDOLOG, XFI, "Error while reading the datapages and UNDO log"}, {NDBD_EXIT_SINGLE_USER_MODE, XRE, "Data node is not allowed to get added " "to the cluster while it is in single user mode"}, {NDBD_EXIT_MEMALLOC, XCE, "Memory allocation failure, " "please decrease some configuration parameters"}, {NDBD_EXIT_BLOCK_JBUFCONGESTION, XIE, "Job buffer congestion"}, Loading Loading
ndb/include/kernel/signaldata/CmRegSignalData.hpp +5 −1 Original line number Diff line number Diff line Loading @@ -90,7 +90,11 @@ public: ZNOT_PRESIDENT = 5, /* We are not president */ ZNOT_DEAD = 6, /* We are not dead when we are starting */ ZINCOMPATIBLE_VERSION = 7, ZINCOMPATIBLE_START_TYPE = 8 ZINCOMPATIBLE_START_TYPE = 8, ZSINGLE_USER_MODE = 9, /* The cluster is in single user mode, * data node is not allowed to get added * in the cluster while in single user mode */ ZGENERIC = 100 /* The generic error code */ }; private: Loading
ndb/include/mgmapi/ndbd_exit_codes.h +2 −0 Original line number Diff line number Diff line Loading @@ -65,6 +65,7 @@ typedef ndbd_exit_status_enum ndbd_exit_status; typedef ndbd_exit_classification_enum ndbd_exit_classification; /* Errorcodes before block division was used */ #define NDBD_EXIT_GENERIC 2300 #define NDBD_EXIT_PRGERR 2301 #define NDBD_EXIT_NODE_NOT_IN_CONFIG 2302 #define NDBD_EXIT_SYSTEM_ERROR 2303 Loading @@ -78,6 +79,7 @@ typedef ndbd_exit_classification_enum ndbd_exit_classification; #define NDBD_EXIT_SR_RESTARTCONFLICT 2311 #define NDBD_EXIT_NO_MORE_UNDOLOG 2312 #define NDBD_EXIT_SR_UNDOLOG 2313 #define NDBD_EXIT_SINGLE_USER_MODE 2314 #define NDBD_EXIT_MEMALLOC 2327 #define NDBD_EXIT_BLOCK_JBUFCONGESTION 2334 #define NDBD_EXIT_TIME_QUEUE_SHORT 2335 Loading
ndb/include/ndb_version.h.in +1 −0 Original line number Diff line number Diff line Loading @@ -62,5 +62,6 @@ char ndb_version_string_buf[NDB_VERSION_STRING_BUF_SZ]; #define NDBD_DICT_LOCK_VERSION_5 MAKE_VERSION(5,0,23) #define NDBD_QMGR_SINGLEUSER_VERSION_5 MAKE_VERSION(5,0,25) #endif
ndb/src/kernel/blocks/qmgr/QmgrMain.cpp +49 −2 Original line number Diff line number Diff line Loading @@ -153,6 +153,7 @@ void Qmgr::execCONTINUEB(Signal* signal) return; } Uint64 now = NdbTick_CurrentMillisecond(); if (now > (c_start_election_time + c_restartFailureTimeout)) { jam(); Loading Loading @@ -699,6 +700,39 @@ void Qmgr::execCM_REGREQ(Signal* signal) return; } if (getNodeState().getSingleUserMode()) { /** * The cluster is in single user mode. * Data node is not allowed to get added in the cluster * while in single user mode. */ // handle rolling upgrade { unsigned int get_major = getMajor(startingVersion); unsigned int get_minor = getMinor(startingVersion); unsigned int get_build = getBuild(startingVersion); if (startingVersion < NDBD_QMGR_SINGLEUSER_VERSION_5) { jam(); infoEvent("QMGR: detect upgrade: new node %u old version %u.%u.%u", (unsigned int)addNodePtr.i, get_major, get_minor, get_build); /** * The new node is old version, send ZINCOMPATIBLE_VERSION instead * of ZSINGLE_USER_MODE. */ sendCmRegrefLab(signal, Tblockref, CmRegRef::ZINCOMPATIBLE_VERSION); } else { jam(); sendCmRegrefLab(signal, Tblockref, CmRegRef::ZSINGLE_USER_MODE); }//if } return; }//if ptrCheckGuard(addNodePtr, MAX_NDB_NODES, nodeRec); Phase phase = addNodePtr.p->phase; if (phase != ZINIT) Loading Loading @@ -1093,6 +1127,19 @@ void Qmgr::execCM_REGREF(Signal* signal) jam(); progError(__LINE__, NDBD_EXIT_NODE_NOT_DEAD); break; case CmRegRef::ZSINGLE_USER_MODE: jam(); progError(__LINE__, NDBD_EXIT_SINGLE_USER_MODE); break; /** * For generic refuse error. * e.g. in online upgrade, we can use this error code instead * of the incompatible error code. */ case CmRegRef::ZGENERIC: jam(); progError(__LINE__, NDBD_EXIT_GENERIC); break; case CmRegRef::ZELECTION: jam(); if (candidate_gci > c_start.m_president_candidate_gci || Loading
ndb/src/kernel/error/ndbd_exit_codes.c +3 −0 Original line number Diff line number Diff line Loading @@ -45,6 +45,7 @@ typedef struct ErrStruct { static const ErrStruct errArray[] = { {NDBD_EXIT_GENERIC, XRE, "Generic error"}, {NDBD_EXIT_PRGERR, XIE, "Assertion"}, {NDBD_EXIT_NODE_NOT_IN_CONFIG, XCE, "node id in the configuration has the wrong type, (i.e. not an NDB node)"}, Loading @@ -68,6 +69,8 @@ static const ErrStruct errArray[] = "No more free UNDO log, increase UndoIndexBuffer"}, {NDBD_EXIT_SR_UNDOLOG, XFI, "Error while reading the datapages and UNDO log"}, {NDBD_EXIT_SINGLE_USER_MODE, XRE, "Data node is not allowed to get added " "to the cluster while it is in single user mode"}, {NDBD_EXIT_MEMALLOC, XCE, "Memory allocation failure, " "please decrease some configuration parameters"}, {NDBD_EXIT_BLOCK_JBUFCONGESTION, XIE, "Job buffer congestion"}, Loading