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 23:02:13 +0000 (19:02 -0400)
commit8b1d84e640f1a6e6ebb47caf23a664e2f651b32d
treeb0c35e24b95c33c43fc31c3424ed4bf5ab762be4
parent3468542f06f6f5dc94defa1603c6a6adea3e2da8
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