Skip to content

Conversation

kreeuwijk
Copy link
Contributor

@kreeuwijk kreeuwijk commented Aug 6, 2025

Change description

The MaaS support added to image-builder contained hardcoded hooks and scripts for curtin. However, MaaS has since evolved and now includes all those steps (and more) already builtin. The builtin steps are more powerful & flexible, and should be used instead. For example, the builtin properly reconfigures the UEFI boot order (to keep PXE at the top) and handles situations where the MaaS proxy should be used for APT package updates.

Hence, this PR comments out the copying of the hardcoded curtin files for MaaS, so that the standard curtin hooks from MaaS can be used instead.

  • Is this change including a new Provider or a new OS? (y/n) n

Related issues

  • Fixes issues with the UEFI boot order not getting repaired, and MaaS proxy scenarios not working for custom MaaS images generated by this builder.

Additional context

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign averagemarcus for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Aug 6, 2025
@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Aug 6, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @kreeuwijk. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Aug 6, 2025
@mboersma
Copy link
Contributor

mboersma commented Aug 7, 2025

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 7, 2025
@mboersma
Copy link
Contributor

mboersma commented Aug 8, 2025

/retest

@AverageMarcus
Copy link
Member

/assign @vasartori

Copy link
Contributor

@drew-viles drew-viles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@vasartori are you able to take a look at this?

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 21, 2025
@moondev
Copy link

moondev commented Sep 8, 2025

@kreeuwijk Do you know the specific MaaS version that started including these curtin hooks by default?

However, MaaS has since evolved and now includes all those steps (and more) already builtin.

For all MaaS versions previous to this new change, it would seem leaving the hooks out would build a non bootable image. Perhaps a maas_version variable could conditionally add the hooks, or at the least call it out in the README.

The image-builder release that first included support for MaaS was July 4 https://github.com/kubernetes-sigs/image-builder/releases/tag/v0.1.45

Have the new hooks only landed in MaaS 3.7.0~beta1?

@kreeuwijk
Copy link
Contributor Author

@moondev MaaS doesn't ship its own curtin hooks, it just installs the python3-curtin package. They are then present on the server as:

/snap/maas/current/usr/lib/python3/dist-packages/curtin/commands/curthooks.py

So that means there's no dependency on the MaaS version; any version will install the latest python3-curtin package, which has all the hooks you could wish for.

@moondev
Copy link

moondev commented Sep 8, 2025

@moondev MaaS doesn't ship its own curtin hooks, it just installs the python3-curtin package. They are then present on the server as:

/snap/maas/current/usr/lib/python3/dist-packages/curtin/commands/curthooks.py

So that means there's no dependency on the MaaS version; any version will install the latest python3-curtin package, which has all the hooks you could wish for.

Thanks for the clarification and great to hear images won't be fragmented by their destination MaaS version. Cheers.

@drew-viles
Copy link
Contributor

So I'm happy with this in theory but I'm not a user of MAAS so cannot confirm anythign from my side. I was hoping @vasartori would be able to check this out as they are the original contributor of the MAAS code.

If they don't come back soon and we're all happy I'm happy to approve this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants