Merge lp://qastaging/~mpontillo/maas/fix-curtin-custom-driver-preseed--bug-1667426 into lp://qastaging/~maas-committers/maas/trunk
Status: | Merged |
---|---|
Approved by: | Mike Pontillo |
Approved revision: | no longer in the source branch. |
Merged at revision: | 5756 |
Proposed branch: | lp://qastaging/~mpontillo/maas/fix-curtin-custom-driver-preseed--bug-1667426 |
Merge into: | lp://qastaging/~maas-committers/maas/trunk |
Diff against target: |
108 lines (+65/-2) 2 files modified
contrib/preseeds_v2/curtin_userdata (+16/-2) src/maasserver/tests/test_preseed.py (+49/-0) |
To merge this branch: | bzr merge lp://qastaging/~mpontillo/maas/fix-curtin-custom-driver-preseed--bug-1667426 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Lee Trager (community) | Approve | ||
Review via email: mp+318168@code.qastaging.launchpad.net |
Commit message
Fix curtin config rendering for third-party drivers.
Description of the change
It seems that third-party driver functionality in MAAS has gone unused since the move to MAAS 2.x. We have a bug leftover from the Python 2 -> Python 3 conversion which caused the (binary format) APT keys in drivers.yaml to fail to be rendered.
This branch also makes the YAML template more robust in the following ways:
- Gracefully handle missing keys by leaving commands out of the YAML rather than raising a difficult-to-debug exception during deployment.
- Nodes will no longer fail to deploy if the kernel module specified in drivers.yaml fails to be inserted. If the deployment succeeds anyway, this is something that will either be automatically corrected post-deployment (because a DKMS package was installed), OR would likely be a known issue with the driver that can be corrected by the user post-deployment. So this has been changed from a failure condition to a warning. (As a side effect, this allows custom drivers which do not require a kernel module to be used, but this branch does not add tests for that.)
- If keys are missing from drivers.yaml, preseed generation should no longer crash and time out deployment with no visible error. The deployment will simply proceed without the missing keys. (As a side effect, this should allow the third-party driver feature to install custom packages that do not necessarily need a custom repository to work, but this branch does not add tests for that.)
LGTM!