Bug 927072
| Summary: | Improve the error msg when start the container failed due to the source dir is missing | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | dyuan |
| Component: | libvirt | Assignee: | Daniel Berrangé <berrange> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Virtualization Bugs <virt-bugs> |
| Severity: | low | Docs Contact: | |
| Priority: | medium | ||
| Version: | 7.0 | CC: | acathrow, ajia, berrange, cwei, dallan, gsun, lsu, mzhan, zpeng |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | libvirt-1.1.1-9.el7 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2014-06-13 11:28:45 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: | |||
Addressed in https://www.redhat.com/archives/libvir-list/2013-October/msg00544.html https://www.redhat.com/archives/libvir-list/2013-October/msg00537.html One further set of improvements https://www.redhat.com/archives/libvir-list/2013-October/msg00577.html *** Bug 966361 has been marked as a duplicate of this bug. *** Test:
libvirt-1.1.1-9.el7.x86_64
systemd-207-4.el7.x86_64
kernel-3.10.0-34.el7.x86_64
1.For the first part , which xml include doesn't exit dir , like
<filesystem type='mount' accessmode='passthrough'>
<source dir='/var/run/libvirt-sandbox/sandbox/config'/>
<target dir='/etc/libvirt-sandbox/scratch'/>
<readonly/>
</filesystem>
# virsh -c lxc:/// start sandbox
error: Failed to start domain sandbox
error: internal error: guest failed to start: Failed to access '/var/run/libvirt-sandbox/sandbox/config': No such file or directory
That's expected through the patches.
2.For the second part , which xml only include
<filesystem type='mount' accessmode='passthrough'>
<source dir='/'/>
<target dir='/'/>
<readonly/>
</filesystem>
# virsh -c lxc:/// start only
Domain only started
# virsh -c lxc:/// list --all
Id Name State
----------------------------------------------------
- only shut off
# virsh -c lxc:/// destroy only
error: Failed to destroy domain only
error: Requested operation is not valid: Domain is not running
in logs:
Oct 21 15:30:32 localhost systemd: Starting Container lxc-only.
Oct 21 15:30:32 localhost systemd-machined: New machine lxc-only.
Oct 21 15:30:32 localhost systemd: Started Container lxc-only.
Oct 21 15:30:33 localhost systemd-machined: Machine lxc-only terminated.
Further more , the default lxc that created by virt-manager has limited difference with the lxc only
12c12
< <init>/usr/libexec/libvirt-sandbox-init-lxc</init>
---
> <init>/bin/sh</init>
17c17
< <on_crash>destroy</on_crash>
---
> <on_crash>restart</on_crash>
23d22
< <readonly/>
25c24,30
< <console type='pty'>
---
> <interface type='network'>
> <mac address='00:16:3e:b7:a5:86'/>
> <source network='default'/>
> <target dev='vnet0'/>
> </interface>
> <console type='pty' tty='/dev/pts/1'>
> <source path='/dev/pts/1'/>
27,29c32
< </console>
< <console type='pty'>
< <target type='lxc' port='1'/>
---
> <alias name='console0'/>
32,34c35
< <seclabel type='static' model='selinux' relabel='no'>
< <label>system_u:system_r:virtd_lxc_t:s0:c0.c1023</label>
< </seclabel>
---
> <seclabel type='none' model='selinux'/>
Should i file another bug for this issue ?
Yes, please file a new bug - from your first test case it appears the issue from this bug is resolved already. Per comment 5 and 7 , i created Bug 1067804 and verify this one This request was resolved in Red Hat Enterprise Linux 7.0. Contact your manager or support representative in case you have further questions about the request. |
Description of problem: 1. Improve the error msg when start the container failed due to the source dir is missing 2. Start the container without any error msg in virsh cmd but failed actually. Version-Release number of selected component (if applicable): libvirt-1.0.3-1.el7 selinux-policy-3.12.1-18.el7 kernel-3.8.0-0.42.el7 How reproducible: always Steps to Reproduce: 1. # virsh -c lxc:/// dumpxml sandbox <domain type='lxc'> <name>sandbox</name> <uuid>fdc5d804-7a9b-51b0-1d0f-1313f1d4c1df</uuid> <memory unit='KiB'>524288</memory> <currentMemory unit='KiB'>524288</currentMemory> <vcpu placement='static'>1</vcpu> <os> <type arch='x86_64'>exe</type> <init>/usr/libexec/libvirt-sandbox-init-lxc</init> </os> <clock offset='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> <emulator>/usr/libexec/libvirt_lxc</emulator> <filesystem type='mount' accessmode='passthrough'> <source dir='/'/> <target dir='/'/> <readonly/> </filesystem> ****** <filesystem type='mount' accessmode='passthrough'> <source dir='/var/run/libvirt-sandbox/sandbox/config'/> <target dir='/etc/libvirt-sandbox/scratch'/> <readonly/> </filesystem> <filesystem type='bind' accessmode='passthrough'> <source dir='/tmp/home'/> <target dir='/home/redhat'/> </filesystem> ****** <console type='pty'> <target type='lxc' port='0'/> </console> <console type='pty'> <target type='lxc' port='1'/> </console> </devices> <seclabel type='static' model='selinux' relabel='no'> <label>system_u:system_r:virtd_lxc_t:s0:c0.c1023</label> </seclabel> </domain> 2. Start the container without any corresponding directories on host. # virsh -c lxc:/// start sandbox error: Failed to start domain sandbox error: internal error guest failed to start: PATH=/bin:/sbin TERM=linux container=lxc-libvirt container_uuid=fdc5d804-7a9b-51b0-1d0f-1313f1d4c1df LIBVIRT_LXC_UUID=fdc5d804-7a9b-51b0-1d0f-1313f1d4c1df LIBVIRT_LXC_NAME=sandbox /usr/libexec/libvirt-sandbox-init-lxc 2013-03-25 02:40:28.968+0000: 1622: info : libvirt version: 1.0.3, package: 1.el7 (Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>, 2013-03-05-04:25:15, x86-019.build.eng.bos.redhat.com) 2013-03-25 02:40:28.968+0000: 1622: error : virLXCControllerRun:1468 : error receiving signal from container: Input/output error 3. If start the guest with only the following filesystem element in <device> <filesystem type='mount' accessmode='passthrough'> <source dir='/'/> <target dir='/'/> <readonly/> </filesystem> 4. Start the guest without error msg but failed actually # virsh -c lxc:/// start sandbox Domain sandbox started # virsh -c lxc:/// list --all Id Name State ---------------------------------------------------- - sandbox shut off 5. And I can get the error in libvirtd.log. 2013-03-25 02:46:01.437+0000: 881: error : virNetSocketReadWire:1324 : End of file while reading data: Input/output error Actual results: Expected results: Improve the error msg in step2. Should pop error msg in step4. Additional info: