Bug 830676

Summary: RFE: Introduce job control for storage driver.
Product: [Community] Virtualization Tools Reporter: yanbing du <ydu>
Component: libvirtAssignee: John Ferlan <jferlan>
Status: CLOSED DUPLICATE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: cwei, dyuan, eblake, jtomko, mzhan, rbalakri, zpeng
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-17 15:13:20 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:

Description yanbing du 2012-06-11 08:14:06 UTC
Description of problem:
When use vol-wipe to wipe a volume, and select the supported algorithms, if the volume 
is large, it will take long time(except 'zero'). So during wipe the volume, if we cancel this command by Ctrl+C, this wipe process(scrub) is still running under background. Then virsh pool/vol related command will wait there until the process finished.


Version-Release number of selected component (if applicable):
libvirt-0.9.10-21.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1. wipe the image with an algorithm(nnsa/dod/bsi/gutmann, or random)
#virsh vol-wipe --pool default $image_name --algorithm nnsa
  
2. cancel this command by Ctrl+C
3. check the wipe process
# ps -ef|grep scrub
root      3716  3573 29 16:11 ?        00:00:06 /usr/bin/scrub -f -p nnsa /var/lib/libvirt/images/rhel6u2.img

3. check the volumes in default pool
#virsh vol-list default

  
Actual results:
The scrub process still running after cancel vol-wipe command.

Expected results:
The scrub process should also be killed.

Additional info:

Comment 1 Eric Blake 2012-06-11 15:18:19 UTC
More generically, we need a way to track that there is a long-running virStorageVol* command running, and be able to get status updates on its progress.  For example, this argues that the virDomainGetJobInfo() API needs to be copied, and we need virStorageVolGetJobInfo().

Comment 2 Osier Yang 2012-06-15 14:05:55 UTC
(In reply to comment #1)
> More generically, we need a way to track that there is a long-running
> virStorageVol* command running, and be able to get status updates on its
> progress.  For example, this argues that the virDomainGetJobInfo() API needs
> to be copied, and we need virStorageVolGetJobInfo().

Agreed, I recall someone raised similiar problem in upstream before.

Comment 4 Ján Tomko 2015-03-17 15:13:20 UTC

*** This bug has been marked as a duplicate of bug 581698 ***