yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #76060
[Bug 1806239] [NEW] nova-api should handle type conversion while creating server snapshots
Public bug reported:
Hi all,
We are running on rocky, when we create a snapshot we are hitting at the
following error.
dilip@ThinkPad-T430:~$ openstack server image create --name backupc_snap
backuppc
400 Bad Request: Provided object does not match schema 'image': u'False'
is not of type 'boolean': Failed validating 'type' in
schema['properties']['os_hidden']:: {'description': u'If true, image
will not appear in default image list response.',: 'type': 'boolean'}:
On instance['os_hidden']:: u'False' (HTTP 400) (HTTP 400) (Request-ID:
req-e19827a6-9e43-4eca-89bd-92fecf05557f)
AFAIK , glance recently introduced os_hidden boolean attribute to image by default and its not being converted to correct type by nova api
the log file is below
root@ctrl2:~# tail -f /var/log/nova/nova-api.log | grep ERROR
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi [req-f93abf09-ed22-45c7-972e-1d6f0c0e3343 ff9650c86533492581513eca72b48409 2eea218eea984dd68f1378ea21c64b83 - 765703fcca634b149c7a012626847d2f 765703fcca634b149c7a012626847d2f] Unexpected exception in API method: TypeError: Unable to set 'os_hidden' to 'False'. Reason: u'False' is not of type u'boolean'
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi Traceback (most recent call last):
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/nova/api/openstack/wsgi.py", line 801, in wrapped
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi return f(*args, **kwargs)
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/nova/api/validation/__init__.py", line 110, in wrapper
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi return func(*args, **kwargs)
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/nova/api/validation/__init__.py", line 110, in wrapper
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi return func(*args, **kwargs)
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/nova/api/openstack/compute/servers.py", line 1041, in _action_create_image
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi extra_properties=metadata)
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/nova/compute/api.py", line 213, in _wrapped
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi return fn(self, context, instance, *args, **kwargs)
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/nova/compute/api.py", line 153, in inner
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi return f(self, context, instance, *args, **kw)
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/nova/compute/api.py", line 2815, in snapshot
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi extra_properties=extra_properties)
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/nova/compute/api.py", line 2888, in _create_image
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi return self.image_api.create(context, image_meta)
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/nova/image/api.py", line 118, in create
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi return session.create(context, image_info, data=data)
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/nova/image/glance.py", line 460, in create
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi data, force_activate)
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/nova/image/glance.py", line 537, in _create_v2
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi context, 2, 'create', **sent_service_image_meta)
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/nova/image/glance.py", line 179, in call
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi result = getattr(controller, method)(*args, **kwargs)
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/glanceclient/common/utils.py", line 545, in inner
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi return RequestIdProxy(wrapped(*args, **kwargs))
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/glanceclient/v2/images.py", line 281, in create
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi raise TypeError(encodeutils.exception_to_unicode(e))
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi TypeError: Unable to set 'os_hidden' to 'False'. Reason: u'False' is not of type u'boolean'
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi Failed validating u'type' in schema[u'properties'][u'os_hidden']:
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi {u'description': u'If true, image will not appear in default image list response.',
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi u'type': u'boolean'}
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi On instance[u'os_hidden']:
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi u'False'
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi
** Affects: nova
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1806239
Title:
nova-api should handle type conversion while creating server snapshots
Status in OpenStack Compute (nova):
New
Bug description:
Hi all,
We are running on rocky, when we create a snapshot we are hitting at
the following error.
dilip@ThinkPad-T430:~$ openstack server image create --name
backupc_snap backuppc
400 Bad Request: Provided object does not match schema 'image':
u'False' is not of type 'boolean': Failed validating 'type' in
schema['properties']['os_hidden']:: {'description': u'If true, image
will not appear in default image list response.',: 'type': 'boolean'}:
On instance['os_hidden']:: u'False' (HTTP 400) (HTTP 400) (Request-ID:
req-e19827a6-9e43-4eca-89bd-92fecf05557f)
AFAIK , glance recently introduced os_hidden boolean attribute to image by default and its not being converted to correct type by nova api
the log file is below
root@ctrl2:~# tail -f /var/log/nova/nova-api.log | grep ERROR
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi [req-f93abf09-ed22-45c7-972e-1d6f0c0e3343 ff9650c86533492581513eca72b48409 2eea218eea984dd68f1378ea21c64b83 - 765703fcca634b149c7a012626847d2f 765703fcca634b149c7a012626847d2f] Unexpected exception in API method: TypeError: Unable to set 'os_hidden' to 'False'. Reason: u'False' is not of type u'boolean'
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi Traceback (most recent call last):
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/nova/api/openstack/wsgi.py", line 801, in wrapped
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi return f(*args, **kwargs)
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/nova/api/validation/__init__.py", line 110, in wrapper
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi return func(*args, **kwargs)
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/nova/api/validation/__init__.py", line 110, in wrapper
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi return func(*args, **kwargs)
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/nova/api/openstack/compute/servers.py", line 1041, in _action_create_image
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi extra_properties=metadata)
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/nova/compute/api.py", line 213, in _wrapped
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi return fn(self, context, instance, *args, **kwargs)
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/nova/compute/api.py", line 153, in inner
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi return f(self, context, instance, *args, **kw)
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/nova/compute/api.py", line 2815, in snapshot
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi extra_properties=extra_properties)
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/nova/compute/api.py", line 2888, in _create_image
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi return self.image_api.create(context, image_meta)
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/nova/image/api.py", line 118, in create
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi return session.create(context, image_info, data=data)
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/nova/image/glance.py", line 460, in create
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi data, force_activate)
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/nova/image/glance.py", line 537, in _create_v2
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi context, 2, 'create', **sent_service_image_meta)
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/nova/image/glance.py", line 179, in call
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi result = getattr(controller, method)(*args, **kwargs)
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/glanceclient/common/utils.py", line 545, in inner
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi return RequestIdProxy(wrapped(*args, **kwargs))
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/glanceclient/v2/images.py", line 281, in create
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi raise TypeError(encodeutils.exception_to_unicode(e))
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi TypeError: Unable to set 'os_hidden' to 'False'. Reason: u'False' is not of type u'boolean'
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi Failed validating u'type' in schema[u'properties'][u'os_hidden']:
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi {u'description': u'If true, image will not appear in default image list response.',
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi u'type': u'boolean'}
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi On instance[u'os_hidden']:
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi u'False'
2018-12-02 13:20:15.446 3377353 ERROR nova.api.openstack.wsgi
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1806239/+subscriptions
Follow ups