Creating Instances from Newly Added Image Fail with Error ‘Corrupt Image Download’

Problem

Instance creation with newly added image in Glance Image Library fails with the below error in /var/log/pf9/ostackhost.log on the compute host.

ERROR nova.image.glance [<request_UUID>] Error writing to /opt/pf9/data/instances/_base/<base_disk_UUID>.part: [Errno 32] Corrupt image download. Checksum was a1b2c3d4 expected p5q6r7s8: BrokenPipeError: [Errno 32] Corrupt image download. Checksum was a1b2c3d4 expected p5q6r7s8

ERROR nova.compute.manager [<request_UUID>] [instance: <instance_UUID>] Instance failed to spawn: BrokenPipeError: [Errno 32] Corrupt image download. Checksum was a1b2c3d4 expected p5q6r7s8

Environment

  • Platform9 Managed OpenStack - All Versions

  • Glance

  • Images

  • Nova

Cause

  • For larger images that are copied over the network (via SCP, FTP, etc) to the Image Library directory directly, the image transfer can take a longer time. In such a case, Image Library could calculate the checksum of a partial image and store it in glance-registry.

  • As the checksum differs from the image downloaded by Nova and the image in the Image Library directory, instances creation from that image will fail.

circle-info

Info

Image Library adds the metadata with the checksum of the glance image to the glance-registry from the image content monitored directory ( Image Library directoryarrow-up-right default path: /var/opt/pf9/imagelibrary/data/ ).

Resolution

  1. Remove the existing problematic image from the glance:

  1. The recommended method is to transfer the image to Glance hosts in a temporary/home directory and then move it to the image content monitored directory.

OR

  1. Use the glance image-create command to upload the image, Refer Managing Images with CLIarrow-up-right article.

Last updated