[REGRESSION] ppc64el grub in bionic may be auto-generating MAC address instead of using the assigned to the VM.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
maas-images |
Fix Released
|
Undecided
|
Unassigned | ||
grub2 (Ubuntu) |
Fix Released
|
Undecided
|
Julian Andres Klode | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned | ||
grub2-signed (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
grub2 on ppc64el wrongfully configures two interfaces for the same card when running in qemu with a tftp boot. This causes net_default_mac to point to the wrong mac address, amongst other things.
[Test case]
(1) grub-mknetdir --net-directory
(2) qemu-system-ppc64le -device virtio-
grub loads successfully via tftp.
Verify that
(1) net_ls_cards shows the card with the correct mac addr $mac
(2) net_ls_addr shows one interface with mac $mac
(3) echo $net_default_mac shows the mac $mac
[Regression potential]
grub now correctly stores the mac address in variables, meaning that code now might not fallback to a default.
Apart from that/On the other hand, the fix is a simple case of initializing variables, therefore that was possible before too, as it was basically random anyway.
[Original bug report]
In MAAS, we use grub-mkimage to create a bootloader for VM's to PXE boot of MAAS by a grub bootloader that we provide over the network. (we call this bootppc64.bin).
This bootloader is created with the following grub configuration:
grub_config: |
# MAAS GRUB2 pre-loader configuration file
# Load based on MAC address first.
configfile (pxe)/grub/
# Failed to load based on MAC address.
# Load arm64 by default, UEFI only supported by 64-bit
configfile (pxe)/grub/
When we use bionic bootloader, we see the following output in the console:
"Booting under MAAS direction... [ grub.cfg-
And in rackd.log we see:
2018-08-07 17:37:21 provisioningser
2018-08-07 17:37:24 provisioningser
2018-08-07 17:37:24 provisioningser
2018-08-07 17:37:24 provisioningser
This means that the VM attempted to PXE boot with MAC address "80:1c:
<interface type='network'>
<mac address=
<source network='maas'/>
<model type='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</interface>
If we are to switch the bootloader to the one created with xenial as a base, we see correct behavior.
"Booting under MAAS direction... [ grub.cfg-
And the result is that grub has used to correct MAC address for the PXE process.
2018-08-07 17:07:45 provisioningser
2018-08-07 17:07:46 provisioningser
2018-08-07 17:07:47 provisioningser
2018-08-07 17:08:17 provisioningser
It would seem as the firmware in bionic is automatically generating a new MAC address.
Bionic console log
-------
Using default console: /vdevice/
Welcome to Open Firmware
Copyright (c) 2004, 2017 IBM Corporation All rights reserved.
This program and the accompanying materials are made available
under the terms of the BSD License available at
http://
Trying to load: from: /pci@8000000200
Initializing NIC
Reading MAC address from device: 52:54:00:7f:83:62
Requesting information via DHCP: done
Using IPv4 address: 10.245.136.136
Requesting file "bootppc64.bin" via TFTP from 10.245.136.6
Receiving data: 1665 KBytes
TFTP: Received bootppc64.bin (1665 KBytes)
Successfully loaded
Booting under MAAS direction... [ grub.cfg-
OF stdout device is: /vdevice/
Preparing to boot Linux version 4.15.0-30-generic (buildd@
.3.0-16ubuntu3)) #32-Ubuntu SMP Thu Jul 26 17:43:11 UTC 2018 (Ubuntu 4.15.0-
Detected machine type: 0000000000000101
command line: BOOT_IMAGE=
/10.245.
overlayroot=tmpfs overlayroot_
//10-245-
=0 log_host=
Xenial console log
-------
Using default console: /vdevice/
Welcome to Open Firmware
Copyright (c) 2004, 2017 IBM Corporation All rights reserved.
This program and the accompanying materials are made available
under the terms of the BSD License available at
http://
Trying to load: from: /pci@8000000200
Initializing NIC
Reading MAC address from device: 52:54:00:7f:83:62
Requesting information via DHCP: done
Using IPv4 address: 10.245.136.136
Requesting file "bootppc64.bin" via TFTP from 10.245.136.6
Receiving data: 1714 KBytes
TFTP: Received bootppc64.bin (1714 KBytes)
Successfully loaded
Booting under MAAS direction... [ grub.cfg-
OF stdout device is: /vdevice/
Preparing to boot Linux version 4.15.0-30-generic (buildd@
.3.0-16ubuntu3)) #32-Ubuntu SMP Thu Jul 26 17:43:11 UTC 2018 (Ubuntu 4.15.0-
Detected machine type: 0000000000000101
command line: BOOT_IMAGE=
10.245.
layroot=tmpfs overlayroot_
245-136-
.245.136.6 log_port=514 rootdelay=60 BOOTIF=
Max number of cores passed to firmware: 2048 (NR_CPUS = 2048)
Related branches
- Andres Rodriguez (community): Approve
-
Diff: 43 lines (+12/-10)2 files modifiedconf/bootloaders.yaml (+1/-1)
meph2/commands/mimport.py (+11/-9)
summary: |
- ppc64el grub may be auto-generating MAC address instead of using that of - the VM + ppc64el grub may be auto-generating MAC address instead of using the + assigned to the VM. |
tags: | added: regression-release |
summary: |
- ppc64el grub may be auto-generating MAC address instead of using the - assigned to the VM. + [REGRESSION] ppc64el grub in bionic may be auto-generating MAC address + instead of using the assigned to the VM. |
tags: | added: id-5b69f1b756c6033c5589ff34 |
Changed in maas-images: | |
status: | New → Fix Released |
description: | updated |
Changed in grub2 (Ubuntu Bionic): | |
status: | New → In Progress |
Changed in grub2 (Ubuntu): | |
status: | In Progress → Fix Committed |
Changed in grub2-signed (Ubuntu): | |
status: | New → Fix Released |
Changed in grub2-signed (Ubuntu Bionic): | |
status: | New → Triaged |
status: | Triaged → Fix Committed |
status: | Fix Committed → In Progress |
I have reverted the OpenFirmware PPC64EL bootloader in lp:maas-images to Xenial while this is debugged.