diff --git a/src/common/src/tname.c b/src/common/src/tname.c index 29236ed0ff89a4bb2b803a4d924591ba7a05c291..3566f26abd944d1f170b2569e8058c08c0478807 100644 --- a/src/common/src/tname.c +++ b/src/common/src/tname.c @@ -29,6 +29,7 @@ void extractTableName(const char* tableId, char* name) { size_t s2 = strcspn(&tableId[s1 + 1], &TS_PATH_DELIMITER[0]); strncpy(name, &tableId[s1 + s2 + 2], TSDB_TABLE_NAME_LEN); + name[TSDB_TABLE_NAME_LEN] = 0; } char* extractDBName(const char* tableId, char* name) { diff --git a/src/dnode/src/dnodeMain.c b/src/dnode/src/dnodeMain.c index 2f693c61fbf5df441b57a130f7beab1cc77cd81e..68fe9869899edc42a1f6c251cce9749a800f43f6 100644 --- a/src/dnode/src/dnodeMain.c +++ b/src/dnode/src/dnodeMain.c @@ -37,6 +37,7 @@ static SDnodeRunStatus tsDnodeRunStatus = TSDB_DNODE_RUN_STATUS_STOPPED; int32_t dnodeInitSystem() { dnodeSetRunStatus(TSDB_DNODE_RUN_STATUS_INITIALIZE); tscEmbedded = 1; + taosBlockSIGPIPE(); taosResolveCRC(); taosInitGlobalCfg(); taosReadGlobalLogCfg(); diff --git a/src/kit/taosdemo/taosdemo.c b/src/kit/taosdemo/taosdemo.c index 3cacafa50501cfd0cf677c92327df499bff7a220..04194c6127f2b825735dcc7cf102c0a321f3079b 100644 --- a/src/kit/taosdemo/taosdemo.c +++ b/src/kit/taosdemo/taosdemo.c @@ -362,6 +362,26 @@ int main(int argc, char *argv[]) { time_t tTime = time(NULL); struct tm tm = *localtime(&tTime); + printf("###################################################################\n"); + printf("# Server IP: %s:%hu\n", ip_addr == NULL ? "localhost" : ip_addr, port); + printf("# User: %s\n", user); + printf("# Password: %s\n", pass); + printf("# Use metric: %s\n", use_metric ? "true" : "false"); + printf("# Datatype of Columns: %s\n", dataString); + printf("# Binary Length(If applicable): %d\n", + (strcasestr(dataString, "BINARY") != NULL) ? len_of_binary : -1); + printf("# Number of Columns per record: %d\n", ncols_per_record); + printf("# Number of Connections: %d\n", nconnections); + printf("# Number of Tables: %d\n", ntables); + printf("# Number of Data per Table: %d\n", nrecords_per_table); + printf("# Records/Request: %d\n", nrecords_per_request); + printf("# Database name: %s\n", db_name); + printf("# Table prefix: %s\n", tb_prefix); + printf("# Test time: %d-%02d-%02d %02d:%02d:%02d\n", tm.tm_year + 1900, tm.tm_mon + 1, + tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec); + printf("###################################################################\n\n"); + printf("Press enter key to continue"); + getchar(); fprintf(fp, "###################################################################\n"); fprintf(fp, "# Server IP: %s:%hu\n", ip_addr == NULL ? "localhost" : ip_addr, port); @@ -858,15 +878,16 @@ void generateData(char *res, char **data_type, int num_of_cols, int64_t timestam pstr += sprintf(pstr, ")"); } +static const char charset[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJK1234567890"; void rand_string(char *str, int size) { - memset(str, 0, size); - const char charset[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJK1234567890"; - char *sptr = str; - if (size) { + str[0] = 0; + if (size > 0) { --size; - for (size_t n = 0; n < size; n++) { + int n; + for (n = 0; n < size; n++) { int key = rand() % (int)(sizeof charset - 1); - sptr += sprintf(sptr, "%c", charset[key]); + str[n] = charset[key]; } + str[n] = 0; } } diff --git a/src/kit/taosdump/taosdump.c b/src/kit/taosdump/taosdump.c index 5ea75a1cde7d1d918b377b26ca4a8fa77872c803..9886a91f48242191a6259a9d15bbc1f3cefc0a81 100644 --- a/src/kit/taosdump/taosdump.c +++ b/src/kit/taosdump/taosdump.c @@ -533,7 +533,7 @@ int taosDumpOut(SDumpArguments *arguments) { } } - taos_free_result(result); + // taos_free_result(result); if (count == 0) { fprintf(stderr, "No databases valid to dump\n"); @@ -722,6 +722,57 @@ void taosDumpCreateMTableClause(STableDef *tableDes, char *metric, int numOfCols count_temp = counter; for (; counter < numOfCols; counter++) { + TAOS_ROW row = NULL; + + sprintf(command, "select %s from %s limit 1", tableDes->cols[counter].field, tableDes->name); + if (taos_query(taos, command) != 0) { + fprintf(stderr, "failed to run command %s\n", command); + return; + } + + result = taos_use_result(taos); + if (result == NULL) { + fprintf(stderr, "failed to use result\n"); + return; + } + + TAOS_FIELD *fields = taos_fetch_fields(result); + + row = taos_fetch_row(result); + switch (fields[0].type) { + case TSDB_DATA_TYPE_BOOL: + sprintf(tableDes->cols[counter].note, "%d", ((((int)(*((char *)row[0]))) == 1) ? 1 : 0)); + break; + case TSDB_DATA_TYPE_TINYINT: + sprintf(tableDes->cols[counter].note, "%d", (int)(*((char *)row[0]))); + break; + case TSDB_DATA_TYPE_SMALLINT: + sprintf(tableDes->cols[counter].note, "%d", (int)(*((short *)row[0]))); + break; + case TSDB_DATA_TYPE_INT: + sprintf(tableDes->cols[counter].note, "%d", *((int *)row[0])); + break; + case TSDB_DATA_TYPE_BIGINT: + sprintf(tableDes->cols[counter].note, "%" PRId64 "", *((int64_t *)row[0])); + break; + case TSDB_DATA_TYPE_FLOAT: + sprintf(tableDes->cols[counter].note, "%f", GET_FLOAT_VAL(row[0])); + break; + case TSDB_DATA_TYPE_DOUBLE: + sprintf(tableDes->cols[counter].note, "%f", GET_DOUBLE_VAL(row[0])); + break; + case TSDB_DATA_TYPE_TIMESTAMP: + sprintf(tableDes->cols[counter].note, "%" PRId64 "", *(int64_t *)row[0]); + break; + case TSDB_DATA_TYPE_BINARY: + case TSDB_DATA_TYPE_NCHAR: + default: + strncpy(tableDes->cols[counter].note, (char *)row[0], fields[0].bytes); + break; + } + + taos_free_result(result); + if (counter != count_temp) { if (strcasecmp(tableDes->cols[counter].type, "binary") == 0 || strcasecmp(tableDes->cols[counter].type, "nchar") == 0) { diff --git a/src/mnode/src/mgmtMnode.c b/src/mnode/src/mgmtMnode.c index 3ba7042c4091c265c8ff703ef658875525c98b73..e9d14dc6e77ae904e456109586c4c4cc782b26ef 100644 --- a/src/mnode/src/mgmtMnode.c +++ b/src/mnode/src/mgmtMnode.c @@ -210,6 +210,9 @@ void mgmtUpdateMnodeIpSet() { mgmtMnodeWrLock(); + memset(ipSet, 0, sizeof(tsMnodeRpcIpSet)); + memset(mnodes, 0, sizeof(SDMMnodeInfos)); + int32_t index = 0; void * pIter = NULL; while (1) { diff --git a/src/mnode/src/mgmtTable.c b/src/mnode/src/mgmtTable.c index f0c55449a3608de0140d617658890991592330fe..53fbd64f87e9c50fcb87deb15137c206412f1e35 100644 --- a/src/mnode/src/mgmtTable.c +++ b/src/mnode/src/mgmtTable.c @@ -1139,7 +1139,7 @@ int32_t mgmtRetrieveShowSuperTables(SShowObj *pShow, char *data, int32_t rows, v prefixLen = strlen(prefix); SPatternCompareInfo info = PATTERN_COMPARE_INFO_INITIALIZER; - char stableName[TSDB_TABLE_NAME_LEN] = {0}; + char stableName[TSDB_TABLE_NAME_LEN + 1] = {0}; while (numOfRows < rows) { pShow->pIter = mgmtGetNextSuperTable(pShow->pIter, &pTable); @@ -2024,7 +2024,7 @@ static void mgmtProcessMultiTableMetaMsg(SQueuedMsg *pMsg) { SCMMultiTableInfoMsg *pInfo = pMsg->pCont; pInfo->numOfTables = htonl(pInfo->numOfTables); - int32_t totalMallocLen = 4*1024*1024; // first malloc 4 MB, subsequent reallocation as twice + int32_t totalMallocLen = 4 * 1024 * 1024; // first malloc 4 MB, subsequent reallocation as twice SMultiTableMeta *pMultiMeta = rpcMallocCont(totalMallocLen); if (pMultiMeta == NULL) { mgmtSendSimpleResp(pMsg->thandle, TSDB_CODE_SERV_OUT_OF_MEMORY); @@ -2034,26 +2034,30 @@ static void mgmtProcessMultiTableMetaMsg(SQueuedMsg *pMsg) { pMultiMeta->contLen = sizeof(SMultiTableMeta); pMultiMeta->numOfTables = 0; - for (int t = 0; t < pInfo->numOfTables; ++t) { - char *tableId = (char*)(pInfo->tableIds + t * TSDB_TABLE_ID_LEN); + for (int32_t t = 0; t < pInfo->numOfTables; ++t) { + char * tableId = (char *)(pInfo->tableIds + t * TSDB_TABLE_ID_LEN + 1); SChildTableObj *pTable = mgmtGetChildTable(tableId); if (pTable == NULL) continue; if (pMsg->pDb == NULL) pMsg->pDb = mgmtGetDbByTableId(tableId); - if (pMsg->pDb == NULL) continue; + if (pMsg->pDb == NULL) { + mgmtDecTableRef(pTable); + continue; + } int availLen = totalMallocLen - pMultiMeta->contLen; if (availLen <= sizeof(STableMetaMsg) + sizeof(SSchema) * (TSDB_MAX_TAGS + TSDB_MAX_COLUMNS + 16)) { - //TODO realloc - //totalMallocLen *= 2; - //pMultiMeta = rpcReMalloc(pMultiMeta, totalMallocLen); - //if (pMultiMeta == NULL) { - /// rpcSendResponse(ahandle, TSDB_CODE_SERV_OUT_OF_MEMORY, NULL, 0); - // return TSDB_CODE_SERV_OUT_OF_MEMORY; - //} else { - // t--; - // continue; - //} + totalMallocLen *= 2; + pMultiMeta = rpcReallocCont(pMultiMeta, totalMallocLen); + if (pMultiMeta == NULL) { + mgmtSendSimpleResp(pMsg->thandle, TSDB_CODE_SERV_OUT_OF_MEMORY); + mgmtDecTableRef(pTable); + return; + } else { + t--; + mgmtDecTableRef(pTable); + continue; + } } STableMetaMsg *pMeta = (STableMetaMsg *)(pMultiMeta->metas + pMultiMeta->contLen); @@ -2062,6 +2066,8 @@ static void mgmtProcessMultiTableMetaMsg(SQueuedMsg *pMsg) { pMultiMeta->numOfTables ++; pMultiMeta->contLen += pMeta->contLen; } + + mgmtDecTableRef(pTable); } SRpcMsg rpcRsp = {0}; @@ -2148,7 +2154,7 @@ static int32_t mgmtRetrieveShowTables(SShowObj *pShow, char *data, int32_t rows, continue; } - char tableName[TSDB_TABLE_NAME_LEN] = {0}; + char tableName[TSDB_TABLE_NAME_LEN + 1] = {0}; // pattern compare for table name mgmtExtractTableName(pTable->info.tableId, tableName); diff --git a/src/rpc/src/rpcTcp.c b/src/rpc/src/rpcTcp.c index cef1d68790c8c936ca6d476ceeab6f946e8aaba0..a7312fadf1139541a41fa24c3809650b600ece18 100644 --- a/src/rpc/src/rpcTcp.c +++ b/src/rpc/src/rpcTcp.c @@ -468,7 +468,7 @@ static void taosFreeFdObj(SFdObj *pFdObj) { pFdObj->signature = NULL; epoll_ctl(pThreadObj->pollFd, EPOLL_CTL_DEL, pFdObj->fd, NULL); - taosCloseTcpSocket(pFdObj->fd); + taosCloseSocket(pFdObj->fd); pThreadObj->numOfFds--; diff --git a/src/util/inc/tsocket.h b/src/util/inc/tsocket.h index 309aa80ef6c0ae4e04d20e72ebb0d91835bcb66d..97abc16333ae08cec2387045d8ae458de43b3a06 100644 --- a/src/util/inc/tsocket.h +++ b/src/util/inc/tsocket.h @@ -31,7 +31,6 @@ int taosOpenUdpSocket(uint32_t localIp, uint16_t localPort); int taosOpenTcpClientSocket(uint32_t ip, uint16_t port, uint32_t localIp); int taosOpenTcpServerSocket(uint32_t ip, uint16_t port); int taosKeepTcpAlive(int sockFd); -void taosCloseTcpSocket(int sockFd); int taosGetFqdn(char *); uint32_t taosGetIpFromFqdn(const char *); diff --git a/src/util/src/tsocket.c b/src/util/src/tsocket.c index efdf7529608b272230f804437d71377f1fc6feea..f2b89c8243ec7c38acd663a6465955aa0b6df966 100644 --- a/src/util/src/tsocket.c +++ b/src/util/src/tsocket.c @@ -305,18 +305,9 @@ int taosOpenTcpClientSocket(uint32_t destIp, uint16_t destPort, uint32_t clientI sockFd = -1; } - return sockFd; -} - -void taosCloseTcpSocket(int sockFd) { - struct linger linger; - linger.l_onoff = 1; - linger.l_linger = 0; - if (taosSetSockOpt(sockFd, SOL_SOCKET, SO_LINGER, (void *)&linger, sizeof(linger)) < 0) { - uError("setsockopt SO_LINGER failed: %d (%s)", errno, strerror(errno)); - } + taosKeepTcpAlive(sockFd); - taosCloseSocket(sockFd); + return sockFd; } int taosKeepTcpAlive(int sockFd) { @@ -355,6 +346,15 @@ int taosKeepTcpAlive(int sockFd) { return -1; } + struct linger linger = {0}; + linger.l_onoff = 1; + //linger.l_linger = 0; + if (taosSetSockOpt(sockFd, SOL_SOCKET, SO_LINGER, (void *)&linger, sizeof(linger)) < 0) { + uError("setsockopt SO_LINGER failed: %d (%s)", errno, strerror(errno)); + close(sockFd); + return -1; + } + return 0; } diff --git a/tests/pytest/table/boundary.py b/tests/pytest/table/boundary.py index b68671c61a8c3e8f36372a3692732cbaec0635a7..29fdd5c475b39a375071ab1d24b42ef098e901f3 100644 --- a/tests/pytest/table/boundary.py +++ b/tests/pytest/table/boundary.py @@ -10,7 +10,7 @@ from util.sql import * class TDTestCase: - def init(self, conn): + def init(self, conn, logSql): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) @@ -95,18 +95,43 @@ class TDTestCase: maxTableNameLen = self.getLimitFromSourceCode('TSDB_TABLE_NAME_LEN') tdLog.notice("table name max length is %d" % maxTableNameLen) - name = self.generateString(maxTableNameLen - 1) - tdLog.info("table name is '%s'" % name) + # create a super table with name exceed max length + sname = self.generateString(maxTableNameLen + 1) + tdLog.info("create a super table with length %d" % len(sname)) + tdSql.error("create table %s (ts timestamp, value int) tags(id int)" % sname) - tdSql.execute("create table %s (ts timestamp, value int)" % name) - tdSql.execute("insert into %s values(now, 0)" % name) + # create a super table with name of max length + sname = self.generateString(maxTableNameLen) + tdLog.info("create a super table with length %d" % len(sname)) + tdSql.execute("create table %s (ts timestamp, value int) tags(id int)" % sname) + tdLog.info("check table count, should be one") + tdSql.query('show stables') + tdSql.checkRows(1) + + # create a child table with name exceed max length + name = self.generateString(maxTableNameLen + 1) + tdLog.info("create a child table with length %d" % len(name)) + tdSql.error("create table %s using %s tags(0)" % (name, sname)) + # create a child table with name of max length + name = self.generateString(maxTableNameLen) + tdLog.info("create a child table with length %d" % len(name)) + tdSql.execute("create table %s using %s tags(0)" % (name, sname)) tdSql.query('show tables') tdSql.checkRows(1) - tdSql.query('select * from %s' % name) + # insert one row + tdLog.info("insert one row of data") + tdSql.execute("insert into %s values(now, 0)" % name) + tdSql.query("select * from " + name) + tdSql.checkRows(1) + tdSql.query("select * from " + sname) tdSql.checkRows(1) + name = name[:len(name) - 1] + tdSql.error("select * from " + name) + tdSql.checkRows(0) + def checkRowBoundaries(self): tdLog.debug("checking row boundaries") tdSql.prepare() diff --git a/tests/pytest/util/sql.py b/tests/pytest/util/sql.py index 245e4b0945181762d0dc7994d3bcf0d2d46b1fd4..ec7ac117c07ee6c34ea91ffbb148729ab4c55119 100644 --- a/tests/pytest/util/sql.py +++ b/tests/pytest/util/sql.py @@ -58,6 +58,9 @@ class TDSql: "%s failed: sql:%s, expect error not occured" % (callerFilename, sql)) else: + self.queryRows = 0 + self.queryCols = 0 + self.queryResult = None tdLog.info("sql:%s, expect error occured" % (sql)) def query(self, sql): diff --git a/tests/script/jenkins/basic.txt b/tests/script/jenkins/basic.txt index 5d76e69e10aad52416312f4425936cfd8ffa7731..9d116aebc5cc3f93aaae28833631631d5f50368c 100644 --- a/tests/script/jenkins/basic.txt +++ b/tests/script/jenkins/basic.txt @@ -121,22 +121,22 @@ cd ../../../debug; make ./test.sh -f general/parser/insert_tb.sim ./test.sh -f general/parser/first_last.sim # ./test.sh -f general/parser/import_file.sim -# ./test.sh -f general/parser/lastrow.sim +./test.sh -f general/parser/lastrow.sim # ./test.sh -f general/parser/nchar.sim # ./test.sh -f general/parser/null_char.sim -# ./test.sh -f general/parser/single_row_in_tb.sim +./test.sh -f general/parser/single_row_in_tb.sim ./test.sh -f general/parser/select_from_cache_disk.sim -# ./test.sh -f general/parser/limit.sim +./test.sh -f general/parser/limit.sim # ./test.sh -f general/parser/fill.sim # ./test.sh -f general/parser/fill_stb.sim # ./test.sh -f general/parser/tags_dynamically_specifiy.sim # ./test.sh -f general/parser/interp.sim -# ./test.sh -f general/parser/limit1.sim -# ./test.sh -f general/parser/limit1_tblocks100.sim +./test.sh -f general/parser/limit1.sim +./test.sh -f general/parser/limit1_tblocks100.sim # ./test.sh -f general/parser/limit2.sim -# ./test.sh -f general/parser/mixed_blocks.sim +./test.sh -f general/parser/mixed_blocks.sim ./test.sh -f general/parser/selectResNum.sim -# ./test.sh -f general/parser/select_across_vnodes.sim +./test.sh -f general/parser/select_across_vnodes.sim # ./test.sh -f general/parser/set_tag_vals.sim # ./test.sh -f general/parser/slimit.sim ./test.sh -f general/parser/slimit1.sim diff --git a/tests/script/jenkins/sync.txt b/tests/script/jenkins/sync.txt index 15685f99e9c3fea4e754d6d28593dec41c388c1b..934680b7c0c42974a40025afd6f0226e1a6ccf9c 100644 --- a/tests/script/jenkins/sync.txt +++ b/tests/script/jenkins/sync.txt @@ -3,15 +3,64 @@ cd ../../debug; make cd ../../../debug; cmake .. cd ../../../debug; make +./test.sh -u -f unique/account/account_create.sim +./test.sh -u -f unique/account/account_delete.sim +./test.sh -u -f unique/account/account_len.sim +./test.sh -u -f unique/account/authority.sim +./test.sh -u -f unique/account/basic.sim +./test.sh -u -f unique/account/paras.sim +./test.sh -u -f unique/account/pass_alter.sim +./test.sh -u -f unique/account/pass_len.sim +./test.sh -u -f unique/account/usage.sim +./test.sh -u -f unique/account/user_create.sim +./test.sh -u -f unique/account/user_len.sim + +./test.sh -u -f unique/big/balance.sim +./test.sh -u -f unique/big/maxvnodes.sim +./test.sh -u -f unique/big/tcp.sim + ./test.sh -u -f unique/cluster/balance1.sim ./test.sh -u -f unique/cluster/balance2.sim ./test.sh -u -f unique/cluster/balance3.sim ./test.sh -u -f unique/cluster/cache.sim +./test.sh -u -f unique/column/replica3.sim + +./test.sh -u -f unique/db/commit.sim +./test.sh -u -f unique/db/delete.sim +./test.sh -u -f unique/db/delete_part.sim +./test.sh -u -f unique/db/replica_add12.sim +./test.sh -u -f unique/db/replica_add13.sim +./test.sh -u -f unique/db/replica_add23.sim +./test.sh -u -f unique/db/replica_reduce21.sim +./test.sh -u -f unique/db/replica_reduce32.sim +./test.sh -u -f unique/db/replica_reduce31.sim +./test.sh -u -f unique/db/replica_part.sim + ./test.sh -u -f unique/dnode/balance1.sim ./test.sh -u -f unique/dnode/balance2.sim ./test.sh -u -f unique/dnode/balance3.sim ./test.sh -u -f unique/dnode/balancex.sim +./test.sh -u -f unique/dnode/offline1.sim +./test.sh -u -f unique/dnode/offline2.sim +./test.sh -u -f unique/dnode/remove1.sim +./test.sh -u -f unique/dnode/remove2.sim +./test.sh -u -f unique/dnode/vnode_clean.sim + +./test.sh -u -f unique/http/admin.sim +./test.sh -u -f unique/http/opentsdb.sim + +./test.sh -u -f unique/import/replica2.sim +./test.sh -u -f unique/import/replica3.sim + +./test.sh -u -f unique/stable/balance_replica1.sim +./test.sh -u -f unique/stable/dnode2_stop.sim +./test.sh -u -f unique/stable/dnode2.sim +./test.sh -u -f unique/stable/dnode3.sim +./test.sh -u -f unique/stable/replica2_dnode4.sim +./test.sh -u -f unique/stable/replica2_vnode3.sim +./test.sh -u -f unique/stable/replica3_dnode6.sim +./test.sh -u -f unique/stable/replica3_vnode3.sim ./test.sh -u -f unique/mnode/mgmt22.sim ./test.sh -u -f unique/mnode/mgmt23.sim @@ -21,3 +70,10 @@ cd ../../../debug; make ./test.sh -u -f unique/mnode/mgmt33.sim ./test.sh -u -f unique/mnode/mgmt34.sim ./test.sh -u -f unique/mnode/mgmtr2.sim + +./test.sh -u -f unique/vnode/many.sim +./test.sh -u -f unique/vnode/replica2_basic2.sim +./test.sh -u -f unique/vnode/replica2_repeat.sim +./test.sh -u -f unique/vnode/replica3_basic.sim +./test.sh -u -f unique/vnode/replica3_repeat.sim +./test.sh -u -f unique/vnode/replica3_vgroup.sim diff --git a/tests/script/tmp/prepare.sim b/tests/script/tmp/prepare.sim index 68a05a33e75e0716d83c21da3aade66a16ca472a..31d78395668502b844b22608922622c52387988a 100644 --- a/tests/script/tmp/prepare.sim +++ b/tests/script/tmp/prepare.sim @@ -1,4 +1,14 @@ system sh/stop_dnodes.sh +system sh/deploy.sh -n dnode1 -i 1 +system sh/deploy.sh -n dnode2 -i 2 +system sh/deploy.sh -n dnode3 -i 3 + +system sh/cfg.sh -n dnode1 -c numOfMPeers -v 2 +system sh/cfg.sh -n dnode2 -c numOfMPeers -v 2 +system sh/cfg.sh -n dnode3 -c numOfMPeers -v 2 + +return +system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode2 -i 2