LibvirtDriver: "get_serial_console" returns always the first port of N defined ports
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Confirmed
|
Medium
|
Unassigned |
Bug Description
Issue
=====
The libvirt driver returns *always" the first port and ignores each
further defined port for the "serial console" feature.
Steps to reproduce
==================
* enable the "serial console" feature in nova.conf
[serial_console]
enabled=True
* start the nova-serialproxy service (e.g. with devstack [2])
* append the extra_spec "hw:serial_
* start an instancen with that flavor (for generated domain XML see [4])
* Connect to the serial console to that launched instance
(e.g. Horizon with "console" tab or another client [3])
* Start a second attempt to connect to that instance
Expected behavior
=================
The first connection will use the default port 10000.
The second attempt will use the next available port 10001.
Actual behavior
===============
The second attemp will fail because the libvirt driver returns the
already connected port 10000.
Logs & Env.
===========
The two attempts to connect happen at 19:04 and 19:09 in the logs.
Please see [6] and [7] for the relevant nova-serialproxy and nova-compute
logs. The additional dumpxml [5] from libvirt is taken after the first
connection.
I'm using libvirt version 1.2.2 within an Ubuntu14.04 VM. OpenStack
is installed and started with devstack.
References
==========
[1] Mailing list "openstack-dev"; February 2015;
subject "[nova] bp serial-ports *partly* implemented?";
http://
[2] Devstack guide; Nova and devstack;
http://
[3] larsk/novaconsole; github; https:/
[4] pastebin; generated domain XML for the instance;
http://
[5] pastebin; virsh dumpxml <domain> for the instance after the first
connection; http://
[6] pastebin; log of the nova-serialproxy service
http://
[7] pastebin; log of nova-compute service
http://
Changed in nova: | |
assignee: | nobody → sahid (sahid-ferdjaoui) |
tags: | added: console |
Changed in nova: | |
assignee: | sahid (sahid-ferdjaoui) → nobody |
Changed in nova: | |
assignee: | nobody → stgleb (gstepanov) |
status: | Confirmed → In Progress |
The current code try to find an update of the attribute 'mode'(from bind to connect) to see if it indicate that the console is connected, but according to the xml you are providing when a client is connected. libvirt do not change the state of mode.