Skip to content

Commit 389ae8a

Browse files
committed
Minor fixes according to latest GNOI backend changes
1 parent c7b4ab5 commit 389ae8a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/reboot_smartswitch_helper

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ function log_message() {
1313
# Function to check if running on smart switch
1414
function is_smartswitch()
1515
{
16-
python3 -c "from utilities_common.chassis import is_smartswitch; print(is_smartswitch())" | grep -q "True"
16+
python3 -c "from utilities_common.chassis import is_smartswitch; print(is_smartswitch())" | grep "True"
1717
}
1818

1919
# Function to check if running on DPU
2020
function is_dpu()
2121
{
22-
python3 -c "from utilities_common.chassis import is_dpu; print(is_dpu())" | grep -q "True"
22+
python3 -c "from utilities_common.chassis import is_dpu; print(is_dpu())" | grep "True"
2323
}
2424

2525
# Function to retrieve number of DPUs
@@ -147,7 +147,7 @@ function gnmi_reboot_dpu()
147147
return ${EXIT_ERROR}
148148
fi
149149

150-
$(docker exec gnmi gnoi_client -target ${dpu_ip}:${port} -logtostderr -notls -module System -rpc Reboot -jsonin '{"method":HALT}' &>/dev/null)
150+
$(docker exec gnmi gnoi_client -target ${dpu_ip}:${port} -logtostderr -notls -module System -rpc Reboot -jsonin '{"method":3, "message":"User initiated reboot"}' &>/dev/null)
151151
if [ $? -ne 0 ]; then
152152
log_message "ERROR: Failed to send gnoi command to halt services on ${DPU_NAME}"
153153
log_message "ERROR: proceeding without halting the services"

0 commit comments

Comments
 (0)