Skip to content

Commit 8f28088

Browse files
authored
Merge pull request #187 from Chulhee1Lee/main
Unknown Node Handling Issue Fix ( not launch workload at worker node )
2 parents 0057c02 + 67216a9 commit 8f28088

File tree

2 files changed

+30
-12
lines changed

2 files changed

+30
-12
lines changed

.github/workflows/run-ci.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,15 @@ jobs:
1313
- name: Checkout repository
1414
uses: actions/checkout@v4
1515

16-
# Step 2: Install Rust toolchain
17-
- name: Install Rust toolchain
18-
uses: actions-rs/toolchain@v1
19-
with:
20-
toolchain: stable
21-
override: true
22-
23-
# Step 3: Install Docker Compose dependencies (if needed)
24-
- name: Install Docker Compose and utilities
16+
# Step 2: Install essential dependencies including protobuf-compiler and dbus
17+
- name: Install essential dependencies
2518
run: |
2619
sudo apt-get update -y
27-
sudo apt-get install -y docker-compose jq curl lsb-release
20+
sudo apt-get install -y docker-compose jq curl lsb-release protobuf-compiler libdbus-1-dev pkg-config build-essential
21+
22+
# Step 3: Install Rust toolchain
23+
- name: Install Rust toolchain
24+
uses: dtolnay/rust-toolchain@stable
2825

2926
# Step 4: Make all scripts executable
3027
- name: Make scripts executable

src/player/actioncontroller/src/manager.rs

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)