storage: Handle failure from refreshVol
authorJohn Ferlan <jferlan@redhat.com>
Mon, 24 Aug 2015 16:38:13 +0000 (12:38 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Wed, 2 Sep 2015 22:57:20 +0000 (18:57 -0400)
commit075eb526c9817d9d8e3a759e3fbe180d8d326dcf
treed1d1032a8ce34985d7d3a6cd37988d053c531184
parent966cc922221be2b8cc6a9842ed0dc4cf1568a7b3
storage: Handle failure from refreshVol

Commit id '155ca616' added the 'refreshVol' API. In an NFS root-squash
environment it was possible that if the just created volume from XML wasn't
properly created with the right uid/gid and/or mode, then the followup
refreshVol will fail to open the volume in order to get the allocation/
capacity values. This would leave the volume still on the server and
cause a libvirtd crash because 'voldef' would be in the pool list, but
the cleanup code would free it.

(cherry picked from commit db9277a39bc364806e8d3e08a08fc128d59b7094)
src/storage/storage_driver.c