Bug 1234150 - After a recent upgrade, building a storage pool fails if the directory already exists
Summary: After a recent upgrade, building a storage pool fails if the directory alread...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-06-21 17:53 UTC by killyourtv
Modified: 2016-04-10 21:26 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2016-04-10 21:26:34 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
RiseupLabs 9568 0 None None None Never

Description killyourtv 2015-06-21 17:53:00 UTC
Description of problem:
After a recent libvirt update, ruby code that we use to build a storage pool now fails. This worked prior to the update. Specifying the BUILD_NO_OVERWRITE or BUILD_OVERWRITE flags when building the pool do not help.

Version-Release number of selected component (if applicable):
Debian package version 1.2.16-2. Ruby bindings are at version 0.5.1-3+b2. The breakage was seen when libvirt was updated.


How reproducible:
Every time

Steps to Reproduce:
1. Using the ruby bindings, try to build a pool when the storage path already exists. 
2.
3.

Actual results:
Fails with 

Call to virStoragePoolBuild failed: failed to create directory '/home/kytv/git/tails/tmp/TailsToasterStorage': File exists (Libvirt::Error)


Expected results:
Continuing as it previously did.

Additional info:

The code we're using (which used to work) can be found at https://git-tails.immerda.ch/tails/tree/features/support/helpers/storage_helper.rb

In our codebase, I've tried using 

    pool.build(Libvirt::StoragePool::BUILD_NO_OVERWRITE)

and 

    pool.build(Libvirt::StoragePool::BUILD_OVERWRITE)

and it still fails.

Tails has a bug for this problem at https://labs.riseup.net/code/issues/9568

Comment 1 Cole Robinson 2016-04-10 21:26:34 UTC
This was fixed by:

commit 60d5ed8c520462fd8fbc2d8dfac7b7c16ae5eb51
Author: Christophe Fergeau <cfergeau>
Date:   Fri Jul 17 10:02:20 2015 +0200

    storage: Fix pool building when directory already exists


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