Merge ~mfo/maas:lp2020397-validation-preseed into maas:master

Proposed by Mauricio Faria de Oliveira
Status: Rejected
Rejected by: Mauricio Faria de Oliveira
Proposed branch: ~mfo/maas:lp2020397-validation-preseed
Merge into: maas:master
Diff against target: 15 lines (+4/-1)
1 file modified
src/maasserver/preseed.py (+4/-1)
Reviewer Review Type Date Requested Status
MAAS Lander Approve
Adam Collard Pending
Review via email: mp+446216@code.staging.launchpad.net

Commit message

LP: #2020397 - preseed overrides for custom image dependency validation

Custom images without package manager (chiselled/locked-down)
fail the (curtin) late_commands for dependency validation as
of MAAS 3.2 (but worked before).

These validations are an improvement for MAAS robustness, but
unfortunately are a regression for some users/images, and may
not allow them to upgrade MAAS (deployments now fail).

This is a corner case for a few expert users with deployments
that are significantly reliant on MAAS, so a contained change
would do.

MAAS could allow them to use the curtin_userdata preseed to
override the default commands for validations with commands
that work in their images. (Note: validations still needed!)

Tests:
=====

Steps: download centos70 image, upload as custom, deploy.
       (do not set base_image to centos on purpose.)

No overrides (default):

        start: cmd-install/stage-late/98-validate-custom-image-has-cloud-init: running 'curtin in-target -- bash -c dpkg-query -s cloud-init || (echo "cloud-init not detected, MAAS will not be able to configure this machine properly" && exit 1)'
        ...
        bash: dpkg-query: command not found
        cloud-init not detected, MAAS will not be able to configure this machine properly
        ...
        finish: cmd-install/stage-late: FAIL: executing late commands

Override 1 out of 2 checks:

        late_commands:
          98-validate-custom-image-has-cloud-init: ['ls', '/usr/bin/cloud-init']

        start: cmd-install/stage-late/98-validate-custom-image-has-cloud-init: running 'ls /usr/bin/cloud-init'
        /usr/bin/cloud-init
        finish: cmd-install/stage-late/98-validate-custom-image-has-cloud-init: SUCCESS: running 'ls /usr/bin/cloud-init'

        start: cmd-install/stage-late/99-validate-custom-image-has-netplan.io: running 'curtin in-target -- bash -c dpkg-query -s netplan.io || (echo "netplan.io not detected, MAAS will not be able to configure this machine properly" && exit 1)'
        ...
        bash: dpkg-query: command not found
        netplan.io not detected, MAAS will not be able to configure this machine properly
        ...
        finish: cmd-install/stage-late: FAIL: executing late commands

Override 2 out of 2 checks:

        late_commands:
          98-validate-custom-image-has-cloud-init: ['ls', '/usr/bin/cloud-init']
          99-validate-custom-image-has-netplan.io: ['echo', 'this custom image does not use netplan']

        start: cmd-install/stage-late/98-validate-custom-image-has-cloud-init: running 'ls /usr/bin/cloud-init'
        /usr/bin/cloud-init
        finish: cmd-install/stage-late/98-validate-custom-image-has-cloud-init: SUCCESS: running 'ls /usr/bin/cloud-init'

        start: cmd-install/stage-late/99-validate-custom-image-has-netplan.io: running 'echo this custom image does not use netplan'
        this custom image does not use netplan
        finish: cmd-install/stage-late/99-validate-custom-image-has-netplan.io: SUCCESS: running 'echo this custom image does not use netplan'
        ...
        finish: cmd-install/stage-late: SUCCESS: executing late commands

Signed-off-by: Mauricio Faria de Oliveira <email address hidden>

Description of the change

P.S.: I can add/submit unit tests if you think the change is OK.

To post a comment you must log in.
Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :

(copy/paste comment from the bug)

Hi MAAS bug-council,

Could you please consider this last attempt for a code change
to help users w/ custom images without a package manager?

It's certainly understandable if the MAAS direction is not to
allow this _at all_, but in that case, we likely should have
something for such users in our docs (I can send patches too).

Please let me know your thoughts / next steps to take.

Thanks,
Mauricio

Revision history for this message
MAAS Lander (maas-lander) wrote :

UNIT TESTS
-b lp2020397-validation-preseed lp:~mfo/maas/+git/maas into -b master lp:~maas-committers/maas

STATUS: SUCCESS
COMMIT: dfe7795f17a5d6af3e1671b651c2440e7d9c0494

review: Approve

There was an error fetching revisions from git servers. Please try again in a few minutes. If the problem persists, contact Launchpad support.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches