Bug 1170743
| Summary: | Xen pty console <source> element not available in dumpxml (or to openstack nova) until after connecting with 'virsh console'. | ||
|---|---|---|---|
| Product: | [Community] Virtualization Tools | Reporter: | clark.laughlin |
| Component: | libvirt | Assignee: | Libvirt Maintainers <libvirt-maint> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | unspecified | CC: | ijc, jtomko, rbalakri |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2015-09-04 13:46:28 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
Pushed upstream as:
commit 368042cf4a6bca34c7da45517a6e3ce91876c53c
Author: Anthony PERARD <anthony.perard>
AuthorDate: 2015-01-15 16:40:19 +0000
Commit: Jim Fehlig <jfehlig>
CommitDate: 2015-01-16 15:57:10 -0700
libxl: Set path to console on domain startup.
The path to the pty of a Xen PV console is set only in
virDomainOpenConsole. But this is done too late. A call to
virDomainGetXMLDesc done before OpenConsole will not have the path to
the pty, but a call after OpenConsole will.
e.g. of the current issue.
Starting a domain with '<console type="pty"/>'
Then:
virDomainGetXMLDesc():
<devices>
<console type='pty'>
<target type='xen' port='0'/>
</console>
</devices>
virDomainOpenConsole()
virDomainGetXMLDesc():
<devices>
<console type='pty' tty='/dev/pts/30'>
<source path='/dev/pts/30'/>
<target type='xen' port='0'/>
</console>
</devices>
The patch intend to have the TTY path on the first call of GetXMLDesc.
This is done by setting up the path at domain start up instead of in
OpenConsole.
https://bugzilla.redhat.com/show_bug.cgi?id=1170743
Signed-off-by: Anthony PERARD <anthony.perard>
git describe: v1.2.11-199-g368042c contains: v1.2.12-rc1~10
|
Description of problem: I am testing Openstack on arm64 using Xen and am using the libvirt driver (xenlight). I was working on an issue where 'nova console-log' throws an exception. It turns out that the <source path=""> element is not being added to the <console> element by libvirt after the domain is created. Nova is expecting this element to be there, doesn't handle the missing data correctly, and throws an exception. I can manually connect to the console using 'virsh console' and after that, the correct <source path=""/> element is added to the domain XML and nova picks it up and the exception goes away. Version-Release number of selected component (if applicable): I build libvirt from git master How reproducible: This can be reproduced using only virsh. Steps to Reproduce: 1. run virsh to connect to Xen ("virsh -c xen:///") 2. define a domain with XML containing "<console type='pty'/>" 3. run 'virsh dumpxml' (and verify no <source path='...'/> is present) 4. run 'virsh console <domid>' 5. run 'virsh dumpxml' (and verify <source path='...'/> has been added) Actual results: ** Before running virsh console: <console type='pty'> <target type='xen' port='0'/> </console> ** After running virsh console: <console type='pty' tty='/dev/pts/4'> <source path='/dev/pts/4'/> <target type='xen' port='0'/> </console> Expected results: I would expect the source path information to be present immediately after defining/creating the domain so that it is immediately available to nova for capture of console output as the domain is booting. Additional info: