fix: Ensure hostname complies with RFC
FQDN have to be formatted according to RFC 952. This change ensures that
interface name derived hostnames comply with this format.
Resolves LP:2072155
Signed-off-by: Nicolas Bock <email address hidden>
(cherry picked from commit ee8810ea4a6dcf277248cb640dbdd3fa97cea21c)
fix: Fix controller and rack version discrepancy. Currently rackd and regiond use two different ways to update the version number.
While rackd uses `get_running_version()` inside registerRackWithRegion(), regiond makes use of `get_versions_info()` during startup as well as periodically.
The problem is that `get_running_version()` returns a MAASVersion object which contains a simplified version string (no epoch for example), `get_versions_info()` return a DebVersionsInfo or a SnapVersionsInfo depending on the installation type, and the deb version of the installation will contain a full version string.
While rackd through registerRackWithRegion() will end up calling `set_version()` inside the `ControllerInfoManager` class. Other calls to update the version from regiond will end up in `set_version_info()` of the same class.
This patch fixes the issue by converting the version string inside the `set_version_info()` class to a MAASVersion object before returning the simplifies string value.
The same has been done for `update_version`.
Resolves: #LP2058063.
(cherry picked from commit 9f9013852b65c608b2e7ccfd8569eb17ef63ef41)
feat(settings): Extended validation for IPMI k_g field in settings
Max tested length changed to 40 characters to accommodate hex-encoded k_g values. The value is passed to `ipmitool`, validated, with any errors caught and reported back through a new Django field validator.
fix(redfish): handle Reset status in Redfish power driver.
HPE Gen11 (and above) BMC might return a "Reset" or an "Unknown" status. Such statuses are transitional, so the BMC will eventually return another "known" status.
For such reason, with this change the MAAS Redfish power driver is going to retry up to 7 times to get a "known" status. If the maximum number of retries is reached, an error is returned.
Resolves: #LP2079797
(Cherry-picked from e9830dcbf6a38409c890310d972b589521fa3d3d)