How to repair corrupt images in glance?

asked 2018-08-27 04:47:16 -0600

udayutkarsh gravatar image

updated 2018-08-27 07:32:31 -0600

Few VNFs were already deployed. Due to some issues in cloud a lot of debugging happened and finally recovered but when new instances of vnfs were tried to instantiate, its says the image in glance has been corrupted with checksum mismatch. Now my questions are:

        1) Can we delete the images from glance and upload new one with no impact on running instances?
        2) Any procedure to repair images in glance?
        3) Any other smart suggestions please

    The Actual error that I am getting when downloaded manually is below:

    [cbis-admin@overcloud-controller-1 (overcloudrc) ~]$ glance image-download a0d7dc42-2238-414f-8bcc-727b3ab2de66 --file cscf175sp3mq.qcow2 --progress
    [=============================>] 100%[Errno 32] Corrupt image download. Checksum was d1bf2a7e0992b1d911559da76ba3bfd5 expected 1350880dd47109dd8087b012df6a8c3c
edit retag flag offensive close merge delete


Under normal circumstances you can't delete glance images if existing instances refer to them as base images. Are there currently existing instances based on these images? Do they show any problems or symptoms of corruption? If the instances are working, you could create new snapshots for glance.

eblock gravatar imageeblock ( 2018-08-27 07:18:34 -0600 )edit

Thanks Previously deployed VNFs, which used the images which are corrupt now, are working fine but would they survive reboot/any such operations in future? Also, you mentioned about "creating new snapshot of working instance for glance" how is it different from uploading entirely new image to glance

udayutkarsh gravatar imageudayutkarsh ( 2018-08-27 07:25:53 -0600 )edit

But that would only create new glance images, not repair the old ones. I'm not familiar with vnfs so I don't know what options you have on that side. Checksum mismatches also happen when no space is left, this is no issue, is it?

eblock gravatar imageeblock ( 2018-08-27 07:26:33 -0600 )edit

Before rebooting an instance, I would try to create a snapshot. For that I would expect that it is required to read the base image and the diff, because the snapshot is supposed to work as a standalone glance image. If the snapshot doesn't work (or doesn't even finish) a reboot would probably fail.

eblock gravatar imageeblock ( 2018-08-27 07:31:25 -0600 )edit

So, if vm1 has used image1 which is corrupted now. now if I use 'nova image-create <vm1-uuid> <image-x>' , wouldn't image-x and image1 be different? Would it repair if give image1's uuid or something else?

udayutkarsh gravatar imageudayutkarsh ( 2018-08-27 08:01:50 -0600 )edit