Skip to content

Commit c37b903

Browse files
actionState progress monitoring
1 parent 2a66fe9 commit c37b903

File tree

1 file changed

+55
-1
lines changed

1 file changed

+55
-1
lines changed

articles/operator-nexus/howto-bare-metal-best-practices.md

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,60 @@ Message=[SYS043: Successfully exported Server Configuration Profile]
125125
Percent Complete=[100]
126126
```
127127

128+
#### Monitor progress using `run-read-command`
129+
130+
You can monitor the progress of long running Bare Metal Machine actions using a `run-read-command`.
131+
132+
- Some long running actions such as `Replace` or `Reimage` are composed of multiple steps, for example, `Hardware Validation`, `Deprovisioning`, or `Provisioning`.
133+
- The following `run-read-command` shows how to view the different steps in each action, and the progress or status of each step including any potential errors.
134+
- This information is available on the BareMetalMachine kubernetes resource during or after the action is completed.
135+
- For more information about the `run-read-command` feature, see [BareMetal Run-Read Execution](./howto-baremetal-run-read.md).
136+
137+
Example `run-read-command` to view action progress on Bare Metal Machine `rack2compute08`:
138+
139+
```azurecli
140+
az networkcloud baremetalmachine run-read-command \
141+
-g <ResourceGroup_Name> \
142+
-n <Control Node BMM Name> \
143+
--limit-time-seconds 60 \
144+
--commands "[{command:'kubectl get',arguments:[-n,nc-system,bmm,rack2compute08,-o,json]}]" \
145+
--output-directory .
146+
```
147+
148+
Example output for a Replace action:
149+
150+
```json
151+
[
152+
{
153+
"correlationId": "961a6154-4342-4831-9693-27314671e6a7",
154+
"endTime": "2025-05-15T21:20:44Z",
155+
"startTime": "2025-05-15T20:16:19Z",
156+
"status": "Completed",
157+
"stepStates": [
158+
{
159+
"endTime": "2025-05-15T20:25:51Z",
160+
"name": "Hardware Validation",
161+
"startTime": "2025-05-15T20:16:19Z",
162+
"status": "Completed"
163+
},
164+
{
165+
"endTime": "2025-05-15T20:26:21Z",
166+
"name": "Deprovisioning",
167+
"startTime": "2025-05-15T20:25:51Z",
168+
"status": "Completed"
169+
},
170+
{
171+
"endTime": "2025-05-15T21:20:44Z",
172+
"name": "Provisioning",
173+
"startTime": "2025-05-15T20:26:21Z",
174+
"status": "Completed"
175+
}
176+
],
177+
"type": "Microsoft.NetworkCloud/bareMetalMachines/replace"
178+
}
179+
]
180+
```
181+
128182
## Best practices for a Bare Metal Machine reimage
129183

130184
The Bare Metal Machine (BMM) `reimage` action is explained in [Bare Metal Machine Lifecycle Management Commands] and scenario procedures described in [Troubleshoot Azure Operator Nexus Server Problems].
@@ -176,7 +230,7 @@ Before initiating any `replace` operation, ensure the following preconditions ar
176230
- Perform high level checks covered in the article [Troubleshoot Bare Metal Machine Provisioning].
177231
- Evaluate any Bare Metal Machine warnings or degraded conditions which could indicate the need to resolve hardware, network, or server configuration problems before a `replace` operation.
178232
For more information, see [Troubleshoot Degraded Status Errors on Bare Metal Machines] and [Troubleshoot Bare Metal Machine Warning Status].
179-
- Validate Bare Metal Machine has been powered on.
233+
- Validate Bare Metal Machine is powered on.
180234
- Validate that there are no running firmware upgrade jobs.
181235
Follow steps in section [Determine if Firmware Update Jobs are Running](#determine-if-firmware-update-jobs-are-running).
182236

0 commit comments

Comments
 (0)