This adds sgabios to the list of packages for Ironic and configures
the libvirt domain to redirect BIOS messages to serial via sgabios,
when console logging is enabled. The sgabios package in Ubuntu
currently has an apparmor bug, so that is worked around here.
This allows visibility into early boot of Ironic nodes and should
help get to the bottom of a frequent failure we're seeing in the gate.
Related-Bug: #1393099
(cherry picked from commit ffd66ad77ff07fff9812836b832bbcd952a61fff)
---
This also squashes the following commit into this patch. It is a required
fix to get grenade passing properly with the above changes:
commit 9eb8177eb7afa1e1cc9c64f80d175a1cb658ea50
Author: Adam Gandelman <adamg@ubuntu.com>
Date: Fri Nov 21 09:41:45 2014 -0800
Move sgabios setup to hypervisor-ironic
This moves setup of sgabios ROM to the ironic hypervisor library.
This is failing to backport to juno because of an error in the sideways ironic
grenade. install_ironic() is expected to setup only python things and happens
earlier than initial package installation.
Fixes-bug: #1396352
Change-Id: Ifd18851e2d23d198d36e67883a81afc6a92d2a58
| ... | ... |
@@ -56,6 +56,13 @@ function install_nova_hypervisor {
|
| 56 | 56 |
die $LINENO "Neutron should be enabled for usage of the Ironic Nova driver." |
| 57 | 57 |
fi |
| 58 | 58 |
install_libvirt |
| 59 |
+ if [[ "$IRONIC_VM_LOG_CONSOLE" == "True" ]] && is_ubuntu; then |
|
| 60 |
+ # Ubuntu packaging+apparmor issue prevents libvirt from loading |
|
| 61 |
+ # the ROM from /usr/share/misc. Workaround by installing it directly |
|
| 62 |
+ # to a directory that it can read from. (LP: #1393548) |
|
| 63 |
+ sudo rm -rf /usr/share/qemu/sgabios.bin |
|
| 64 |
+ sudo cp /usr/share/misc/sgabios.bin /usr/share/qemu/sgabios.bin |
|
| 65 |
+ fi |
|
| 59 | 66 |
} |
| 60 | 67 |
|
| 61 | 68 |
# start_nova_hypervisor - Start any required external services |
| ... | ... |
@@ -78,8 +78,10 @@ def main(): |
| 78 | 78 |
params['emulator'] = "/usr/bin/qemu-kvm" |
| 79 | 79 |
|
| 80 | 80 |
if args.console_log: |
| 81 |
+ params['bios_serial'] = "<bios useserial='yes'/>" |
|
| 81 | 82 |
params['console_log'] = CONSOLE_LOG % {'console_log': args.console_log}
|
| 82 | 83 |
else: |
| 84 |
+ params['bios_serial'] = '' |
|
| 83 | 85 |
params['console_log'] = '' |
| 84 | 86 |
libvirt_template = source_template % params |
| 85 | 87 |
conn = libvirt.open("qemu:///system")
|