← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1478607] [NEW] libvirt: serial console ports count upper limit needs to be checked

 

Public bug reported:

This bug is based on Daniel Berrange's comment on [1].

    "There is a limit of 4 serial ports on x86, [...] guest will have 
    5 consoles and will fail to boot with a QEMU error."

The number of serial ports a guest will have can be influenced by
* the image properties: "hw_serial_port_count"
* and the flavor extra specs: "hw:serial_port_count"

The upper limit of 4 serial ports (on x86) is not checked in the code 
but should be. Otherwise it is possible to prevent the boot of the 
guest.

This observation is based on nova master:
183cd889 2015-07-26 Merge "remove _rescan_iscsi fr[...]

Steps to reproduce
-----------------------
1) setup OpenStack with an libvirt/kvm on x86 compute node
2) set image property "hw_serial_port_count" to 6
3) launch instance from that image

CLI:

    glance image-update cirros-0.3.4-x86_64-uec \
    --property hw_serial_port_count=6

    nova boot test_serial_port_count --flavor m1.tiny \
    --image cirros-0.3.4-x86_64-uec
    
    nova list

Expected result
---------------
The request fails with an error message that explains that the upper
limit of serial ports on x86 is 4. 

At least the documentation in [3]

    - image hw_serial_port_count=6
          VM gets 6 serial ports

can be updated to reflect that limitation.


Actual result
-------------
Instance get scheduled on a compute node [2] and is in ERROR state.

horizon shows:
    No valid host was found. There are not enough hosts available.
    Code 500


nova-compute.log shows:
    libvirtError: internal error: process exited while connecting to 
    monitor: qemu-system-x86_64: -device isa-serial,chardev=charserial4,
    id=serial4: Max. supported number of ISA serial ports is 4.
    
    qemu-system-x86_64: -device isa-serial,chardev=charserial4,
    id=serial4: Device 'isa-serial' could not be initialized


References
----------
[1] https://review.openstack.org/#/c/188058/
[2] Instance's domain XML: http://paste.openstack.org/show/405929/
[3] def get_number_of_serial_ports; https://github.com/openstack/nova/blob/master/nova/virt/hardware.py#L168

** Affects: nova
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1478607

Title:
  libvirt: serial console ports count upper limit needs to be checked

Status in OpenStack Compute (nova):
  New

Bug description:
  This bug is based on Daniel Berrange's comment on [1].

      "There is a limit of 4 serial ports on x86, [...] guest will have 
      5 consoles and will fail to boot with a QEMU error."

  The number of serial ports a guest will have can be influenced by
  * the image properties: "hw_serial_port_count"
  * and the flavor extra specs: "hw:serial_port_count"

  The upper limit of 4 serial ports (on x86) is not checked in the code 
  but should be. Otherwise it is possible to prevent the boot of the 
  guest.

  This observation is based on nova master:
  183cd889 2015-07-26 Merge "remove _rescan_iscsi fr[...]

  Steps to reproduce
  -----------------------
  1) setup OpenStack with an libvirt/kvm on x86 compute node
  2) set image property "hw_serial_port_count" to 6
  3) launch instance from that image

  CLI:

      glance image-update cirros-0.3.4-x86_64-uec \
      --property hw_serial_port_count=6

      nova boot test_serial_port_count --flavor m1.tiny \
      --image cirros-0.3.4-x86_64-uec
      
      nova list

  Expected result
  ---------------
  The request fails with an error message that explains that the upper
  limit of serial ports on x86 is 4. 

  At least the documentation in [3]

      - image hw_serial_port_count=6
            VM gets 6 serial ports

  can be updated to reflect that limitation.

  
  Actual result
  -------------
  Instance get scheduled on a compute node [2] and is in ERROR state.

  horizon shows:
      No valid host was found. There are not enough hosts available.
      Code 500

  
  nova-compute.log shows:
      libvirtError: internal error: process exited while connecting to 
      monitor: qemu-system-x86_64: -device isa-serial,chardev=charserial4,
      id=serial4: Max. supported number of ISA serial ports is 4.
      
      qemu-system-x86_64: -device isa-serial,chardev=charserial4,
      id=serial4: Device 'isa-serial' could not be initialized

  
  References
  ----------
  [1] https://review.openstack.org/#/c/188058/
  [2] Instance's domain XML: http://paste.openstack.org/show/405929/
  [3] def get_number_of_serial_ports; https://github.com/openstack/nova/blob/master/nova/virt/hardware.py#L168

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1478607/+subscriptions


Follow ups