Use no_timer_check with soft-qemu
The Linux kernel timer check not working properly
when the hypervisor's thread preempted by the host CPU scheduler.
The timer check is automatically disabled with other types
of hypervisors including the hardware accelerated kvm,
but timer_check is not disabled when qemu used without hardware acceleration.
This issue is frequently mischaracterized as an SSH connectivity issue and
causes rechecks and occasional boot failures.
This change adds no_timer_check kernel parameter when we are using
uec images with qemu.
Closes-Bug: #1312199
Change-Id: I3cfdfe9048fe219fc12cdac8a399b496f237e55e
(cherry picked from commit 6b86a61fee
)
This commit is contained in:
parent
4c6b0f71c2
commit
485f25df18
|
@ -3548,6 +3548,10 @@ class LibvirtConnTestCase(test.TestCase):
|
|||
check = (lambda t: t.find('./os/kernel'), None)
|
||||
check_list.append(check)
|
||||
|
||||
if expect_kernel:
|
||||
check = (lambda t: "no_timer_check" in t.find('./os/cmdline').
|
||||
text, hypervisor_type == "qemu")
|
||||
check_list.append(check)
|
||||
# Hypervisors that only support vm_mode.HVM and Xen
|
||||
# should not produce configuration that results in kernel
|
||||
# arguments
|
||||
|
|
|
@ -3183,6 +3183,8 @@ class LibvirtDriver(driver.ComputeDriver):
|
|||
else:
|
||||
guest.os_cmdline = ("root=%s %s" % (root_device_name,
|
||||
CONSOLE))
|
||||
if CONF.libvirt.virt_type == "qemu":
|
||||
guest.os_cmdline += " no_timer_check"
|
||||
|
||||
if rescue.get('ramdisk_id'):
|
||||
guest.os_initrd = os.path.join(inst_path, "ramdisk.rescue")
|
||||
|
@ -3193,6 +3195,8 @@ class LibvirtDriver(driver.ComputeDriver):
|
|||
else:
|
||||
guest.os_cmdline = ("root=%s %s" % (root_device_name,
|
||||
CONSOLE))
|
||||
if CONF.libvirt.virt_type == "qemu":
|
||||
guest.os_cmdline += " no_timer_check"
|
||||
if instance['ramdisk_id']:
|
||||
guest.os_initrd = os.path.join(inst_path, "ramdisk")
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue