Merge ~wpk/maas:IPXE-Boot into maas:master
| Status: | Needs review |
|---|---|
| Proposed branch: | ~wpk/maas:IPXE-Boot |
| Merge into: | maas:master |
| Diff against target: |
363 lines (+136/-7) 18 files modified
src/maasserver/models/node.py (+1/-1) src/provisioningserver/boot/__init__.py (+15/-0) src/provisioningserver/boot/ipxe.py (+83/-0) src/provisioningserver/boot/open_firmware_ppc64el.py (+1/-0) src/provisioningserver/boot/powernv.py (+1/-0) src/provisioningserver/boot/pxe.py (+1/-0) src/provisioningserver/boot/uefi_amd64.py (+1/-0) src/provisioningserver/boot/uefi_arm64.py (+1/-0) src/provisioningserver/boot/windows.py (+1/-0) src/provisioningserver/dhcp/config.py (+15/-4) src/provisioningserver/templates/dhcp/dhcpd6.conf.template (+1/-0) src/provisioningserver/templates/ipxe/config.commissioning.template (+1/-0) src/provisioningserver/templates/ipxe/config.enlist.template (+1/-0) src/provisioningserver/templates/ipxe/config.install.template (+5/-0) src/provisioningserver/templates/ipxe/config.local.template (+2/-0) src/provisioningserver/templates/ipxe/config.poweroff.template (+3/-0) src/provisioningserver/templates/ipxe/config.xinstall.template (+1/-0) src/provisioningserver/utils/registry.py (+2/-2) |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| MAAS Lander | Needs Fixing on 2017-10-27 | ||
| Blake Rouse | 2017-10-20 | Needs Fixing on 2017-10-23 | |
|
Review via email:
|
|||
Description of the Change
This change introduces iPXE boot method - iPXE (used for example by virsh pods, but it can also be burned into ROM and used in servers) can load kernel and initrd directly without any intermediate bootloader as pxelinux.0. It also, unlike pxelinux.0, works on IPv6.
| Andres Rodriguez (andreserl) wrote : | # |
Olease do not land this in MAAS 2.3, as it is now closed for development.
This will need to wait until 2.4 is open!
On Mon, Oct 23, 2017 at 9:27 AM Blake Rouse <email address hidden>
wrote:
> Review: Needs Fixing
>
> These changes look great, I like the idea of support iPXE directly instead
> of chainloading pxelinux.0.
>
> You are missing unit tests. You need to add unit tests for your new boot
> method, the changes to the boot method generation code for dhcpd
> configurations.
>
> Also have a couple of questions.
>
> Diff comments:
>
> > diff --git a/src/provision
> b/src/provision
> > index 160d30d..9af33e3 100644
> > --- a/src/provision
> > +++ b/src/provision
> > @@ -83,12 +84,21 @@ else {
> > class DHCPConfigError
> > """Exception raised for errors processing the DHCP config."""
> >
> > +def user_class_
> > + """isc-dhcp does not understand dhcpv6 User Class option as string,
> > + so we need to give it to it as a series of octets."""
> > + if value is None or value == "" or len(value) > 65535:
> > + return None
> > + rv = "%.2x:%.2x:" % (len(value)//256, len(value)%256)
>
> I beleive this should fail lint, as operations should be seperated by
> spaces.
>
> rv = "%.2x:%.2x:" % (len(value) // 256, len(value) % 256)
>
> > + rv += ":".join(map(lambda x: "%.2x" % ord(x), value))
> > + return rv
> >
> > def compose_
> > output = ""
> > behaviour = chain(["if"], repeat("elsif"))
> > for name, method in BootMethodRegistry:
> > - if method.arch_octet is not None:
> > + if method.arch_octet is not None or method.user_class is not
> None:
> > + hexified_user_class = user_class_
> > url = ('tftp://[%s]/' if ipv6 else 'tftp://%s/') % rack_ip
> > if method.path_prefix:
> > url += method.path_prefix
> > diff --git
> a/src/provision
> b/src/provision
> > new file mode 100644
> > index 0000000..bf87001
> > --- /dev/null
> > +++ b/src/provision
> > @@ -0,0 +1,5 @@
> > +#!ipxe
> > +kernel {{kernel_params | kernel_path }}
> > +imgargs {{kernel_params | kernel_name }} {{kernel_params |
> kernel_command}} BOOTIF=
>
> ${net_default_mac} is a grub thing? Is it the same for iPXE?
>
> > +initrd {{kernel_params | initrd_path }}
> > +boot
> > \ No newline at end of file
>
>
> --
> https:/
> Your team MAAS Committers is subscribed to branch maas:master.
>
--
Andres Rodriguez
Engineering Manager, MAAS
Canonical USA, Inc.
| MAAS Lander (maas-lander) wrote : | # |
UNIT TESTS
-b IPXE-Boot lp:~wpk/maas into -b master lp:~maas-committers/maas
STATUS: FAILED
LOG: http://
COMMIT: b0150ac402c00d3
| MAAS Lander (maas-lander) wrote : | # |
UNIT TESTS
-b IPXE-Boot lp:~wpk/maas into -b master lp:~maas-committers/maas
STATUS: FAILED
LOG: http://
COMMIT: b0150ac402c00d3
| MAAS Lander (maas-lander) wrote : | # |
UNIT TESTS
-b IPXE-Boot lp:~wpk/maas into -b master lp:~maas-committers/maas
STATUS: FAILED
LOG: http://
COMMIT: b0150ac402c00d3
| MAAS Lander (maas-lander) wrote : | # |
UNIT TESTS
-b IPXE-Boot lp:~wpk/maas into -b master lp:~maas-committers/maas
STATUS: FAILED
LOG: http://
COMMIT: b0150ac402c00d3
Unmerged commits
- b0150ac... by Witold Krecicki on 2017-10-20
- d310824... by Witold Krecicki on 2017-10-20
- 95a3f7e... by Witold Krecicki on 2017-10-13
- 6e06021... by Witold Krecicki on 2017-09-28
- 5648a31... by Witold Krecicki on 2017-09-19


These changes look great, I like the idea of support iPXE directly instead of chainloading pxelinux.0.
You are missing unit tests. You need to add unit tests for your new boot method, the changes to the boot method generation code for dhcpd configurations.
Also have a couple of questions.