Bug 830056 - [storage]pool-create/pool-create-as should include build pool then start
[storage]pool-create/pool-create-as should include build pool then start
Status: CLOSED UPSTREAM
Product: Virtualization Tools
Classification: Community
Component: libvirt (Show other bugs)
unspecified
x86_64 Linux
medium Severity medium
: ---
: ---
Assigned To: John Ferlan
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-08 01:46 EDT by zhpeng
Modified: 2016-04-26 20:48 EDT (History)
7 users (show)

See Also:
Fixed In Version: 1.3.1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-03-09 14:30:19 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
dir pool (552 bytes, text/plain)
2012-06-08 01:47 EDT, zhpeng
no flags Details
diskpool xml (650 bytes, text/plain)
2012-06-08 01:47 EDT, zhpeng
no flags Details
fspool xml (714 bytes, text/plain)
2012-06-08 01:48 EDT, zhpeng
no flags Details

  None (edit)
Description zhpeng 2012-06-08 01:46:09 EDT
Description
If pool environment is not built, pool-create/pool-create-as will always fail.
I think pool-create should build the pool.

Version
qemu-kvm-0.12.1.2-2.295.el6.x86_64
kernel-2.6.32-276.el6.x86_64
libvirt-0.9.10-21.el6.x86_64

Steps
For example:
dir pool
virsh # pool-create dirpool.xml 
error: Failed to create pool from dirpool.xml
error: cannot open path '/var/lib/libvirt/dir': No such file or directory

disk pool
virsh # pool-create diskpool.xml 
error: Failed to create pool from diskpool.xml
error: internal error Child process (/usr/libexec/libvirt_parthelper /dev/sdb) status unexpected: exit status 2

fs pool
virsh # pool-create fspool.xml 
error: Failed to create pool from fspool.xml
error: internal error Child process (/bin/mount -t ext4 /dev/sda7 /var/lib/libvirt/images/fspool) status unexpected: exit status 32

Steps are the same of other pools

Actual result
pool-create will fail when pool ENV is not built.

Expect resutlt
works
Comment 1 zhpeng 2012-06-08 01:47:06 EDT
Created attachment 590335 [details]
dir pool
Comment 2 zhpeng 2012-06-08 01:47:55 EDT
Created attachment 590336 [details]
diskpool xml
Comment 3 zhpeng 2012-06-08 01:48:19 EDT
Created attachment 590337 [details]
fspool xml
Comment 5 Dave Allan 2012-06-13 21:19:54 EDT
Please make this proposal on the upstream list and update the BZ with the response you get.  Personally I disagree with this proposal, but I do not want to speak for the community.
Comment 10 John Ferlan 2015-12-04 07:27:28 EST
Posted patches upstream to address this issue, see series:

http://www.redhat.com/archives/libvir-list/2015-November/msg01102.html
Comment 11 John Ferlan 2015-12-17 12:10:40 EST
After some adjustments to the patches based on review - patches were pushed.  Changes will be in libvirt 1.3.1

$ git describe e1937354508938231ffa4d708f0e742f4d90e076
CVE-2015-5313-48-ge193735
$

commit e1937354508938231ffa4d708f0e742f4d90e076
Author: John Ferlan <jferlan@redhat.com>
Date:   Wed Nov 25 09:51:51 2015 -0500

    virsh: Add build flags to pool-create[-as] and pool-start
    
...

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