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 17:11:40 +0000 (13:11 -0400)
commit605b12068392d29beb44a8ab7d6ec176d6b05237
tree141a8906a267b4bbf3a4c68cdc22930d8f19c639
parent454cb7c40dbcff84192094963d71369ac7d94546
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.
src/storage/storage_driver.c