MAAS IPMI k_g validation error
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Committed
|
High
|
Unassigned | ||
3.4 |
Fix Released
|
High
|
MAAS Lander | ||
3.5 |
Fix Released
|
High
|
MAAS Lander | ||
3.6 |
Fix Committed
|
High
|
Unassigned |
Bug Description
Configure k_g value of at MAAS->security-
This can occur if the input k_g value is 40 bytes long and in hex-encoded format , as it is quite common settings in Dell idrac. The hex value needs to be converted to ascii before compare to the length which is 20 byte maxmium.
See impi implemetaion here : https:/
the code for ipmi_parse_hex is here:
https:/
The erorr "Ensure this value has at most 20 characters (it has 40)" is probably caused by MAAS skipping the hex conversion process.
If I configure the k_g under machine -> configuration -> power settings, the same long hex value is taken, but in order to make the power check work, the input value needs to be prefixed with '0x', for example, if k_g value in idrac is 1234, the k_g value in MAAS should be 0x1234
MAAS version 3.4/stable
Related branches
- Jacopo Rota: Approve
- MAAS Lander: Needs Fixing
-
Diff: 141 lines (+76/-7)4 files modifiedsrc/maasserver/forms/settings.py (+27/-2)
src/maasserver/forms/tests/test_settings.py (+27/-0)
src/metadataserver/builtin_scripts/commissioning_scripts/bmc_config.py (+15/-5)
src/metadataserver/builtin_scripts/commissioning_scripts/tests/test_bmc_config.py (+7/-0)
- Jacopo Rota: Approve
- MAAS Lander: Approve
-
Diff: 141 lines (+76/-7)4 files modifiedsrc/maasserver/forms/settings.py (+27/-2)
src/maasserver/forms/tests/test_settings.py (+27/-0)
src/metadataserver/builtin_scripts/commissioning_scripts/bmc_config.py (+15/-5)
src/metadataserver/builtin_scripts/commissioning_scripts/tests/test_bmc_config.py (+7/-0)
- Jacopo Rota: Approve
- MAAS Lander: Approve
- Jack Lloyd-Walters: Approve
-
Diff: 141 lines (+76/-7)4 files modifiedsrc/maasserver/forms/settings.py (+27/-2)
src/maasserver/forms/tests/test_settings.py (+27/-0)
src/metadataserver/builtin_scripts/commissioning_scripts/bmc_config.py (+15/-5)
src/metadataserver/builtin_scripts/commissioning_scripts/tests/test_bmc_config.py (+7/-0)
no longer affects: | maas/3.3 |
MAAS explicitly checks if the passed k_g sting is 20 characters here: https:/ /git.launchpad. net/maas/ tree/src/ maasserver/ forms/settings. py#n931
Since the ipmitool allows hex-encoded input which will be longer than 20 characters and still resolve to 20 bytes, this validation needs to be fixed (either removed or made equivalent to what the ipmitool does).