Skip to content

Conversation

Rozzii
Copy link
Member

@Rozzii Rozzii commented Jun 24, 2025

This commit:

  • Introduces the proposal for BMH support for node specific extra kernel command line arguments for pre-provisioning images.

The motivation behind the commit can be found in the proposal.

@Rozzii Rozzii added the kind/feature Categorizes issue or PR as related to a new feature. label Jun 24, 2025
@metal3-io-bot metal3-io-bot requested review from lentzi90 and zaneb June 24, 2025 09:54
@metal3-io-bot
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 rozzii 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

@metal3-io-bot metal3-io-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jun 24, 2025
@Rozzii Rozzii force-pushed the node_specific_kernel_args branch 2 times, most recently from 5b3ba4c to 37d08d8 Compare June 25, 2025 05:49
@Rozzii
Copy link
Member Author

Rozzii commented Jun 25, 2025

Something that might be interesting to
/cc @dtantsur @elfosardo

Copy link
Member

@lentzi90 lentzi90 left a comment

Choose a reason for hiding this comment

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

Nice! I have just a few nits/typos and one suggestion to clarify how the strings are concatenated (with spaces?)

@Rozzii Rozzii force-pushed the node_specific_kernel_args branch from 37d08d8 to 86fa735 Compare June 25, 2025 07:21
Copy link
Member

@lentzi90 lentzi90 left a comment

Choose a reason for hiding this comment

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

/lgtm

@metal3-io-bot metal3-io-bot added the lgtm Indicates that a PR is ready to be merged. label Jun 25, 2025
@Rozzii Rozzii moved this to BMO WIP in Metal3 - Roadmap Jun 25, 2025
`preProvisionKernelArgs`
2. Extend the generic `Provisioner` interface to support the new optional field
3. Implement support for the `preProvisionKernelArgs` in the Ironic provisioner

Copy link
Member

Choose a reason for hiding this comment

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

You also need to extend the PreprovisioningImage object to accept these params.

Copy link
Member Author

Choose a reason for hiding this comment

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

We can keep them separate, I didn't intend to make this new spec to be applied for the "PreprovisioningImage" I thought that already has a spec for this purpose.

Copy link
Member

@dtantsur dtantsur Jul 23, 2025

Choose a reason for hiding this comment

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

That will create a wild inconsistency that will cause users file bugs for me with "preprovisioningExtraKernelParams does not work" :( Because they'll expect OpenShift's version of Metal3 to work the same way as upstream, and without PPI support it won't.

Copy link
Member

Choose a reason for hiding this comment

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

Btw it's fair if you ask me to follow-up with PPI support myself if you don't have cycles for that. I just want it to be in the design.

Copy link
Member Author

Choose a reason for hiding this comment

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

I have already looked into it, my original impression was that the user is already able to set the Kernel Args via the preprovisioningImage CR's spec but now I understand that it is not possible as on that CR the kernel args are only part of the status and not the spec. I have also checked https://github.com/openshift/image-customization-controller so I am more familiar with the use-case of the preprovisioningImage CR.

Based on what I know now It makes sense to include preprovisioningImage in the proposal.

@metal3-io-bot
Copy link
Contributor

New changes are detected. LGTM label has been removed.

@metal3-io-bot metal3-io-bot removed the lgtm Indicates that a PR is ready to be merged. label Jul 22, 2025
@Rozzii
Copy link
Member Author

Rozzii commented Jul 22, 2025

WIP implementation: metal3-io/baremetal-operator#2576 at the moment without tests, but functionally this already worked .

EDIT: status and the preprovImage CR support is missing ATM

@Rozzii Rozzii force-pushed the node_specific_kernel_args branch from adaaa1c to 32dba0a Compare July 22, 2025 12:57
@Rozzii Rozzii changed the title propose node specific pre-provisioning kernel args propose additional node specific pre-provisioning kernel args Jul 22, 2025
@Rozzii Rozzii force-pushed the node_specific_kernel_args branch 3 times, most recently from 1da861b to f09084e Compare July 25, 2025 11:56
This commit:

- Introduces the proposal for BMH support for additional node specific kernel
  command line arguments for non dynamically built pre-provisioning images.

The motivation behind the commit can be found in the proposal.

Signed-off-by: Adam Rozman <[email protected]>
@Rozzii Rozzii force-pushed the node_specific_kernel_args branch from f09084e to 2b1740b Compare July 25, 2025 11:57
Comment on lines +36 to +38
5. Introducing a `preprovisioningExtraKernelParams` related status field that
would display the last applied `preprovisioningExtraKernelParams` value.
Let's call this field `status.lastAppliedPreprovisioningExtraKernelParams`
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps something shorter would be easier but I don't have strong opinion on this
Example, status.lastAppliedKernelParams

Copy link
Member Author

Choose a reason for hiding this comment

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

I have been thinking about this, and our offline discussions and now I am on the opinion that I should separate this status topic to a different proposal/discussion, because right now we don't really provide status for applying provisioning or preprvisioning data to Ironic API so we might need a more comprehensive approach to give feedback about what, user/network/meta data and what preprovisioning data was applied. We might also need a status flag to show if the previously mentioned data references/values have changed since the last LCM operation (inspect,provision,deprovision,clean, service).

If I would leave the status topic out from the proposal I think it would be still aligned with our current feedback mechanism (or the lack of it) and then we can improve our feedback mechanism with the followup proposal.

Comment on lines +32 to +35
4. Combine the values of the `preprovisioningExtraKernelParams` and the
`preprovisioningImage`'s `status.extraKernelParams` field if a
`preprovisioningImage` is refferences by the BMH and teh `status.extraKernelParams`
is not empty
Copy link
Member

@fmuyassarov fmuyassarov Jul 28, 2025

Choose a reason for hiding this comment

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

Is it a good idea to construct a value of a field from two different sources? I imagine things might go wrong, for example how do we handle a case when prepovisioningImage object referenced by BMH doesn't exist for some reason?

Does this mean that a node might have different kernel parameters compared to what is asked via .spec.preprovisioningExtraKernelParams, in case preprovisioningImage status.extraKernelParams has something non-empty? Should not we have a single source of truth for defining the parameters and I guess the status sub-resource was never meant for defining the parameters but more for summarizing the current state right? Perhaps whoever writes into status.extraKernelParams should only rely on BMH spec and not something else? Or is this a transitional state that we eventually target to move to a single source?

Copy link
Member

Choose a reason for hiding this comment

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

@dtantsur thoughts ?

3. Implement support for the `preprovisioningExtraKernelParams` in the Ironic provisioner
4. Combine the values of the `preprovisioningExtraKernelParams` and the
`preprovisioningImage`'s `status.extraKernelParams` field if a
`preprovisioningImage` is refferences by the BMH and teh `status.extraKernelParams`
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
`preprovisioningImage` is refferences by the BMH and teh `status.extraKernelParams`
`preprovisioningImage` is referenced by the BMH and the `status.extraKernelParams`

bmc:
address: idrac://192.168.122.1:6230/
credentialsName: bm0-bmc-secret
preprovisioningExtraKernelParams: "--timeout 60000 systemd.journald.forward_to_console=yes ipa-debug=1"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
preprovisioningExtraKernelParams: "--timeout 60000 systemd.journald.forward_to_console=yes ipa-debug=1"
preprovisioningExtraKernelParams: "--timeout 60000 systemd.journald.forward_to_console=yes ipa-debug=1"

### Implementation Details/Notes/Constraints

The `preprovisioningExtraKernelParams` field would be located directly under `spec`
section. The format of the new field would be a list/array of individual
Copy link
Member

Choose a reason for hiding this comment

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

This has been changes elsewhere to be a string

Suggested change
section. The format of the new field would be a list/array of individual
section. The format of the new field would be a string.
The new field would be optional and it would be considered

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

Labels

kind/feature Categorizes issue or PR as related to a new feature. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

Status: BMO WIP

Development

Successfully merging this pull request may close these issues.

5 participants