Commit d4c0966
authored
fix(machine-validation): skip reboot when disabled (#2488)
## Description
NICO currently enters the machine-validation reboot path even when
machine validation is disabled, issuing an unnecessary host restart and
increasing startup latency.
This change:
- skips disabled machine validation directly from `RebootHost`, before
issuing a host reboot
- reuses one completion path for disabled validation from both
`RebootHost` and `MachineValidating`
- preserves the existing wait when validation is disabled while a reboot
is already in flight
- preserves the upstream guard for validation runs that are no longer
active
- makes site-explorer fixtures branch on the observed machine state
instead of the validation configuration
- adds regression coverage for both disabled-validation paths
## Type of Change
<!-- Check one that best describes this PR -->
- [ ] **Add** - New feature or capability
- [x] **Change** - Changes in existing functionality
- [x] **Fix** - Bug fixes
- [ ] **Remove** - Removed features or deprecated functionality
- [ ] **Internal** - Internal changes (refactoring, tests, docs, etc.)
## Related Issues (Optional)
Related to #2486 feat: skip machine validation reboot when validation is
disabled
## Breaking Changes
- N/A
## Testing
<!-- How was this tested? Check all that apply -->
- [ ] Unit tests added/updated
- [x] Integration tests added/updated
- [ ] Manual testing performed
- [ ] No testing required (docs, internal refactor, etc.)
Validation performed against current `NVIDIA/infra-controller:main`:
- `git diff --check`
- `cargo fmt --all -- --check`
- `cargo test -p carbide-machine-controller` (19 passed)
- `cargo test -p carbide-api-core --no-default-features --no-run`
## Additional Notes
- N/A
Signed-off-by: Clement Liaw <clliaw@nvidia.com>1 parent 5b698e8 commit d4c0966
3 files changed
Lines changed: 310 additions & 112 deletions
File tree
- crates
- api-core/src/tests
- common/api_fixtures
- machine-controller/src/handler
Lines changed: 85 additions & 53 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
72 | | - | |
| 71 | + | |
73 | 72 | | |
74 | 73 | | |
75 | 74 | | |
| |||
913 | 912 | | |
914 | 913 | | |
915 | 914 | | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
916 | 919 | | |
917 | 920 | | |
918 | 921 | | |
| |||
923 | 926 | | |
924 | 927 | | |
925 | 928 | | |
926 | | - | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
927 | 937 | | |
928 | | - | |
929 | | - | |
930 | | - | |
931 | | - | |
932 | | - | |
933 | 938 | | |
934 | | - | |
935 | | - | |
936 | | - | |
937 | | - | |
938 | | - | |
939 | | - | |
940 | | - | |
941 | | - | |
942 | | - | |
943 | | - | |
944 | | - | |
945 | | - | |
946 | | - | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
947 | 959 | | |
948 | | - | |
949 | | - | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
950 | 966 | | |
951 | 967 | | |
952 | 968 | | |
| |||
1046 | 1062 | | |
1047 | 1063 | | |
1048 | 1064 | | |
1049 | | - | |
1050 | | - | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
1051 | 1079 | | |
1052 | 1080 | | |
1053 | | - | |
1054 | | - | |
1055 | | - | |
1056 | | - | |
1057 | | - | |
1058 | | - | |
1059 | | - | |
1060 | | - | |
1061 | | - | |
1062 | | - | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
1063 | 1094 | | |
1064 | 1095 | | |
1065 | 1096 | | |
1066 | 1097 | | |
1067 | | - | |
1068 | | - | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
1069 | 1107 | | |
1070 | 1108 | | |
1071 | 1109 | | |
| |||
1178 | 1216 | | |
1179 | 1217 | | |
1180 | 1218 | | |
1181 | | - | |
1182 | | - | |
1183 | | - | |
1184 | | - | |
1185 | | - | |
1186 | | - | |
1187 | | - | |
1188 | | - | |
1189 | | - | |
1190 | | - | |
1191 | | - | |
1192 | | - | |
1193 | | - | |
1194 | | - | |
1195 | | - | |
1196 | | - | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
1197 | 1227 | | |
1198 | 1228 | | |
1199 | 1229 | | |
1200 | 1230 | | |
1201 | 1231 | | |
1202 | 1232 | | |
1203 | 1233 | | |
| 1234 | + | |
| 1235 | + | |
1204 | 1236 | | |
1205 | 1237 | | |
1206 | 1238 | | |
| |||
0 commit comments