Dan Kenigsberg has submitted this change and it was merged.
Change subject: storage: Search only the current image for children ......................................................................
storage: Search only the current image for children
The getChildren method of FileVolume is currently searching all images in the storage domain for children. A glob of all metadata files in the SD is cached and then passed to grep to look for the child volumes. The problem is that deleteVolumes takes an exclusive lock on the image namespace only. If deletes are active on other images at the same time we'll get errors with missing files.
The code attempts to report the children of a template base volume. However, this is not needed now and is not expected to be required in the future. The getVolsOfImage API should be used for templates. Therefore, we can fix this race by limiting the search for children to a single image.
Change-Id: I2ef9012cee3a8cb891926510c10ecc47b7cddaa1 Signed-off-by: Adam Litke alitke@redhat.com Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1069610 Reviewed-on: http://gerrit.ovirt.org/35096 Reviewed-by: Dan Kenigsberg danken@redhat.com Reviewed-by: Federico Simoncelli fsimonce@redhat.com --- M vdsm/storage/fileVolume.py 1 file changed, 2 insertions(+), 2 deletions(-)
Approvals: Adam Litke: Verified Federico Simoncelli: Looks good to me, approved Dan Kenigsberg: Looks good to me, but someone else must approve