Public bug reported: Description =========== The nova.image.glance.GlanceImageServiceV2.download method recently added fsync [1][2] before closing the download file.
Some hypervisors don't use regular files for download. For example, PowerVM uses a FIFO pipe, the other end of which is read by a service that offloads the image data to a remote node. fsync on a pipe, FIFO, or socket errors with EINVAL [3]. [1] https://review.openstack.org/#/c/441246/ [2] https://review.openstack.org/#/c/443583/ [3] http://man7.org/linux/man-pages/man2/fsync.2.html#ERRORS Steps to reproduce ================== Invoke nova.image.glance.GlanceImageServiceV2.download with data=None, dst_path=path where path represents a FIFO or socket. Expected result =============== Successful transfer of data through the FIFO/socket. Actual result ============= An exception similar to the following: File "/usr/local/lib/python2.7/dist-packages/pypowervm/internal_utils/thread_utils.py", line 34, in future_func return func(*args, **kwargs) File "/opt/stack/nova/nova/virt/powervm/disk/ssp.py", line 161, in upload IMAGE_API.download(context, image_meta.id, dest_path=path) File "/opt/stack/nova/nova/image/api.py", line 184, in download dst_path=dest_path) File "/opt/stack/nova/nova/image/glance.py", line 387, in download os.fsync(data.fileno()) OSError: [Errno 22] Invalid argument Immutable reference to the offending fsync call: https://github.com/openstack/nova/blob/640b152004fe3d9c43c26538809c3ac796f20eba/nova/image/glance.py#L375 Environment =========== devstack, pike, with the nova tree at this in-flight patch set: https://review.openstack.org/#/c/443189/15 Ubuntu 16.04.1 LTS running on PowerVM NovaLink, using Shared Storage Pools through a single VIOS. No networking. Logs & Configs ============== Available on request if needed. This is a snap to reproduce. ** Affects: nova Importance: Undecided Status: New -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to OpenStack Compute (nova). https://bugs.launchpad.net/bugs/1677047 Title: glance download fsync raises EINVAL for FIFOs Status in OpenStack Compute (nova): New Bug description: Description =========== The nova.image.glance.GlanceImageServiceV2.download method recently added fsync [1][2] before closing the download file. Some hypervisors don't use regular files for download. For example, PowerVM uses a FIFO pipe, the other end of which is read by a service that offloads the image data to a remote node. fsync on a pipe, FIFO, or socket errors with EINVAL [3]. [1] https://review.openstack.org/#/c/441246/ [2] https://review.openstack.org/#/c/443583/ [3] http://man7.org/linux/man-pages/man2/fsync.2.html#ERRORS Steps to reproduce ================== Invoke nova.image.glance.GlanceImageServiceV2.download with data=None, dst_path=path where path represents a FIFO or socket. Expected result =============== Successful transfer of data through the FIFO/socket. Actual result ============= An exception similar to the following: File "/usr/local/lib/python2.7/dist-packages/pypowervm/internal_utils/thread_utils.py", line 34, in future_func return func(*args, **kwargs) File "/opt/stack/nova/nova/virt/powervm/disk/ssp.py", line 161, in upload IMAGE_API.download(context, image_meta.id, dest_path=path) File "/opt/stack/nova/nova/image/api.py", line 184, in download dst_path=dest_path) File "/opt/stack/nova/nova/image/glance.py", line 387, in download os.fsync(data.fileno()) OSError: [Errno 22] Invalid argument Immutable reference to the offending fsync call: https://github.com/openstack/nova/blob/640b152004fe3d9c43c26538809c3ac796f20eba/nova/image/glance.py#L375 Environment =========== devstack, pike, with the nova tree at this in-flight patch set: https://review.openstack.org/#/c/443189/15 Ubuntu 16.04.1 LTS running on PowerVM NovaLink, using Shared Storage Pools through a single VIOS. No networking. Logs & Configs ============== Available on request if needed. This is a snap to reproduce. To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1677047/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : [email protected] Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp

