Bug 916651
| Summary: | virt-sandbox-service doesn't work + mistake in man page | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Michal Trunecka <mtruneck> |
| Component: | libvirt-sandbox | Assignee: | Daniel Berrangé <berrange> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Virtualization Bugs <virt-bugs> |
| Severity: | high | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 7.0 | CC: | ajia, dyuan, ebenes, gsun, mmalik, zpeng |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | libvirt-sandbox-0.2.0-1.el7 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2014-06-13 11:39:33 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: | |||
| Bug Depends On: | |||
| Bug Blocks: | 920637 | ||
|
Description
Michal Trunecka
2013-02-28 15:39:27 UTC
# rpm -qa | grep -e libvirt -e httpd | sort httpd-2.4.3-15.el7.x86_64 httpd-tools-2.4.3-15.el7.x86_64 libmicrohttpd-0.9.22-1.el7.x86_64 libvirt-client-1.0.2-1.el7.x86_64 libvirt-daemon-1.0.2-1.el7.x86_64 libvirt-daemon-driver-interface-1.0.2-1.el7.x86_64 libvirt-daemon-driver-lxc-1.0.2-1.el7.x86_64 libvirt-daemon-driver-network-1.0.2-1.el7.x86_64 libvirt-daemon-driver-nodedev-1.0.2-1.el7.x86_64 libvirt-daemon-driver-nwfilter-1.0.2-1.el7.x86_64 libvirt-daemon-driver-qemu-1.0.2-1.el7.x86_64 libvirt-daemon-driver-secret-1.0.2-1.el7.x86_64 libvirt-daemon-driver-storage-1.0.2-1.el7.x86_64 libvirt-daemon-kvm-1.0.2-1.el7.x86_64 libvirt-daemon-lxc-1.0.2-1.el7.x86_64 libvirt-gconfig-0.1.4-1.el7.x86_64 libvirt-glib-0.1.4-1.el7.x86_64 libvirt-gobject-0.1.4-1.el7.x86_64 libvirt-sandbox-0.1.1-2.el7.x86_64 libvirt-sandbox-libs-0.1.1-2.el7.x86_64 # ls -Z /usr/lib/systemd/system/httpd.service -rw-r--r--. root root system_u:object_r:httpd_unit_file_t:s0 /usr/lib/systemd/system/httpd.service # virt-sandbox-service create -C -u httpd.service httpd1 Loaded plugins: product-id /usr/bin/virt-sandbox-service: [Errno 2] No such file or directory # echo $? 1 # *** Bug 920418 has been marked as a duplicate of this bug. *** This bug blocks all virt-sandbox-service operation, so mark it as TestBlocker, pls fixed it asap. Several new bugs about virt-sandbox-service operation are reported to Fedora 18: [virt-sandbox-service] clone sandbox will fail https://bugzilla.redhat.com/show_bug.cgi?id=921991 [virt-sandbox-service] container start with chronyd.service failure https://bugzilla.redhat.com/show_bug.cgi?id=921967 [virt-sandbox-service] problem of container with default labelling https://bugzilla.redhat.com/show_bug.cgi?id=921972 [virt-sandbox-service] Created unit file is not deleted after delete sandbox https://bugzilla.redhat.com/show_bug.cgi?id=921986 [virt-sandbox-service] path option is ignored when create sandbox https://bugzilla.redhat.com/show_bug.cgi?id=922630 # rpm -q libvirt libvirt-1.0.3-1.el7.x86_64 # rpm -q libvirt-sandbox libvirt-sandbox-0.1.2-1.el7.x86_64 # virt-sandbox-service create -u httpd.service apache10 Loaded plugins: product-id, refresh-packagekit /usr/bin/virt-sandbox-service: [Errno 2] No such file or directory # virt-sandbox-service create -u httpd.service apache10 /usr/bin/virt-sandbox-service: /var/lib/libvirt/filesystems/apache10 already exists ==》 It's failed to creat a container, but the related files are still kept. And can't create the same container again unless delete the files manually. # virt-sandbox-service list # (In reply to comment #0) > Description of problem: > I wanted to try virt-sandbox-service, so I looked into manpage and tried the > command listed there: > > # virt-sandbox-service create -C -u /lib/systemd/service/httpd.service -e > /usr/sbin/httpd httpd1 > /usr/bin/virt-sandbox-service: Requested unit > /lib/systemd/service/httpd.service does not exist > > The path there is incorrect, the path there should be /lib/systemd/system/... > But even with the correct path it doesn't work: > > # ls -laZ /lib/systemd/system/httpd.service > -rw-r--r--. root root system_u:object_r:httpd_unit_file_t:s0 > /lib/systemd/system/httpd.service > # virt-sandbox-service create -C -u /lib/systemd/system/httpd.service -e > /usr/sbin/httpd httpd1 > /usr/bin/virt-sandbox-service: Requested unit > /lib/systemd/system/httpd.service does not exist > > In addition, -e option is not documented anywhere. The man page is incorrect. The '-u' option takes the name of a unit file, not the full path. The '-e' option no longer exists in current releases. I'll fix the man page for these. Correct usage would be # virt-sandbox-service create -C -u httpd.srevice httpd1 Man page problems fixed in
commit 38a582e4f0750bc90221b7ee46a7e63f85b04dfa
Author: Daniel P. Berrange <berrange>
Date: Wed Mar 20 15:05:38 2013 +0000
Fix misc problems in virt-sandbox-service create man page
(In reply to comment #5) > # rpm -q libvirt > libvirt-1.0.3-1.el7.x86_64 > # rpm -q libvirt-sandbox > libvirt-sandbox-0.1.2-1.el7.x86_64 > > > # virt-sandbox-service create -u httpd.service apache10 > Loaded plugins: product-id, refresh-packagekit > /usr/bin/virt-sandbox-service: [Errno 2] No such file or directory > > # virt-sandbox-service create -u httpd.service apache10 > /usr/bin/virt-sandbox-service: /var/lib/libvirt/filesystems/apache10 already > exists > ==》 It's failed to creat a container, but the related files are still kept. > And can't create the same container again unless delete the files manually. Can you manually delete those files and then run strace -o sandbox.log -s 1000 virt-sandbox-service create -u httpd.service apache10 so we can see what file it is getting ENOENT error on. (In reply to comment #8) > (In reply to comment #5) > > # rpm -q libvirt > > libvirt-1.0.3-1.el7.x86_64 > > # rpm -q libvirt-sandbox > > libvirt-sandbox-0.1.2-1.el7.x86_64 > > > > > > # virt-sandbox-service create -u httpd.service apache10 > > Loaded plugins: product-id, refresh-packagekit > > /usr/bin/virt-sandbox-service: [Errno 2] No such file or directory > > > > # virt-sandbox-service create -u httpd.service apache10 > > /usr/bin/virt-sandbox-service: /var/lib/libvirt/filesystems/apache10 already > > exists > > ==》 It's failed to creat a container, but the related files are still kept. > > And can't create the same container again unless delete the files manually. > > Can you manually delete those files and then run > > > strace -o sandbox.log -s 1000 virt-sandbox-service create -u httpd.service > apache10 > > so we can see what file it is getting ENOENT error on. Actually don't bother - this is the issue already tracked in https://bugzilla.redhat.com/show_bug.cgi?id=921940 (In reply to comment #7) > Man page problems fixed in > > commit 38a582e4f0750bc90221b7ee46a7e63f85b04dfa > Author: Daniel P. Berrange <berrange> > Date: Wed Mar 20 15:05:38 2013 +0000 > > Fix misc problems in virt-sandbox-service create man page One thing missed in this fix: # vim bin/virt-sandbox-service-create.pod +37 ... =item B<-C>, B<--clone> Clone content from /etc and /var directories that will be mounted within the container. ... -C means copy not clone, so here also need update. also there are two entries discribe -u: ... =item B<-u UNIT_FILE>, B<--unitfile UNIT_FILE> Name of the systemd unit file to be to run within the container. Can be repeated if multiple unit files are required within the sandbox. ... =item B<-u unitfile>, B<--unitfile unitfile> systemd Unit file to run within the container ... pkgs: libvirt-1.1.0-2.el7.x86_64 libvirt-sandbox-0.2.1-1.el7.x86_64 kernel-3.9.0-0.55.el7.x86_64 systemd-204-4.el7.x86_64 steps: 1. check create man page # man virt-sandbox-service-create -u, -e, -C are updated the problem in comment #11 is still exist, a patch have been send to upstream: commit 07c48cdfd259126b2f9aaba1a84e183f630a8832 Author: Wayne Sun <gsun> Date: Thu Jul 18 15:18:47 2013 +0800 Docs: remove duplicate -u item in create man page This related to bug: https://bugzilla.redhat.com/show_bug.cgi?id=916651#c11 Signed-off-by: Wayne Sun <gsun> pkgs: libvirt-sandbox-0.5.0-1.el7.x86_64 commit 07c48cd is pushed, duplicate -u is deleted. 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. |