@@ -134,7 +134,9 @@ impl ActionControllerManager {
134134 println ! ( "Node {} is nodeagent" , model_node) ;
135135 "nodeagent"
136136 } else {
137- continue ; // Skip unknown node types
137+ // Log warning for unknown node types and skip processing
138+ println ! ( "Warning: Node '{}' is not explicitly configured. Skipping deployment." , model_node) ;
139+ continue ;
138140 } ;
139141 println ! (
140142 "Processing model '{}' on node '{}' with action '{}'" ,
@@ -250,7 +252,9 @@ impl ActionControllerManager {
250252 } else if self . nodeagent_nodes . contains ( & model_node) {
251253 "nodeagent"
252254 } else {
253- continue ; // Skip if node type is unknown
255+ // Log warning for unknown node types and skip processing
256+ println ! ( "Warning: Node '{}' is not explicitly configured. Skipping deployment." , model_node) ;
257+ continue ;
254258 } ;
255259
256260 if desired == Status :: Running {
@@ -615,4 +619,21 @@ spec:
615619 assert ! ( manager. restart_workload( "test" . into( ) ) . await . is_ok( ) ) ;
616620 assert ! ( manager. pause_workload( "test" . into( ) ) . await . is_ok( ) ) ;
617621 }
622+
623+ #[ test]
624+ fn test_unknown_nodes_skipped ( ) {
625+ // Test that when creating a manager, unknown nodes are properly categorized
626+ let manager = ActionControllerManager {
627+ bluechi_nodes : vec ! [ "HPC" . to_string( ) ] ,
628+ nodeagent_nodes : vec ! [ "ZONE" . to_string( ) ] ,
629+ } ;
630+
631+ // Test that nodes are properly categorized
632+ assert ! ( manager. bluechi_nodes. contains( & "HPC" . to_string( ) ) ) ;
633+ assert ! ( manager. nodeagent_nodes. contains( & "ZONE" . to_string( ) ) ) ;
634+ assert ! ( !manager. bluechi_nodes. contains( & "cloud" . to_string( ) ) ) ;
635+
636+ // The logic now skips unknown nodes instead of processing them
637+ // This test validates that the manager is set up correctly
638+ }
618639}
0 commit comments