Comment 0 for bug 1799221

Revision history for this message
Francois Deppierraz (francois-ctrlaltdel) wrote :

The following code from cinder/image/ doesn't correctly handled cases where raises an IOError which is due to something else than disk space issues (ie. network connection timeouts).

      , image_id, image_file)
            except IOError as e:
                if e.errno == errno.ENOSPC:
                    params = {'path': os.path.dirname(path),
                              'image': image_id}
                    reason = _("No space left in image_conversion_dir "
                               "path (%(path)s) while fetching "
                               "image %(image)s.") % params
                    raise exception.ImageTooBig(image_id=image_id,

Using openstack-ansible for queens, we experienced this issue because the storage system behind /var/lib/cinder/conversion was too slow and glance connections sometimes failed because of timeouts. When this happened, a truncated volume in status available was created while we would have expected it to be in error state instead.

The solution looks simple, raise the initial exception when e.errno != errno.ENOSPC