Re: [Openstack-operators] [cinder] Cant create Volume from Image, says checksums dont match

2017-10-20 Thread Christopher Hull
Hi Sean;
It works just fine without the check.  This is a hack, not my preferred
solution.  It would be nice if Cinder properly doublechecked the checksum.
But this does work nicely.

The symptom you will get from Horizon is an almost useless error message
telling you to come back later.  Us Java folks believe in proper error
propagation.  Guess PyDevs don't.  heh.  (I do Py too btw).

I am not running any particular distro.  I installed Liberty myself and
developed a small tool to help with custom OPenstack installs.   I would
like to place it in the Operators git.  Had tried that before with
difficulty so I posted to Github.See
https://github.com/chrishull/github-openstack

Anyway, here's my fix with notes

-Chris

---


2017-10-19 14:02:18.334 2787 ERROR oslo_messaging.rpc.dispatcher   File
"/usr/lib/python2.7/site-packages/glanceclient/common/utils.py", line 434,
in integrity_iter

2017-10-19 14:02:18.334 2787 ERROR oslo_messaging.rpc.dispatcher
 (md5sum, checksum))


def integrity_iter(iter, checksum):
"""Check image data integrity.

:raises: IOError
"""
md5sum = hashlib.md5()
for chunk in iter:
yield chunk
if isinstance(chunk, six.string_types):
chunk = six.b(chunk)
md5sum.update(chunk)
md5sum = md5sum.hexdigest()
# if md5sum != checksum:   <--- line 434
#raise IOError(errno.EPIPE,
#  'Corrupt image download. Checksum was %s expected
%s' %
#  (md5sum, checksum))
# Checksum is known to be good and working.  glance to cinder seems to
have an issue
# Code commented out by chris hull on 19 Oct 2017  CTH







- Christopher T. Hull
My contract at NASA has ended and I am seeking new opportunities.
For updated resume and other info, please click this link.
http://faq.chrishull.com
Sunnyvale CA. 94085
(415) 385 4865
chrishul...@gmail.com
http://chrishull.com



On Fri, Oct 20, 2017 at 5:57 AM, Sean McGinnis 
wrote:

> On Thu, Oct 19, 2017 at 06:55:38PM -0700, Christopher Hull wrote:
> > The qcow2 checksums are correct.  They run via nova.
> >
> > I seem to recall that the cinder checksum calculation when reading in an
> > image is faulty.  I'm simply going to remove the offending code.
> > -Chris
> >
>
> I have not heard this before. If you remove that check and verify
> everything is
> working without it, it would be useful to post those results here.
>
> I didn't see an open bug for this. If you could file a bug and include any
> log
> files and details, that would be appreciated:
>
> https://bugs.launchpad.net/cinder
>
> Sean
>
___
OpenStack-operators mailing list
OpenStack-operators@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators


Re: [Openstack-operators] [cinder] Cant create Volume from Image, says checksums dont match

2017-10-20 Thread Sean McGinnis
On Thu, Oct 19, 2017 at 06:55:38PM -0700, Christopher Hull wrote:
> The qcow2 checksums are correct.  They run via nova.
> 
> I seem to recall that the cinder checksum calculation when reading in an
> image is faulty.  I'm simply going to remove the offending code.
> -Chris
> 

I have not heard this before. If you remove that check and verify everything is
working without it, it would be useful to post those results here.

I didn't see an open bug for this. If you could file a bug and include any log
files and details, that would be appreciated:

https://bugs.launchpad.net/cinder

Sean

___
OpenStack-operators mailing list
OpenStack-operators@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators


Re: [Openstack-operators] [cinder] Cant create Volume from Image, says checksums dont match

2017-10-19 Thread Christopher Hull
The qcow2 checksums are correct.  They run via nova.

I seem to recall that the cinder checksum calculation when reading in an
image is faulty.  I'm simply going to remove the offending code.
-Chris


- Christopher T. Hull
My contract at NASA has ended and I am seeking new opportunities.
For updated resume and other info, please click this link.
http://faq.chrishull.com
Sunnyvale CA. 94085
(415) 385 4865
chrishul...@gmail.com
http://chrishull.com



On Thu, Oct 19, 2017 at 2:07 PM, Christopher Hull 
wrote:

> HI guys;
> This used to work.   Trying to come up with an update / backup strategy
> here.   Successfully created an image from a volume (must do as admin it
> seems, but that's not an issue.)  The image runs just fine as an instance
> (creates it's root drive on the controller/cumpute node).
> But when I try to turn the image back into a volume I get this
> nonsense.
>
> Note the warnings in the beginning.  Not sure what these mean.
>
> Running Liberty.
>
> Thanks yet again;
> -Chris
>
> --
>
>
> *2017-10-19 14:00:55.258 2787 INFO
> cinder.volume.flows.manager.create_volume
> [req-174e56ef-9f05-4f54-8e44-d48ee2eab3ac e8e70bfee9034cbe99d68ef5bbde540f
> 7813be77b1de4196b1c6b77006afa21c - - -] Volume
> cfb61fc5-4900-4e39-bda7-66f0f1b46a69: being created as image with
> specification: {'status': u'creating', 'image_location': (None, None),
> 'volume_size': 200, 'volume_name':
> u'volume-cfb61fc5-4900-4e39-bda7-66f0f1b46a69', 'image_id':
> u'37a74759-f002-4fdd-9a83-4ce46ab6c867', 'image_service':
> , 'image_meta':
> {'status': u'active', 'name': u'CentOS-KDE-Desktop2', 'deleted': False,
> 'container_format': u'bare', 'created_at': datetime.datetime(2017, 10, 19,
> 19, 34, 44, tzinfo=), 'disk_format': u'qcow2', 'updated_at':
> datetime.datetime(2017, 10, 19, 20, 2, 45, tzinfo=), 'id':
> u'37a74759-f002-4fdd-9a83-4ce46ab6c867', 'owner':
> u'fdf3f98a9b0c4e9e94603d8a84ea41a8', 'min_ram': 0, 'checksum':
> u'ac1f1ca3c04dd439291fd598d723adb5', 'min_disk': 0, 'is_public': True,
> 'deleted_at': None, 'properties': {}, 'size': 12859670528}}*
>
> *2017-10-19 14:00:55.259 2787 WARNING cinder.context
> [req-174e56ef-9f05-4f54-8e44-d48ee2eab3ac e8e70bfee9034cbe99d68ef5bbde540f
> 7813be77b1de4196b1c6b77006afa21c - - -] Unable to get internal tenant
> context: Missing required config parameters.*
>
> *2017-10-19 14:00:55.259 2787 WARNING
> cinder.volume.flows.manager.create_volume
> [req-174e56ef-9f05-4f54-8e44-d48ee2eab3ac e8e70bfee9034cbe99d68ef5bbde540f
> 7813be77b1de4196b1c6b77006afa21c - - -] Unable to get Cinder internal
> context, will not use image-volume cache.*
>
> *2017-10-19 14:02:18.216 2787 WARNING cinder.volume.manager
> [req-174e56ef-9f05-4f54-8e44-d48ee2eab3ac e8e70bfee9034cbe99d68ef5bbde540f
> 7813be77b1de4196b1c6b77006afa21c - - -] Task
> 'cinder.volume.flows.manager.create_volume.CreateVolumeFromSpecTask;volume:create'
> (fdcc9b52-493d-4fb5-929f-d1554672deb1) transitioned into state 'FAILURE'
> from state 'RUNNING'*
>
> *2017-10-19 14:02:18.216 2787 ERROR cinder.volume.manager Traceback (most
> recent call last):*
>
> *2017-10-19 14:02:18.216 2787 ERROR cinder.volume.manager   File
> "/usr/lib/python2.7/site-packages/taskflow/engines/action_engine/executor.py",
> line 82, in _execute_task*
>
> *2017-10-19 14:02:18.216 2787 ERROR cinder.volume.manager result =
> task.execute(**arguments)*
>
> *2017-10-19 14:02:18.216 2787 ERROR cinder.volume.manager   File
> "/usr/lib/python2.7/site-packages/cinder/volume/flows/manager/create_volume.py",
> line 834, in execute*
>
> *2017-10-19 14:02:18.216 2787 ERROR cinder.volume.manager
> **volume_spec)*
>
> *2017-10-19 14:02:18.216 2787 ERROR cinder.volume.manager   File
> "/usr/lib/python2.7/site-packages/cinder/volume/flows/manager/create_volume.py",
> line 737, in _create_from_image*
>
> *2017-10-19 14:02:18.216 2787 ERROR cinder.volume.manager
> image_service, context, image_id) as tmp_image:*
>
> *2017-10-19 14:02:18.216 2787 ERROR cinder.volume.manager   File
> "/usr/lib64/python2.7/contextlib.py", line 17, in __enter__*
>
> *2017-10-19 14:02:18.216 2787 ERROR cinder.volume.manager return
> self.gen.next()*
>
> *2017-10-19 14:02:18.216 2787 ERROR cinder.volume.manager   File
> "/usr/lib/python2.7/site-packages/cinder/image/image_utils.py", line 540,
> in fetch*
>
> *2017-10-19 14:02:18.216 2787 ERROR cinder.volume.manager
> fetch_verify_image(context, image_service, image_id, tmp)*
>
> *2017-10-19 14:02:18.216 2787 ERROR cinder.volume.manager   File
> "/usr/lib/python2.7/site-packages/cinder/image/image_utils.py", line 204,
> in fetch_verify_image*
>
> *2017-10-19 14:02:18.216 2787 ERROR cinder.volume.manager None, None)*
>
> *2017-10-19 14:02:18.216 2787 ERROR cinder.volume.manager   File
> "/usr/lib/python2.7/site-packages/cinder/image/image_utils.py", line 182,
> in fetch*
>
> *2017-10-19 14:02:18.216 2787 ERROR cinder.volume.manager
> image_service.download(context, image_id, image_file)*
>
> 

[Openstack-operators] [cinder] Cant create Volume from Image, says checksums dont match

2017-10-19 Thread Christopher Hull
HI guys;
This used to work.   Trying to come up with an update / backup strategy
here.   Successfully created an image from a volume (must do as admin it
seems, but that's not an issue.)  The image runs just fine as an instance
(creates it's root drive on the controller/cumpute node).
But when I try to turn the image back into a volume I get this nonsense.

Note the warnings in the beginning.  Not sure what these mean.

Running Liberty.

Thanks yet again;
-Chris

--


*2017-10-19 14:00:55.258 2787 INFO
cinder.volume.flows.manager.create_volume
[req-174e56ef-9f05-4f54-8e44-d48ee2eab3ac e8e70bfee9034cbe99d68ef5bbde540f
7813be77b1de4196b1c6b77006afa21c - - -] Volume
cfb61fc5-4900-4e39-bda7-66f0f1b46a69: being created as image with
specification: {'status': u'creating', 'image_location': (None, None),
'volume_size': 200, 'volume_name':
u'volume-cfb61fc5-4900-4e39-bda7-66f0f1b46a69', 'image_id':
u'37a74759-f002-4fdd-9a83-4ce46ab6c867', 'image_service':
, 'image_meta':
{'status': u'active', 'name': u'CentOS-KDE-Desktop2', 'deleted': False,
'container_format': u'bare', 'created_at': datetime.datetime(2017, 10, 19,
19, 34, 44, tzinfo=), 'disk_format': u'qcow2', 'updated_at':
datetime.datetime(2017, 10, 19, 20, 2, 45, tzinfo=), 'id':
u'37a74759-f002-4fdd-9a83-4ce46ab6c867', 'owner':
u'fdf3f98a9b0c4e9e94603d8a84ea41a8', 'min_ram': 0, 'checksum':
u'ac1f1ca3c04dd439291fd598d723adb5', 'min_disk': 0, 'is_public': True,
'deleted_at': None, 'properties': {}, 'size': 12859670528}}*

*2017-10-19 14:00:55.259 2787 WARNING cinder.context
[req-174e56ef-9f05-4f54-8e44-d48ee2eab3ac e8e70bfee9034cbe99d68ef5bbde540f
7813be77b1de4196b1c6b77006afa21c - - -] Unable to get internal tenant
context: Missing required config parameters.*

*2017-10-19 14:00:55.259 2787 WARNING
cinder.volume.flows.manager.create_volume
[req-174e56ef-9f05-4f54-8e44-d48ee2eab3ac e8e70bfee9034cbe99d68ef5bbde540f
7813be77b1de4196b1c6b77006afa21c - - -] Unable to get Cinder internal
context, will not use image-volume cache.*

*2017-10-19 14:02:18.216 2787 WARNING cinder.volume.manager
[req-174e56ef-9f05-4f54-8e44-d48ee2eab3ac e8e70bfee9034cbe99d68ef5bbde540f
7813be77b1de4196b1c6b77006afa21c - - -] Task
'cinder.volume.flows.manager.create_volume.CreateVolumeFromSpecTask;volume:create'
(fdcc9b52-493d-4fb5-929f-d1554672deb1) transitioned into state 'FAILURE'
from state 'RUNNING'*

*2017-10-19 14:02:18.216 2787 ERROR cinder.volume.manager Traceback (most
recent call last):*

*2017-10-19 14:02:18.216 2787 ERROR cinder.volume.manager   File
"/usr/lib/python2.7/site-packages/taskflow/engines/action_engine/executor.py",
line 82, in _execute_task*

*2017-10-19 14:02:18.216 2787 ERROR cinder.volume.manager result =
task.execute(**arguments)*

*2017-10-19 14:02:18.216 2787 ERROR cinder.volume.manager   File
"/usr/lib/python2.7/site-packages/cinder/volume/flows/manager/create_volume.py",
line 834, in execute*

*2017-10-19 14:02:18.216 2787 ERROR cinder.volume.manager
**volume_spec)*

*2017-10-19 14:02:18.216 2787 ERROR cinder.volume.manager   File
"/usr/lib/python2.7/site-packages/cinder/volume/flows/manager/create_volume.py",
line 737, in _create_from_image*

*2017-10-19 14:02:18.216 2787 ERROR cinder.volume.manager
image_service, context, image_id) as tmp_image:*

*2017-10-19 14:02:18.216 2787 ERROR cinder.volume.manager   File
"/usr/lib64/python2.7/contextlib.py", line 17, in __enter__*

*2017-10-19 14:02:18.216 2787 ERROR cinder.volume.manager return
self.gen.next()*

*2017-10-19 14:02:18.216 2787 ERROR cinder.volume.manager   File
"/usr/lib/python2.7/site-packages/cinder/image/image_utils.py", line 540,
in fetch*

*2017-10-19 14:02:18.216 2787 ERROR cinder.volume.manager
fetch_verify_image(context, image_service, image_id, tmp)*

*2017-10-19 14:02:18.216 2787 ERROR cinder.volume.manager   File
"/usr/lib/python2.7/site-packages/cinder/image/image_utils.py", line 204,
in fetch_verify_image*

*2017-10-19 14:02:18.216 2787 ERROR cinder.volume.manager None, None)*

*2017-10-19 14:02:18.216 2787 ERROR cinder.volume.manager   File
"/usr/lib/python2.7/site-packages/cinder/image/image_utils.py", line 182,
in fetch*

*2017-10-19 14:02:18.216 2787 ERROR cinder.volume.manager
image_service.download(context, image_id, image_file)*

*2017-10-19 14:02:18.216 2787 ERROR cinder.volume.manager   File
"/usr/lib/python2.7/site-packages/cinder/image/glance.py", line 323, in
download*

*2017-10-19 14:02:18.216 2787 ERROR cinder.volume.manager for chunk in
image_chunks:*

*2017-10-19 14:02:18.216 2787 ERROR cinder.volume.manager   File
"/usr/lib/python2.7/site-packages/glanceclient/common/utils.py", line 477,
in __iter__*

*2017-10-19 14:02:18.216 2787 ERROR cinder.volume.manager for chunk in
self.iterable:*

*2017-10-19 14:02:18.216 2787 ERROR cinder.volume.manager   File
"/usr/lib/python2.7/site-packages/glanceclient/common/utils.py", line 434,
in integrity_iter*

*2017-10-19 14:02:18.216 2787 ERROR cinder.volume.manager (md5sum,