Describe the bug
When making a POST request to BSS to add boot parameters, the list of MAC addresses is not checked for validity. This issue was discovered while using the Ochami CLI to add boot parameters via a YAML file. While BSS should definitely validate the format of the boot parameters payload, it would be helpful for the CLI to also validate before sending it.
To Reproduce
This bug can be reproduced by using ochami-cli to add boot parameters using a YAML file.
Create a "bad" YAML config file, e.g. cluster-boot-config-mlnx.yaml:
Expected behavior
Catch the misformatted MAC address list and return a 400 Bad Request.
Mitigations
If bad boot parameter data is added, the only way to delete it without restarting is to delete all nodes in BSS whose boot parameters match those from the bad data.
Create the YAML with only the boot parameter data and no nodes, e.g. delete-mlnx-bootparams.yaml:
Describe the bug When making a POST request to BSS to add boot parameters, the list of MAC addresses is not checked for validity. This issue was discovered while using the Ochami CLI to add boot parameters via a YAML file. While BSS should definitely validate the format of the boot parameters payload, it would be helpful for the CLI to also validate before sending it.
To Reproduce This bug can be reproduced by using
ochami-cli
to add boot parameters using a YAML file.cluster-boot-config-mlnx.yaml
:Notice that the first MAC address in the
macs
list is not indented while the rest are indented.The MAC address list will be misformatted:
Expected behavior Catch the misformatted MAC address list and return a 400 Bad Request.
Mitigations If bad boot parameter data is added, the only way to delete it without restarting is to delete all nodes in BSS whose boot parameters match those from the bad data.
delete-mlnx-bootparams.yaml
:ochami-cli
to delete: