Activity log for bug #1717547

Date Who What changed Old value New value Message
2017-09-15 15:56:38 Damien bug added bug
2017-09-15 16:00:53 Damien description When creating a snapshot of a server using the nova API, failure occurs if the image contains the metadata property "version". It seems like image metadata is passed as an argument to _create_v2 (nova/image/glance.py) which is then passed to call (nova/image/glance.py) as kwargs. The function already takes in context, method, and version arguments, so it seems that any of these metadata properties would cause the snapshot to fail. OpenStack version : Pike Nova API version : 2.1 image used: +------------------+----------------------------------------------------------------------------+ | Field | Value | +------------------+----------------------------------------------------------------------------+ | checksum | d19875d33815bd8c49fe39829b1df924 | | container_format | bare | | created_at | 2017-09-05T15:57:24Z | | disk_format | raw | | file | /v2/images/c7f76154-dd99-4102-afe2-662a4fcaba7b/file | | id | c7f76154-dd99-4102-afe2-662a4fcaba7b | | min_disk | 0 | | min_ram | 0 | | name | ubuntu-16.04-amd64_2 | | owner | 71cea55297f94953b33b2a2549d72a95 | | properties | architecture='amd64', direct_url='rbd://8838dc54-c385-4949-9624-1cf3911320 | | | 1d/images/c7f76154-dd99-4102-afe2-662a4fcaba7b/snap', | | | distribution='Ubuntu', family='Linux', username='ubuntu', version='16.04' | | protected | False | | schema | /v2/schemas/image | | size | 2361393152 | | status | active | | tags | | | updated_at | 2017-09-14T21:10:44Z | | virtual_size | None | | visibility | public | +------------------+----------------------------------------------------------------------------+ logs: 2017-09-14 19:57:53.486 27 ERROR nova.api.openstack.extensions [req-eea1ec3c-a500-4006-ab4d-00a05a6b4f33 f25d972f420840e48163a55bf5713bf6 c657c15a0a13435bbe2c323c732d4e4f - 0e46d3ad069b4f0e85bf594de38fbe0e 0e46d3ad069b4f0e85bf594de38fbe0e] Unexpected exception in API method: TypeError: call() got multiple values for keyword argument 'version' 2017-09-14 19:57:53.486 27 ERROR nova.api.openstack.extensions Traceback (most recent call last): 2017-09-14 19:57:53.486 27 ERROR nova.api.openstack.extensions File "/var/lib/kolla/venv/local/lib/python2.7/site-packages/nova/api/openstack/extensions.py", line 336, in wrapped 2017-09-14 19:57:53.486 27 ERROR nova.api.openstack.extensions return f(*args, **kwargs) 2017-09-14 19:57:53.486 27 ERROR nova.api.openstack.extensions File "/var/lib/kolla/venv/local/lib/python2.7/site-packages/nova/api/openstack/common.py", line 356, in inner 2017-09-14 19:57:53.486 27 ERROR nova.api.openstack.extensions return f(*args, **kwargs) 2017-09-14 19:57:53.486 27 ERROR nova.api.openstack.extensions File "/var/lib/kolla/venv/local/lib/python2.7/site-packages/nova/api/validation/__init__.py", line 108, in wrapper 2017-09-14 19:57:53.486 27 ERROR nova.api.openstack.extensions return func(*args, **kwargs) 2017-09-14 19:57:53.486 27 ERROR nova.api.openstack.extensions File "/var/lib/kolla/venv/local/lib/python2.7/site-packages/nova/api/validation/__init__.py", line 108, in wrapper 2017-09-14 19:57:53.486 27 ERROR nova.api.openstack.extensions return func(*args, **kwargs) 2017-09-14 19:57:53.486 27 ERROR nova.api.openstack.extensions File "/var/lib/kolla/venv/local/lib/python2.7/site-packages/nova/api/openstack/compute/servers.py", line 999, in _action_create_image 2017-09-14 19:57:53.486 27 ERROR nova.api.openstack.extensions extra_properties=metadata) 2017-09-14 19:57:53.486 27 ERROR nova.api.openstack.extensions File "/var/lib/kolla/venv/local/lib/python2.7/site-packages/nova/compute/api.py", line 208, in _wrapped 2017-09-14 19:57:53.486 27 ERROR nova.api.openstack.extensions return fn(self, context, instance, *args, **kwargs) 2017-09-14 19:57:53.486 27 ERROR nova.api.openstack.extensions File "/var/lib/kolla/venv/local/lib/python2.7/site-packages/nova/compute/api.py", line 148, in inner 2017-09-14 19:57:53.486 27 ERROR nova.api.openstack.extensions return f(self, context, instance, *args, **kw) 2017-09-14 19:57:53.486 27 ERROR nova.api.openstack.extensions File "/var/lib/kolla/venv/local/lib/python2.7/site-packages/nova/compute/api.py", line 2684, in snapshot 2017-09-14 19:57:53.486 27 ERROR nova.api.openstack.extensions extra_properties=extra_properties) 2017-09-14 19:57:53.486 27 ERROR nova.api.openstack.extensions File "/var/lib/kolla/venv/local/lib/python2.7/site-packages/nova/compute/api.py", line 2754, in _create_image 2017-09-14 19:57:53.486 27 ERROR nova.api.openstack.extensions return self.image_api.create(context, image_meta) 2017-09-14 19:57:53.486 27 ERROR nova.api.openstack.extensions File "/var/lib/kolla/venv/local/lib/python2.7/site-packages/nova/image/api.py", line 108, in create 2017-09-14 19:57:53.486 27 ERROR nova.api.openstack.extensions return session.create(context, image_info, data=data) 2017-09-14 19:57:53.486 27 ERROR nova.api.openstack.extensions File "/var/lib/kolla/venv/local/lib/python2.7/site-packages/nova/image/glance.py", line 390, in create 2017-09-14 19:57:53.486 27 ERROR nova.api.openstack.extensions data, force_activate) 2017-09-14 19:57:53.486 27 ERROR nova.api.openstack.extensions File "/var/lib/kolla/venv/local/lib/python2.7/site-packages/nova/image/glance.py", line 467, in _create_v2 2017-09-14 19:57:53.486 27 ERROR nova.api.openstack.extensions context, 2, 'create', **sent_service_image_meta) 2017-09-14 19:57:53.486 27 ERROR nova.api.openstack.extensions TypeError: call() got multiple values for keyword argument 'version' 2017-09-14 19:57:53.486 27 ERROR nova.api.openstack.extensions <type 'exceptions.TypeError'> Description: When creating a snapshot of a server using the nova API, failure occurs if the image contains the metadata property "version". It seems like image metadata is passed as an argument to _create_v2 (nova/image/glance.py) which is then passed to call (nova/image/glance.py) as kwargs. The function already takes in context, method, and version arguments, so it seems that any of these metadata properties would cause the snapshot to fail. OpenStack version : Pike Nova API version : 2.1 Steps to reporduce: 1. Create an image with metadata property "version" 2. Launch an server using this image 3. Try to create a server snapshot of the server you just launched image used: +------------------+----------------------------------------------------------------------------+ | Field | Value | +------------------+----------------------------------------------------------------------------+ | checksum | d19875d33815bd8c49fe39829b1df924 | | container_format | bare | | created_at | 2017-09-05T15:57:24Z | | disk_format | raw | | file | /v2/images/c7f76154-dd99-4102-afe2-662a4fcaba7b/file | | id | c7f76154-dd99-4102-afe2-662a4fcaba7b | | min_disk | 0 | | min_ram | 0 | | name | ubuntu-16.04-amd64_2 | | owner | 71cea55297f94953b33b2a2549d72a95 | | properties | architecture='amd64', direct_url='rbd://8838dc54-c385-4949-9624-1cf3911320 | | | 1d/images/c7f76154-dd99-4102-afe2-662a4fcaba7b/snap', | | | distribution='Ubuntu', family='Linux', username='ubuntu', version='16.04' | | protected | False | | schema | /v2/schemas/image | | size | 2361393152 | | status | active | | tags | | | updated_at | 2017-09-14T21:10:44Z | | virtual_size | None | | visibility | public | +------------------+----------------------------------------------------------------------------+ Expected result: succesfully create server snapshot Actual result: logs: 2017-09-14 19:57:53.486 27 ERROR nova.api.openstack.extensions [req-eea1ec3c-a500-4006-ab4d-00a05a6b4f33 f25d972f420840e48163a55bf5713bf6 c657c15a0a13435bbe2c323c732d4e4f - 0e46d3ad069b4f0e85bf594de38fbe0e 0e46d3ad069b4f0e85bf594de38fbe0e] Unexpected exception in API method: TypeError: call() got multiple values for keyword argument 'version' 2017-09-14 19:57:53.486 27 ERROR nova.api.openstack.extensions Traceback (most recent call last): 2017-09-14 19:57:53.486 27 ERROR nova.api.openstack.extensions File "/var/lib/kolla/venv/local/lib/python2.7/site-packages/nova/api/openstack/extensions.py", line 336, in wrapped 2017-09-14 19:57:53.486 27 ERROR nova.api.openstack.extensions return f(*args, **kwargs) 2017-09-14 19:57:53.486 27 ERROR nova.api.openstack.extensions File "/var/lib/kolla/venv/local/lib/python2.7/site-packages/nova/api/openstack/common.py", line 356, in inner 2017-09-14 19:57:53.486 27 ERROR nova.api.openstack.extensions return f(*args, **kwargs) 2017-09-14 19:57:53.486 27 ERROR nova.api.openstack.extensions File "/var/lib/kolla/venv/local/lib/python2.7/site-packages/nova/api/validation/__init__.py", line 108, in wrapper 2017-09-14 19:57:53.486 27 ERROR nova.api.openstack.extensions return func(*args, **kwargs) 2017-09-14 19:57:53.486 27 ERROR nova.api.openstack.extensions File "/var/lib/kolla/venv/local/lib/python2.7/site-packages/nova/api/validation/__init__.py", line 108, in wrapper 2017-09-14 19:57:53.486 27 ERROR nova.api.openstack.extensions return func(*args, **kwargs) 2017-09-14 19:57:53.486 27 ERROR nova.api.openstack.extensions File "/var/lib/kolla/venv/local/lib/python2.7/site-packages/nova/api/openstack/compute/servers.py", line 999, in _action_create_image 2017-09-14 19:57:53.486 27 ERROR nova.api.openstack.extensions extra_properties=metadata) 2017-09-14 19:57:53.486 27 ERROR nova.api.openstack.extensions File "/var/lib/kolla/venv/local/lib/python2.7/site-packages/nova/compute/api.py", line 208, in _wrapped 2017-09-14 19:57:53.486 27 ERROR nova.api.openstack.extensions return fn(self, context, instance, *args, **kwargs) 2017-09-14 19:57:53.486 27 ERROR nova.api.openstack.extensions File "/var/lib/kolla/venv/local/lib/python2.7/site-packages/nova/compute/api.py", line 148, in inner 2017-09-14 19:57:53.486 27 ERROR nova.api.openstack.extensions return f(self, context, instance, *args, **kw) 2017-09-14 19:57:53.486 27 ERROR nova.api.openstack.extensions File "/var/lib/kolla/venv/local/lib/python2.7/site-packages/nova/compute/api.py", line 2684, in snapshot 2017-09-14 19:57:53.486 27 ERROR nova.api.openstack.extensions extra_properties=extra_properties) 2017-09-14 19:57:53.486 27 ERROR nova.api.openstack.extensions File "/var/lib/kolla/venv/local/lib/python2.7/site-packages/nova/compute/api.py", line 2754, in _create_image 2017-09-14 19:57:53.486 27 ERROR nova.api.openstack.extensions return self.image_api.create(context, image_meta) 2017-09-14 19:57:53.486 27 ERROR nova.api.openstack.extensions File "/var/lib/kolla/venv/local/lib/python2.7/site-packages/nova/image/api.py", line 108, in create 2017-09-14 19:57:53.486 27 ERROR nova.api.openstack.extensions return session.create(context, image_info, data=data) 2017-09-14 19:57:53.486 27 ERROR nova.api.openstack.extensions File "/var/lib/kolla/venv/local/lib/python2.7/site-packages/nova/image/glance.py", line 390, in create 2017-09-14 19:57:53.486 27 ERROR nova.api.openstack.extensions data, force_activate) 2017-09-14 19:57:53.486 27 ERROR nova.api.openstack.extensions File "/var/lib/kolla/venv/local/lib/python2.7/site-packages/nova/image/glance.py", line 467, in _create_v2 2017-09-14 19:57:53.486 27 ERROR nova.api.openstack.extensions context, 2, 'create', **sent_service_image_meta) 2017-09-14 19:57:53.486 27 ERROR nova.api.openstack.extensions TypeError: call() got multiple values for keyword argument 'version' 2017-09-14 19:57:53.486 27 ERROR nova.api.openstack.extensions <type 'exceptions.TypeError'>
2017-09-15 16:06:20 Sylvain Bauza nova: status New Confirmed
2017-09-15 16:06:24 Sylvain Bauza nova: importance Undecided Low
2017-09-15 16:07:07 Sylvain Bauza tags low-hanging-fruit snapshot
2017-09-15 16:07:25 Sylvain Bauza tags low-hanging-fruit snapshot low-hanging-fruit openstack-version.pike snapshot
2017-09-28 10:29:50 priyaduggirala nova: assignee priyaduggirala (priyad)
2017-09-29 13:23:48 priyaduggirala nova: status Confirmed In Progress
2017-09-29 19:36:17 Matt Riedemann nominated for series nova/ocata
2017-09-29 19:36:17 Matt Riedemann bug task added nova/ocata
2017-09-29 19:36:17 Matt Riedemann nominated for series nova/pike
2017-09-29 19:36:17 Matt Riedemann bug task added nova/pike
2017-10-04 13:31:50 Matt Riedemann nova/pike: status New Confirmed
2017-10-04 13:31:52 Matt Riedemann nova/ocata: status New Confirmed
2018-01-31 06:35:48 priyaduggirala nova: assignee priyaduggirala (priyad)
2018-02-14 13:15:13 priyaduggirala nova: status In Progress Confirmed
2018-05-10 13:05:34 OpenStack Infra nova: status Confirmed In Progress
2018-05-10 13:05:34 OpenStack Infra nova: assignee Lee Yarwood (lyarwood)
2018-10-30 20:52:29 OpenStack Infra nova: assignee Lee Yarwood (lyarwood) Jay Pipes (jaypipes)
2018-11-06 21:24:07 OpenStack Infra nova: status In Progress Fix Released
2019-04-05 22:18:55 Matt Riedemann nominated for series nova/queens
2019-04-05 22:18:55 Matt Riedemann bug task added nova/queens
2019-04-05 22:18:55 Matt Riedemann nominated for series nova/rocky
2019-04-05 22:18:55 Matt Riedemann bug task added nova/rocky
2019-04-05 22:19:02 Matt Riedemann nova/queens: status New In Progress
2019-04-05 22:19:05 Matt Riedemann nova/rocky: status New In Progress
2019-04-05 22:19:12 Matt Riedemann nova/ocata: importance Undecided Low
2019-04-05 22:19:23 Matt Riedemann nova/pike: importance Undecided Low
2019-04-05 22:19:28 Matt Riedemann nova/queens: assignee Lee Yarwood (lyarwood)
2019-04-05 22:19:32 Matt Riedemann nova/rocky: assignee Lee Yarwood (lyarwood)
2019-04-05 22:19:35 Matt Riedemann nova/queens: importance Undecided Low
2019-04-05 22:19:37 Matt Riedemann nova/rocky: importance Undecided Low
2019-04-06 09:55:32 OpenStack Infra nova/rocky: status In Progress Fix Committed
2019-04-06 19:18:54 OpenStack Infra nova/queens: assignee Lee Yarwood (lyarwood) Matt Riedemann (mriedem)
2019-04-08 02:49:17 OpenStack Infra nova/queens: status In Progress Fix Committed