Bug 1044319

Summary: virt-sandbox-service delete command ignore -p pareameters value
Product: [Community] Virtualization Tools Reporter: Luwen Su <lsu>
Component: libvirt-sandboxAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: berrange, dyuan, gsun, mzhan
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-04-16 17:48:40 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:

Description Luwen Su 2013-12-18 05:33:38 UTC
Description of problem:
virt-sandbox-service delete command don't check -p parameters value  

Version-Release number of selected component (if applicable):
kernel-3.10.0-63.el7.x86_64
libvirt-1.1.1-15.el7.x86_64
libvirt-sandbox-0.5.0-7.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Prepare a container and a user account
#useradd timesu
#passwd timesu

# virt-sandbox-service create -p /home/timesu -s static,label=system_u:system_r:svirt_lxc_net_t:s0:c200,c300 -C -u httpd.service -N dhcp,source=default apache13
Created sandbox container dir /home/timesu/apache13
Created unit file /etc/systemd/system/apache13_sandbox.service
Created sandbox config /etc/libvirt-sandbox/services/apache13/config/sandbox.cfg


2.Delete the container with wrong path via -p parameters
# ll /home/timesu/
total 0
drwxr-xr-x. 7 root root 58 Dec  4 16:19 apache13

# ll /home/wayne/
ls: cannot access /home/wayne/: No such file or directory

#virt-sandbox-service delete apache13 -p /home/wayne
echo $?
0

#virsh -c lxc:/// list --all
 Id    Name                           State
----------------------------------------------------

#ll /home/timesu
total 0
drwxr-xr-x. 7 root root 58 Dec  4 16:19 apache13



Actual results:
Don't check -p

Expected results:
Check -p


Additional info:

Comment 2 Daniel Berrangé 2014-02-12 15:01:19 UTC
When deleting a sandbox, you must use the same -p arg that you used when creating it in the first place. We don't have a way to remember this value currently

Comment 4 Daniel Berrangé 2020-04-16 17:48:40 UTC
Closing old bug, virt-sandbox-service feature has been deleted.