Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AGENT-498: Get iPXE script template kernel parameters from ISO #7150

Conversation

pawanpinjarkar
Copy link
Contributor

@pawanpinjarkar pawanpinjarkar commented May 1, 2023

Read the default kernel args from the coreos/kargs.json file from the base iso
such as ignition.firstboot ignition.platform.id=metal and add it to the iPXE script.

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented May 1, 2023

@pawanpinjarkar: This pull request references AGENT-498 which is a valid jira issue.

In response to this:

Read the config file from the base iso at EFI/redhat/grub.cfg(UEFI) else Fall back to /isolinux/isolinux.cfg (legacy boot). Extract the kernel params such as ignition.firstboot ignition.platform.id=metal and add it to the iPXE script.

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/test-infra repository.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label May 1, 2023
@pawanpinjarkar
Copy link
Contributor Author

/hold for #7102 and #6723

@openshift-ci openshift-ci bot requested review from dhellmann and rwsu May 1, 2023 15:10
@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 1, 2023
@pawanpinjarkar
Copy link
Contributor Author

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 26, 2023
@pawanpinjarkar pawanpinjarkar force-pushed the read-kernel-params-from-base-iso branch from 8db37d2 to 0c4bb59 Compare May 31, 2023 13:25
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Jun 5, 2023

@pawanpinjarkar: This pull request references AGENT-498 which is a valid jira issue.

In response to this:

Read the file paths from the coreos/kargs.json file from the base iso
and then read the file data at EFI/redhat/grub.cfg(UEFI)
else Fall back to /isolinux/isolinux.cfg (legacy boot).
Extract the kernel params such as ignition.firstboot ignition.platform.id=metal
and add it to the iPXE script.

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/test-infra repository.

pkg/asset/agent/image/agentpxefiles.go Outdated Show resolved Hide resolved
pkg/asset/agent/image/agentpxefiles.go Outdated Show resolved Hide resolved
@pawanpinjarkar pawanpinjarkar force-pushed the read-kernel-params-from-base-iso branch from ac16e92 to 5b274f1 Compare June 6, 2023 22:07
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Jun 6, 2023

@pawanpinjarkar: This pull request references AGENT-498 which is a valid jira issue.

In response to this:

Read the default kernel args from the coreos/kargs.json file from the base iso
such as ignition.firstboot ignition.platform.id=metal and add it to the iPXE script.

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/test-infra repository.

@pawanpinjarkar pawanpinjarkar force-pushed the read-kernel-params-from-base-iso branch from 5b274f1 to 5528e50 Compare June 6, 2023 22:11
@pawanpinjarkar pawanpinjarkar force-pushed the read-kernel-params-from-base-iso branch 3 times, most recently from c305e1a to 0af2d1f Compare June 20, 2023 14:23
@jhixson74
Copy link
Member

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jun 20, 2023
@pawanpinjarkar
Copy link
Contributor Author

/test e2e-agent-compact-ipv4

@@ -97,6 +110,7 @@ func (a *AgentPXEFiles) PersistToFile(directory string) error {
if err != nil {
return err
}
defer fileReader.Close()
Copy link
Contributor

Choose a reason for hiding this comment

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

Even though defer immediately evaluates the statement for the post-poned execution (so that the subsequent reassignment of fileReader does not impact this Close()), for the sake of clarify I think it's better to use different var names for the two files opened (in relation to rootfs.img and vmlinuz)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@@ -179,3 +194,26 @@ boot

return nil
}

func getKernelArgs(isoPath, file string) (string, error) {
fileReader, err := isoeditor.GetFileFromISO(isoPath, file)
Copy link
Contributor

Choose a reason for hiding this comment

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

Couldn't be retrieved also this one from the tmp path?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Signed-off-by: Pawan Pinjarkar <ppinjark@redhat.com>
@pawanpinjarkar pawanpinjarkar force-pushed the read-kernel-params-from-base-iso branch from 0af2d1f to 5459998 Compare June 21, 2023 15:10
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Jun 21, 2023
@andfasano
Copy link
Contributor

/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 22, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andfasano

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

The pull request process is described 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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 22, 2023
@mhanss
Copy link
Contributor

mhanss commented Jun 22, 2023

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jun 22, 2023
@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 9490a4b and 2 for PR HEAD 5459998 in total

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 22, 2023

@pawanpinjarkar: all tests passed!

Full PR test history. Your PR dashboard.

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/test-infra repository. I understand the commands that are listed here.

@openshift-merge-robot openshift-merge-robot merged commit c941665 into openshift:master Jun 22, 2023
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants