Mellanox/mstflint

mstconfig always suggest to reboot

champtar opened this issue · 2 comments

Hello Mellanox team,

I'm building an "appliance", on boot I want to set some settings and reboot if needed only.
(the settings might change in a future update, so it need to be run on each boot)

Right now mstconfig always suggests to reboot even if there are no changes.

It would be great to just have to parse the last line to decide to reboot or not,
or better yet being able to pass a command that get executed when a reboot is really needed.

# mstconfig -d 5e:00.0 set SRIOV_EN=1 NUM_OF_VFS=8

Device #1:
----------

Device type:    ConnectX5       
Name:           MCX512A-ACA_Ax_Bx
Description:    ConnectX-5 EN network interface card; 10/25GbE dual-port SFP28; PCIe3.0 x8; tall bracket; ROHS R6
Device:         5e:00.0         

Configurations:                              Next Boot       New
         SRIOV_EN                            True(1)         True(1)         
         NUM_OF_VFS                          8               8               

 Apply new Configuration? (y/n) [n] : y
Applying... Done!
-I- Please reboot machine to load new configurations.

Dear champtar, thank you for your suggestion.
This issue was reviewed internally in the past and the decision was to keep "recommendation for the user" as is for the time being.

There are several pitfalls that such feature will present, which i will not detail here.

As for your app, if you know parameters haven't changed, you do not need to reboot.
better yet i would advise you to run "mstconfig -d 5e:00.0 q SRIOV_EN" to get the current value of the parameter and avoid the set if dont need to.
your app can run this query / set pair of commands per parameter, and know if you need to reset or not.
you can also use the -y flag with set commands to skip the [y/n] user input at the end of the set command.

Thanks for the quick answer, much appreciated