@@ -1549,22 +1549,24 @@ export class NodeCommand extends BaseCommand {
1549
1549
{
1550
1550
title : 'Identify existing network nodes' ,
1551
1551
task : async ( ctx , task ) => {
1552
- ctx . config . serviceMap = await self . accountManager . getNodeServiceMap (
1553
- ctx . config . namespace )
1554
- for ( /** @type {NetworkNodeServices } **/ const networkNodeServices of ctx . config . serviceMap . values ( ) ) {
1555
- ctx . config . existingNodeIds . push ( networkNodeServices . nodeName )
1552
+ const config = /** @type {NodeAddConfigClass } **/ ctx . config
1553
+ config . serviceMap = await self . accountManager . getNodeServiceMap (
1554
+ config . namespace )
1555
+ for ( /** @type {NetworkNodeServices } **/ const networkNodeServices of config . serviceMap . values ( ) ) {
1556
+ config . existingNodeIds . push ( networkNodeServices . nodeName )
1556
1557
}
1557
1558
1558
- return self . taskCheckNetworkNodePods ( ctx , task , ctx . config . existingNodeIds )
1559
+ return self . taskCheckNetworkNodePods ( ctx , task , config . existingNodeIds )
1559
1560
}
1560
1561
} ,
1561
1562
{
1562
1563
title : 'Determine new node account number' ,
1563
1564
task : ( ctx , task ) => {
1565
+ const config = /** @type {NodeAddConfigClass } **/ ctx . config
1564
1566
const values = { hedera : { nodes : [ ] } }
1565
1567
let maxNum = 0
1566
1568
1567
- for ( /** @type {NetworkNodeServices } **/ const networkNodeServices of ctx . config . serviceMap . values ( ) ) {
1569
+ for ( /** @type {NetworkNodeServices } **/ const networkNodeServices of config . serviceMap . values ( ) ) {
1568
1570
values . hedera . nodes . push ( {
1569
1571
accountId : networkNodeServices . accountId ,
1570
1572
name : networkNodeServices . nodeName
@@ -1577,14 +1579,14 @@ export class NodeCommand extends BaseCommand {
1577
1579
ctx . maxNum = maxNum
1578
1580
ctx . newNode = {
1579
1581
accountId : `${ constants . HEDERA_NODE_ACCOUNT_ID_START . realm } .${ constants . HEDERA_NODE_ACCOUNT_ID_START . shard } .${ ++ maxNum } ` ,
1580
- name : ctx . config . nodeId
1582
+ name : config . nodeId
1581
1583
}
1582
1584
}
1583
1585
} ,
1584
1586
{
1585
1587
title : 'Generate Gossip key' ,
1586
1588
task : async ( ctx , parentTask ) => {
1587
- const config = ctx . config
1589
+ const config = /** @type { NodeAddConfigClass } **/ ctx . config
1588
1590
const subTasks = self . _nodeGossipKeysTaskList ( config . keyFormat , [ config . nodeId ] , config . keysDir , config . curDate , config . allNodeIds )
1589
1591
// set up the sub-tasks
1590
1592
return parentTask . newListr ( subTasks , {
@@ -1600,7 +1602,7 @@ export class NodeCommand extends BaseCommand {
1600
1602
{
1601
1603
title : 'Generate gRPC TLS key' ,
1602
1604
task : async ( ctx , parentTask ) => {
1603
- const config = ctx . config
1605
+ const config = /** @type { NodeAddConfigClass } **/ ctx . config
1604
1606
const subTasks = self . _nodeTlsKeyTaskList ( [ config . nodeId ] , config . keysDir , config . curDate )
1605
1607
// set up the sub-tasks
1606
1608
return parentTask . newListr ( subTasks , {
@@ -1888,6 +1890,10 @@ export class NodeCommand extends BaseCommand {
1888
1890
task :
1889
1891
async ( ctx , task ) => {
1890
1892
const config = /** @type {NodeAddConfigClass } **/ ctx . config
1893
+ config . serviceMap = await self . accountManager . getNodeServiceMap (
1894
+ config . namespace )
1895
+ const newPodName = config . serviceMap . get ( config . nodeId ) . nodePodName
1896
+ config . podNames = [ ...config . podNames , newPodName ]
1891
1897
return self . fetchLocalOrReleasedPlatformSoftware ( config . allNodeIds , config . podNames , config . releaseTag , task , config . localBuildPath )
1892
1898
}
1893
1899
} ,
@@ -1945,8 +1951,6 @@ export class NodeCommand extends BaseCommand {
1945
1951
task : async ( ctx , task ) => {
1946
1952
const config = /** @type {NodeAddConfigClass } **/ ctx . config
1947
1953
const subTasks = [ ]
1948
- await sleep ( 60000 ) // wait 60 seconds for the kubelet syncFrequency = 1m to sync the updated configMap for config.txt
1949
- // TODO does the application.properties with the bump version working? that might also be a configMap mount, I don't think it is readonly though.
1950
1954
self . startNodes ( config . podNames , config . allNodeIds , subTasks )
1951
1955
1952
1956
// set up the sub-tasks
0 commit comments