@@ -143,9 +143,9 @@ export class NodeCommandTasks {
143
143
const config = ctx . config
144
144
145
145
// Transfer some hbar to the node for staking purpose
146
- const accountMap = getNodeAccountMap ( config . existingNodeIds )
147
- for ( const nodeId of config . existingNodeIds ) {
148
- const accountId = accountMap . get ( nodeId )
146
+ const accountMap = getNodeAccountMap ( config . existingNodeAliases )
147
+ for ( const nodeAlias of config . existingNodeAliases ) {
148
+ const accountId = accountMap . get ( nodeAlias )
149
149
await this . accountManager . transferAmount ( constants . TREASURY_ACCOUNT_ID , accountId , 1 )
150
150
}
151
151
} )
@@ -231,7 +231,7 @@ export class NodeCommandTasks {
231
231
downloadNodeGeneratedFiles ( ) {
232
232
return new Task ( 'Download generated files from an existing node' , async ( ctx , task ) => {
233
233
const config = ctx . config
234
- const node1FullyQualifiedPodName = Templates . renderNetworkPodName ( config . existingNodeIds [ 0 ] )
234
+ const node1FullyQualifiedPodName = Templates . renderNetworkPodName ( config . existingNodeAliases [ 0 ] )
235
235
236
236
// copy the config.txt file from the node1 upgrade directory
237
237
await this . k8 . copyFrom ( node1FullyQualifiedPodName , constants . ROOT_CONTAINER , `${ constants . HEDERA_HAPI_PATH } /data/upgrade/current/config.txt` , config . stagingDir )
@@ -257,22 +257,22 @@ export class NodeCommandTasks {
257
257
* Return task for checking for all network node pods
258
258
* @param {any } ctx
259
259
* @param {TaskWrapper } task
260
- * @param {string[] } nodeIds
260
+ * @param {string[] } nodeAliases
261
261
* @returns {* }
262
262
*/
263
- taskCheckNetworkNodePods ( ctx , task , nodeIds ) {
263
+ taskCheckNetworkNodePods ( ctx , task , nodeAliases ) {
264
264
if ( ! ctx . config ) {
265
265
ctx . config = { }
266
266
}
267
267
268
268
ctx . config . podNames = { }
269
269
270
270
const subTasks = [ ]
271
- for ( const nodeId of nodeIds ) {
271
+ for ( const nodeAlias of nodeAliases ) {
272
272
subTasks . push ( {
273
- title : `Check network pod: ${ chalk . yellow ( nodeId ) } ` ,
273
+ title : `Check network pod: ${ chalk . yellow ( nodeAlias ) } ` ,
274
274
task : async ( ctx ) => {
275
- ctx . config . podNames [ nodeId ] = await this . checkNetworkNodePod ( ctx . config . namespace , nodeId )
275
+ ctx . config . podNames [ nodeAlias ] = await this . checkNetworkNodePod ( ctx . config . namespace , nodeAlias )
276
276
}
277
277
} )
278
278
}
@@ -289,43 +289,43 @@ export class NodeCommandTasks {
289
289
/**
290
290
* Check if the network node pod is running
291
291
* @param {string } namespace
292
- * @param {string } nodeId
292
+ * @param {string } nodeAlias
293
293
* @param {number } [maxAttempts]
294
294
* @param {number } [delay]
295
295
* @returns {Promise<string> }
296
296
*/
297
- async checkNetworkNodePod ( namespace , nodeId , maxAttempts = 60 , delay = 2000 ) {
298
- nodeId = nodeId . trim ( )
299
- const podName = Templates . renderNetworkPodName ( nodeId )
297
+ async checkNetworkNodePod ( namespace , nodeAlias , maxAttempts = 60 , delay = 2000 ) {
298
+ nodeAlias = nodeAlias . trim ( )
299
+ const podName = Templates . renderNetworkPodName ( nodeAlias )
300
300
301
301
try {
302
302
await this . k8 . waitForPods ( [ constants . POD_PHASE_RUNNING ] , [
303
303
'fullstack.hedera.com/type=network-node' ,
304
- `fullstack.hedera.com/node-name=${ nodeId } `
304
+ `fullstack.hedera.com/node-name=${ nodeAlias } `
305
305
] , 1 , maxAttempts , delay )
306
306
307
307
return podName
308
308
} catch ( e ) {
309
- throw new SoloError ( `no pod found for nodeId : ${ nodeId } ` , e )
309
+ throw new SoloError ( `no pod found for nodeAlias : ${ nodeAlias } ` , e )
310
310
}
311
311
}
312
312
313
313
identifyExistingNodes ( ) {
314
314
return new Task ( 'Identify existing network nodes' , async ( ctx , task ) => {
315
315
const config = ctx . config
316
- config . existingNodeIds = [ ]
316
+ config . existingNodeAliases = [ ]
317
317
config . serviceMap = await this . accountManager . getNodeServiceMap ( config . namespace )
318
318
for ( /** @type {NetworkNodeServices } **/ const networkNodeServices of config . serviceMap . values ( ) ) {
319
- config . existingNodeIds . push ( networkNodeServices . nodeName )
319
+ config . existingNodeAliases . push ( networkNodeServices . nodeName )
320
320
}
321
- config . allNodeIds = [ ...config . existingNodeIds ]
322
- return this . taskCheckNetworkNodePods ( ctx , task , config . existingNodeIds )
321
+ config . allnodeAliases = [ ...config . existingNodeAliases ]
322
+ return this . taskCheckNetworkNodePods ( ctx , task , config . existingNodeAliases )
323
323
} )
324
324
}
325
325
326
326
identifyNetworkPods ( ) {
327
327
return new Task ( 'Identify network pods' , async ( ctx , task ) => {
328
- return this . taskCheckNetworkNodePods ( ctx , task , ctx . config . nodeIds )
328
+ return this . taskCheckNetworkNodePods ( ctx , task , ctx . config . nodeAliases )
329
329
} )
330
330
}
331
331
0 commit comments