Bug 998617
Summary: | when using qpid, metadata arguments cause volume cloning to fail | ||
---|---|---|---|
Product: | Red Hat OpenStack | Reporter: | Giulio Fidente <gfidente> |
Component: | openstack-cinder | Assignee: | Flavio Percoco <fpercoco> |
Status: | CLOSED ERRATA | QA Contact: | Giulio Fidente <gfidente> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | 3.0 | CC: | abaron, eharney, fpercoco, hateya, mlopes, sclewis, yeylon |
Target Milestone: | beta | ||
Target Release: | 4.0 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | storage | ||
Fixed In Version: | openstack-cinder-2013.2-1.el6ost | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2013-12-20 00:19:45 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | 1031766 | ||
Bug Blocks: |
Description
Giulio Fidente
2013-08-19 15:33:52 UTC
cinder api.log reports some rather long traceback: InternalError: Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/qpid/messaging/driver.py", line 511, in dispatch self.engine.dispatch() File "/usr/lib/python2.6/site-packages/qpid/messaging/driver.py", line 815, in dispatch self.process(ssn) File "/usr/lib/python2.6/site-packages/qpid/messaging/driver.py", line 1050, in process self.send(snd, msg) File "/usr/lib/python2.6/site-packages/qpid/messaging/driver.py", line 1261, in send body = enc(msg.content) File "/usr/lib/python2.6/site-packages/qpid/messaging/message.py", line 28, in encode sc.write_primitive(type, x) File "/usr/lib/python2.6/site-packages/qpid/codec010.py", line 73, in write_primitive getattr(self, "write_%s" % type.NAME)(v) File "/usr/lib/python2.6/site-packages/qpid/codec010.py", line 257, in write_map sc.write(string.joinfields(map(self._write_map_elem, m.keys(), m.values()), "")) File "/usr/lib/python2.6/site-packages/qpid/codec010.py", line 250, in _write_map_elem sc.write_primitive(type, v) File "/usr/lib/python2.6/site-packages/qpid/codec010.py", line 73, in write_primitive getattr(self, "write_%s" % type.NAME)(v) File "/usr/lib/python2.6/site-packages/qpid/codec010.py", line 257, in write_map sc.write(string.joinfields(map(self._write_map_elem, m.keys(), m.values()), "")) File "/usr/lib/python2.6/site-packages/qpid/codec010.py", line 250, in _write_map_elem sc.write_primitive(type, v) File "/usr/lib/python2.6/site-packages/qpid/codec010.py", line 73, in write_primitive getattr(self, "write_%s" % type.NAME)(v) File "/usr/lib/python2.6/site-packages/qpid/codec010.py", line 257, in write_map sc.write(string.joinfields(map(self._write_map_elem, m.keys(), m.values()), "")) File "/usr/lib/python2.6/site-packages/qpid/codec010.py", line 250, in _write_map_elem sc.write_primitive(type, v) File "/usr/lib/python2.6/site-packages/qpid/codec010.py", line 73, in write_primitive getattr(self, "write_%s" % type.NAME)(v) File "/usr/lib/python2.6/site-packages/qpid/codec010.py", line 257, in write_map sc.write(string.joinfields(map(self._write_map_elem, m.keys(), m.values()), "")) File "/usr/lib/python2.6/site-packages/qpid/codec010.py", line 250, in _write_map_elem sc.write_primitive(type, v) File "/usr/lib/python2.6/site-packages/qpid/codec010.py", line 73, in write_primitive getattr(self, "write_%s" % type.NAME)(v) File "/usr/lib/python2.6/site-packages/qpid/codec010.py", line 300, in write_list type = self.encoding(o) File "/usr/lib/python2.6/site-packages/qpid/codec010.py", line 59, in encoding raise CodecException("no encoding for %r" % obj) CodecException: no encoding for <cinder.db.sqlalchemy.models.VolumeMetadata object at 0x458e610> What's happening here is that jsonutils.to_primitive is not being called when source_volid is present. The diference is that source_volid skips the scheduler by calling rpcapi.cast directly. While the schedulare_rpcapi serializes volume's specs correctly, the direct cast executed when source_volid is passed doesn't. https://github.com/openstack/cinder/blob/stable/grizzly/cinder/volume/api.py#L260 This doesn't seem to happen in Havana, though. Most of the code involved in the volume creation was re-factored as part of the task flow blueprint, which most have fixed this issue. After some more digging, I think the proposed patch should also go into master, although I couldn't replicated the bug there. Also fixed in openstack-cinder-2013.1.4-1.el6ost via rebase. Auto adding >= MODIFIED bugs to beta verified using: openstack-cinder-2013.2-3.el6ost.noarch Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHEA-2013-1859.html |