Custom Search

Thursday, December 10, 2015

Nova boot with glance image fails Corrupt image download. Checksum was

1)
#nova boot --flavor 2 --image 61bb862c-69f1-49cc-9d37-1dbbf3eb841e --nic net-id=146520dc-2d6b-4ba1-b803-2edd1906a6f3 vm2

#nova boot --flavor 2 --image 61bb862c-69f1-49cc-9d37-1dbbf3eb841e --nic net-id=146520dc-2d6b-4ba1-b803-2edd1906a6f3 v1 --availability-zone nova:cp1-multinode-cont

2)
Fix:
#vim /usr/lib/python2.7/dist-packages/glanceclient/common/http.py

class HTTPClient(object):

    def __init__(self, endpoint, **kwargs):
        if self.endpoint.startswith("https"):
            #compression = kwargs.get('ssl_compression', True)
            compression = True

* Comment the line "compression = kwargs.get('ssl_compression', True)", then set "compression = True"

* Restart glance-api, glance-registry, cinder-api, cinder-volume, cinder-scheduler

3)
From /var/log/upstart/nova-compute.log

2015-08-07 01:43:02.100 18716 ERROR nova.compute.manager [req-66173648-5d32-4ab4-b647-6f571e5a2b76 5f51a7daa18f4465936fbb440ad05471 76cfebd8f2974dad94fd8770da958663 - - -] [instance: cd3fa491-fd04-4be8-87f1-27738ee8285e] Instance failed to spawn
2015-08-07 01:43:02.100 18716 TRACE nova.compute.manager [instance: cd3fa491-fd04-4be8-87f1-27738ee8285e] Traceback (most recent call last):
2015-08-07 01:43:02.100 18716 TRACE nova.compute.manager [instance: cd3fa491-fd04-4be8-87f1-27738ee8285e]   File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 2473, in _build_resources
2015-08-07 01:43:02.100 18716 TRACE nova.compute.manager [instance: cd3fa491-fd04-4be8-87f1-27738ee8285e]     yield resources
2015-08-07 01:43:02.100 18716 TRACE nova.compute.manager [instance: cd3fa491-fd04-4be8-87f1-27738ee8285e]   File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 2345, in _build_and_run_instance
2015-08-07 01:43:02.100 18716 TRACE nova.compute.manager [instance: cd3fa491-fd04-4be8-87f1-27738ee8285e]     block_device_info=block_device_info)
2015-08-07 01:43:02.100 18716 TRACE nova.compute.manager [instance: cd3fa491-fd04-4be8-87f1-27738ee8285e]   File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 2384, in spawn
2015-08-07 01:43:02.100 18716 TRACE nova.compute.manager [instance: cd3fa491-fd04-4be8-87f1-27738ee8285e]     admin_pass=admin_password)
2015-08-07 01:43:02.100 18716 TRACE nova.compute.manager [instance: cd3fa491-fd04-4be8-87f1-27738ee8285e]   File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 2782, in _create_image
2015-08-07 01:43:02.100 18716 TRACE nova.compute.manager [instance: cd3fa491-fd04-4be8-87f1-27738ee8285e]     instance, size, fallback_from_host)
2015-08-07 01:43:02.100 18716 TRACE nova.compute.manager [instance: cd3fa491-fd04-4be8-87f1-27738ee8285e]   File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 5900, in _try_fetch_image_cache
2015-08-07 01:43:02.100 18716 TRACE nova.compute.manager [instance: cd3fa491-fd04-4be8-87f1-27738ee8285e]     size=size)
2015-08-07 01:43:02.100 18716 TRACE nova.compute.manager [instance: cd3fa491-fd04-4be8-87f1-27738ee8285e]   File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/imagebackend.py", line 231, in cache
2015-08-07 01:43:02.100 18716 TRACE nova.compute.manager [instance: cd3fa491-fd04-4be8-87f1-27738ee8285e]     *args, **kwargs)
2015-08-07 01:43:02.100 18716 TRACE nova.compute.manager [instance: cd3fa491-fd04-4be8-87f1-27738ee8285e]   File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/imagebackend.py", line 480, in create_image
2015-08-07 01:43:02.100 18716 TRACE nova.compute.manager [instance: cd3fa491-fd04-4be8-87f1-27738ee8285e]     prepare_template(target=base, max_size=size, *args, **kwargs)
2015-08-07 01:43:02.100 18716 TRACE nova.compute.manager [instance: cd3fa491-fd04-4be8-87f1-27738ee8285e]   File "/usr/lib/python2.7/dist-packages/oslo_concurrency/lockutils.py", line 445, in inner
2015-08-07 01:43:02.100 18716 TRACE nova.compute.manager [instance: cd3fa491-fd04-4be8-87f1-27738ee8285e]     return f(*args, **kwargs)
2015-08-07 01:43:02.100 18716 TRACE nova.compute.manager [instance: cd3fa491-fd04-4be8-87f1-27738ee8285e]   File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/imagebackend.py", line 221, in fetch_func_sync
2015-08-07 01:43:02.100 18716 TRACE nova.compute.manager [instance: cd3fa491-fd04-4be8-87f1-27738ee8285e]     fetch_func(target=target, *args, **kwargs)
2015-08-07 01:43:02.100 18716 TRACE nova.compute.manager [instance: cd3fa491-fd04-4be8-87f1-27738ee8285e]   File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/utils.py", line 507, in fetch_image
2015-08-07 01:43:02.100 18716 TRACE nova.compute.manager [instance: cd3fa491-fd04-4be8-87f1-27738ee8285e]     max_size=max_size)
2015-08-07 01:43:02.100 18716 TRACE nova.compute.manager [instance: cd3fa491-fd04-4be8-87f1-27738ee8285e]   File "/usr/lib/python2.7/dist-packages/nova/virt/images.py", line 87, in fetch_to_raw
2015-08-07 01:43:02.100 18716 TRACE nova.compute.manager [instance: cd3fa491-fd04-4be8-87f1-27738ee8285e]     max_size=max_size)
2015-08-07 01:43:02.100 18716 TRACE nova.compute.manager [instance: cd3fa491-fd04-4be8-87f1-27738ee8285e]   File "/usr/lib/python2.7/dist-packages/nova/virt/images.py", line 77, in fetch
2015-08-07 01:43:02.100 18716 TRACE nova.compute.manager [instance: cd3fa491-fd04-4be8-87f1-27738ee8285e]     IMAGE_API.download(context, image_href, dest_path=path)
2015-08-07 01:43:02.100 18716 TRACE nova.compute.manager [instance: cd3fa491-fd04-4be8-87f1-27738ee8285e]   File "/usr/lib/python2.7/dist-packages/nova/image/api.py", line 182, in download
2015-08-07 01:43:02.100 18716 TRACE nova.compute.manager [instance: cd3fa491-fd04-4be8-87f1-27738ee8285e]     dst_path=dest_path)
2015-08-07 01:43:02.100 18716 TRACE nova.compute.manager [instance: cd3fa491-fd04-4be8-87f1-27738ee8285e]   File "/usr/lib/python2.7/dist-packages/nova/image/glance.py", line 362, in download
2015-08-07 01:43:02.100 18716 TRACE nova.compute.manager [instance: cd3fa491-fd04-4be8-87f1-27738ee8285e]     for chunk in image_chunks:
2015-08-07 01:43:02.100 18716 TRACE nova.compute.manager [instance: cd3fa491-fd04-4be8-87f1-27738ee8285e]   File "/usr/lib/python2.7/dist-packages/glanceclient/common/utils.py", line 398, in integrity_iter
2015-08-07 01:43:02.100 18716 TRACE nova.compute.manager [instance: cd3fa491-fd04-4be8-87f1-27738ee8285e]     (md5sum, checksum))
2015-08-07 01:43:02.100 18716 TRACE nova.compute.manager [instance: cd3fa491-fd04-4be8-87f1-27738ee8285e] IOError: [Errno 32] Corrupt image download. Checksum was d41d8cd98f00b204e9800998ecf8427e expected 133eae9fb1c98f45894a4e60d8736619
2015-08-07 01:43:02.100 18716 TRACE nova.compute.manager [instance: cd3fa491-fd04-4be8-87f1-27738ee8285e]
2015-08-07 01:43:02.104 18716 INFO nova.compute.manager [req-66173648-5d32-4ab4-b647-6f571e5a2b76 5f51a7daa18f4465936fbb440ad05471 76cfebd8f2974dad94fd8770da958663 - - -] [instance: cd3fa491-fd04-4be8-87f1-27738ee8285e] Terminating instance
2015-08-07 01:43:02.109 18716 INFO nova.virt.libvirt.driver [-] [instance: cd3fa491-fd04-4be8-87f1-27738ee8285e] During wait destroy, instance disappeared.

No comments:

Post a Comment