@@ -505,12 +505,12 @@ async def restart_cluster(
505505 if next_pod_uid in all_pod_uids :
506506 # The next to-be-terminated pod still appears to be running.
507507 logger .info ("Terminating pod '%s'" , next_pod_name )
508+ node_index = int (next_pod_name [next_pod_name .rindex ("-" ) + 1 :])
509+ node_progress = f"{ node_index + 1 } /{ len (all_pod_uids )} "
508510 await send_operation_progress_notification (
509511 namespace = namespace ,
510512 name = name ,
511- message = "Waiting for node "
512- f"{ int (next_pod_name [next_pod_name .rindex ('-' )+ 1 :])+ 1 } /{ len (all_pod_uids )} "
513- " to be terminated..." ,
513+ message = f"Waiting for node { node_progress } to be terminated." ,
514514 logger = logger ,
515515 status = WebhookStatus .IN_PROGRESS ,
516516 operation = WebhookOperation .UPDATE ,
@@ -527,12 +527,12 @@ async def restart_cluster(
527527 elif next_pod_name in all_pod_names :
528528 total_nodes = get_total_nodes_count (old ["spec" ]["nodes" ], "all" )
529529 # The new pod has been spawned. Only a matter of time until it's ready.
530+ node_index = int (next_pod_name [next_pod_name .rindex ("-" ) + 1 :])
531+ node_progress = f"{ node_index + 1 } /{ len (all_pod_uids )} "
530532 await send_operation_progress_notification (
531533 namespace = namespace ,
532534 name = name ,
533- message = "Waiting for node "
534- f"{ int (next_pod_name [next_pod_name .rindex ('-' )+ 1 :])+ 1 } /{ len (all_pod_uids )} "
535- " to be restarted..." ,
535+ message = f"Waiting for node { node_progress } to be restarted." ,
536536 logger = logger ,
537537 status = WebhookStatus .IN_PROGRESS ,
538538 operation = WebhookOperation .UPDATE ,
0 commit comments