RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 916651 - virt-sandbox-service doesn't work + mistake in man page
Summary: virt-sandbox-service doesn't work + mistake in man page
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt-sandbox
Version: 7.0
Hardware: All
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: Daniel Berrangé
QA Contact: Virtualization Bugs
URL:
Whiteboard:
: 920418 (view as bug list)
Depends On:
Blocks: 920637
TreeView+ depends on / blocked
 
Reported: 2013-02-28 15:39 UTC by Michal Trunecka
Modified: 2019-02-14 02:22 UTC (History)
6 users (show)

Fixed In Version: libvirt-sandbox-0.2.0-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 11:39:33 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Michal Trunecka 2013-02-28 15:39:27 UTC
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.


Version-Release number of selected component (if applicable):
# rpm -qa libvirt-sandbox\*
libvirt-sandbox-0.1.1-2.el7.x86_64
libvirt-sandbox-libs-0.1.1-2.el7.x86_64
# rpm -q httpd
httpd-2.4.3-15.el7.x86_64

Comment 1 Milos Malik 2013-03-01 14:24:19 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
#

Comment 2 Wayne Sun 2013-03-12 05:08:02 UTC
*** Bug 920418 has been marked as a duplicate of this bug. ***

Comment 3 Wayne Sun 2013-03-18 06:39:07 UTC
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

Comment 5 dyuan 2013-03-20 08:13:28 UTC
# 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
#

Comment 6 Daniel Berrangé 2013-03-20 13:02:53 UTC
(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

Comment 7 Daniel Berrangé 2013-03-20 15:41:55 UTC
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

Comment 8 Daniel Berrangé 2013-03-20 15:46:08 UTC
(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.

Comment 9 Daniel Berrangé 2013-03-20 15:59:27 UTC
(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

Comment 10 Wayne Sun 2013-03-21 03:30:27 UTC
(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.

Comment 11 Wayne Sun 2013-03-21 06:00:46 UTC
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

...

Comment 13 Wayne Sun 2013-07-18 07:30:55 UTC
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>

Comment 14 Wayne Sun 2013-08-02 08:35:04 UTC
pkgs:
libvirt-sandbox-0.5.0-1.el7.x86_64

commit 07c48cd is pushed, duplicate -u is deleted.

Comment 16 Ludek Smid 2014-06-13 11:39:33 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.