Build kernel param list on /bootscript with JSON URL param turned on#75
Build kernel param list on /bootscript with JSON URL param turned on#75synackd merged 9 commits intoOpenCHAMI:mainfrom
Conversation
Signed-off-by: Almond Heil <aheil@lanl.gov>
Signed-off-by: Almond Heil <aheil@lanl.gov>
c3589a9 to
6e2875c
Compare
This example return value is based on the example above, but neither is completely accurate to what BSS currently does with its params. In particular, these examples lack the params initrd, mac, nid, and ds which get added automatically in buildBootScript(). Signed-off-by: Almond Heil <aheil@lanl.gov>
Signed-off-by: Almond Heil <aheil@lanl.gov>
Signed-off-by: Almond Heil <aheil@lanl.gov>
dda47a8 to
91e0245
Compare
Signed-off-by: Almond Heil <aheil@lanl.gov>
567e9c4 to
4b77c1a
Compare
Signed-off-by: Almond Heil <aheil@lanl.gov>
3ebe68f to
80831bb
Compare
Signed-off-by: Almond Heil <aheil@lanl.gov>
|
@aheil-lanl Does this need additional testing? Would you mind posting how you tested this if you have? |
|
@synackd I've tested this manually on a small scale. I made sure that nodes booted normally and the behavior of I'm not aware of any additional testing that needs to be done. |
|
Sounds good. I think the only thing left to be tested is to make sure the parameters match with and without |
|
I've also been able to test that manually, I forgot to mention it. Without When the node boots its With The node's |
|
I've tested this with a VM. yields: {
"params": "kernel initrd=initrd nomodeset ro root=live:http://172.16.0.254:9000/boot-images/compute/base/rocky9.6-compute-base-rocky9 ip=dhcp overlayroot=tmpfs overlayroot_cfgdisk=disabled apparmor=0 selinux=0 console=ttyS0,115200 ip6=off cloud-init=enabled ds=nocloud-net;s=http://172.16.0.254:8081/cloud-init xname=x1000c0s0b0n0 nid=1",
"kernel": {
"path": "http://172.16.0.254:9000/boot-images/efi-images/compute/base/vmlinuz-5.14.0-570.58.1.el9_6.x86_64"
},
"initrd": {
"path": "http://172.16.0.254:9000/boot-images/efi-images/compute/base/initramfs-5.14.0-570.58.1.el9_6.x86_64.img"
}
}yields: The difference in the JSON is: diff --git a/old.json b/new.json
index a93cde3..5b693bd 100644
--- a/old.json
+++ b/new.json
@@ -1,5 +1,5 @@
{
- "params": "nomodeset ro root=live:http://172.16.0.254:9000/boot-images/compute/base/rocky9.6-compute-base-rocky9 ip=dhcp overlayroot=tmpfs overlayroot_cfgdisk=disabled apparmor=0 selinux=0 console=ttyS0,115200 ip6=off cloud-init=enabled ds=nocloud-net;s=http://172.16.0.254:8081/cloud-init",
+ "params": "kernel initrd=initrd nomodeset ro root=live:http://172.16.0.254:9000/boot-images/compute/base/rocky9.6-compute-base-rocky9 ip=dhcp overlayroot=tmpfs overlayroot_cfgdisk=disabled apparmor=0 selinux=0 console=ttyS0,115200 ip6=off cloud-init=enabled ds=nocloud-net;s=http://172.16.0.254:8081/cloud-init xname=x1000c0s0b0n0 nid=1",
"kernel": {
"path": "http://172.16.0.254:9000/boot-images/efi-images/compute/base/vmlinuz-5.14.0-570.58.1.el9_6.x86_64"
},Looks like the parameters are preceded by It looks like it works, but I'm not sure I fully understand the use case for this change. Would you mind elaborating? |
synackd
left a comment
There was a problem hiding this comment.
I tested this and it looks good. Just one tiny change, and I think we can merge this.
68e0b6e to
6be1f92
Compare
Signed-off-by: Almond Heil <aheil@lanl.gov>
6be1f92 to
92c529c
Compare
Pull Request Template
Thank you for your contribution! Please ensure the following before submitting:
Checklist
make test(or equivalent) locally and all tests passgit commit -s) with my real name and email<filename>.licensesidecarLICENSES/directoryDescription
The JSON URL parameter added in #71 does not fully reflect how /bootscript works without it. Due to this, the kernel parameter list of the boot script is wrong when using the JSON URL parameter.
To fix this, I refactored the parameter list building into its own function. This allows the function to be called both when building an iPXE boot script and when building a JSON boot script, making the kernel parameter lists match.
I've also added tests and documentation, although both need more discussion for whether further changes are needed.
Why much of the checklist isn't checked
These are my explanations for all the items I left unchecked. I'm open to making changes to match these, but I don't have enough information to take action as I write this.
Type of Change
For more info, see Contributing Guidelines.