VM creation fails if the image has a property with long name or value

Bug #2098384 reported by Balazs Gibizer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
New
Undecided
Rajesh Tailor

Bug Description

Reproduction:
* start devstack from recent master
* add a property to the default cirros image with long name and or value
  $ openstack image set cirros-0.6.3-x86_64-disk --property $(printf %254s |tr " " "x")=$(printf %254s |tr " " "y")

* observe that glance accepted the new property
$ openstack image show cirros-0.6.3-x86_64-disk
+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Field | Value |
+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| checksum | 87617e24a5e30cb3b87fda8c0764838f |
| container_format | bare |
| created_at | 2025-02-10T14:31:23Z |
| disk_format | qcow2 |
| file | /v2/images/f6b95606-af0d-451c-9347-aeb249361fd9/file |
| id | f6b95606-af0d-451c-9347-aeb249361fd9 |
| min_disk | 0 |
| min_ram | 0 |
| name | cirros-0.6.3-x86_64-disk |
| owner | cff27e1b5a814c28a633976ff32127e1 |
| properties | hw_rng_model='virtio', os_hash_algo='sha512', |
| | os_hash_value='9a9bce0083a00939ec17c11febbfc767aa211aaa54f51e75c5a8b271a9b5637c77205a518b7a2007cb391d23cceb01e0e4e8d64832317151bc85b734b92a7be0', os_hidden='False', |
| | owner_specified.openstack.md5='', owner_specified.openstack.object='images/cirros-0.6.3-x86_64-disk', owner_specified.openstack.sha256='', xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
| | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
| | xxxxxxxxxxxxxxx='yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy |
| | yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy' |
| protected | False |
| schema | /v2/schemas/image |
| size | 21692416 |
| status | active |
| tags | |
| updated_at | 2025-02-13T14:52:16Z |
| virtual_size | 117440512 |
| visibility | public |
+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

* boot a VM with the image
$ openstack server create --image cirros-0.6.3-x86_64-disk --flavor c1 --nic none vm1 --wait

Expected:

VM boot successfully

Actual:

VM stuck in BUILD state and conductor logs the following ERROR:

Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server [None req-ce433b30-d919-4bfb-b4e0-001b6a0e38b8 admin admin] Exception during message handling: oslo_db.exception.DBDataError: (pymysql.err.DataError) (1406, "Data too long for column 'key' at row 1")
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server Traceback (most recent call last):
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server File "/opt/stack/data/venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1964, in _exec_single_context
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server self.dialect.do_execute(
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server File "/opt/stack/data/venv/lib/python3.12/site-packages/sqlalchemy/engine/default.py", line 942, in do_execute
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server cursor.execute(statement, parameters)
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server File "/opt/stack/data/venv/lib/python3.12/site-packages/pymysql/cursors.py", line 153, in execute
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server result = self._query(query)
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server ^^^^^^^^^^^^^^^^^^
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server File "/opt/stack/data/venv/lib/python3.12/site-packages/pymysql/cursors.py", line 322, in _query
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server conn.query(q)
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server File "/opt/stack/data/venv/lib/python3.12/site-packages/pymysql/connections.py", line 563, in query
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server self._affected_rows = self._read_query_result(unbuffered=unbuffered)
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server File "/opt/stack/data/venv/lib/python3.12/site-packages/pymysql/connections.py", line 825, in _read_query_result
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server result.read()
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server File "/opt/stack/data/venv/lib/python3.12/site-packages/pymysql/connections.py", line 1199, in read
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server first_packet = self.connection._read_packet()
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server File "/opt/stack/data/venv/lib/python3.12/site-packages/pymysql/connections.py", line 775, in _read_packet
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server packet.raise_for_error()
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server File "/opt/stack/data/venv/lib/python3.12/site-packages/pymysql/protocol.py", line 219, in raise_for_error
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server err.raise_mysql_exception(self._data)
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server File "/opt/stack/data/venv/lib/python3.12/site-packages/pymysql/err.py", line 150, in raise_mysql_exception
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server raise errorclass(errno, errval)
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server pymysql.err.DataError: (1406, "Data too long for column 'key' at row 1")
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server The above exception was the direct cause of the following exception:
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server Traceback (most recent call last):
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server File "/opt/stack/oslo.messaging/oslo_messaging/rpc/server.py", line 174, in _process_incoming
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server res = self.dispatcher.dispatch(message)
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server File "/opt/stack/oslo.messaging/oslo_messaging/rpc/dispatcher.py", line 309, in dispatch
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server return self._do_dispatch(endpoint, method, ctxt, args)
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server File "/opt/stack/oslo.messaging/oslo_messaging/rpc/dispatcher.py", line 229, in _do_dispatch
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server result = func(ctxt, **new_args)
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server ^^^^^^^^^^^^^^^^^^^^^^
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server File "/opt/stack/nova/nova/conductor/manager.py", line 1729, in schedule_and_build_instances
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server instance.create()
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server File "/opt/stack/data/venv/lib/python3.12/site-packages/oslo_versionedobjects/base.py", line 226, in wrapper
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server return fn(self, *args, **kwargs)
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server ^^^^^^^^^^^^^^^^^^^^^^^^^
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server File "/opt/stack/nova/nova/objects/instance.py", line 652, in create
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server db_inst = db.instance_create(self._context, updates)
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server File "/opt/stack/nova/nova/db/utils.py", line 35, in wrapper
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server return f(*args, **kwargs)
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server ^^^^^^^^^^^^^^^^^^
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server File "/opt/stack/data/venv/lib/python3.12/site-packages/oslo_db/api.py", line 144, in wrapper
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server with excutils.save_and_reraise_exception() as ectxt:
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server File "/opt/stack/data/venv/lib/python3.12/site-packages/oslo_utils/excutils.py", line 227, in __exit__
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server self.force_reraise()
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server File "/opt/stack/data/venv/lib/python3.12/site-packages/oslo_utils/excutils.py", line 200, in force_reraise
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server raise self.value
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server File "/opt/stack/data/venv/lib/python3.12/site-packages/oslo_db/api.py", line 142, in wrapper
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server return f(*args, **kwargs)
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server ^^^^^^^^^^^^^^^^^^
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server File "/opt/stack/nova/nova/db/main/api.py", line 207, in wrapper
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server return f(context, *args, **kwargs)
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server ^^^^^^^^^^^^^^^^^^^^^^^^^^^
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server File "/opt/stack/nova/nova/db/main/api.py", line 1291, in instance_create
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server ec2_instance_create(context, instance_ref['uuid'])
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server File "/opt/stack/nova/nova/db/utils.py", line 35, in wrapper
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server return f(*args, **kwargs)
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server ^^^^^^^^^^^^^^^^^^
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server File "/opt/stack/nova/nova/db/main/api.py", line 207, in wrapper
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server return f(context, *args, **kwargs)
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server ^^^^^^^^^^^^^^^^^^^^^^^^^^^
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server File "/opt/stack/nova/nova/db/main/api.py", line 4095, in ec2_instance_create
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server ec2_instance_ref.save(context.session)
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server File "/opt/stack/data/venv/lib/python3.12/site-packages/oslo_db/sqlalchemy/models.py", line 38, in save
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server session.flush()
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server File "/opt/stack/data/venv/lib/python3.12/site-packages/sqlalchemy/orm/session.py", line 4353, in flush
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server self._flush(objects)
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server File "/opt/stack/data/venv/lib/python3.12/site-packages/sqlalchemy/orm/session.py", line 4488, in _flush
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server with util.safe_reraise():
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server File "/opt/stack/data/venv/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py", line 146, in __exit__
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server raise exc_value.with_traceback(exc_tb)
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server File "/opt/stack/data/venv/lib/python3.12/site-packages/sqlalchemy/orm/session.py", line 4449, in _flush
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server flush_context.execute()
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server File "/opt/stack/data/venv/lib/python3.12/site-packages/sqlalchemy/orm/unitofwork.py", line 466, in execute
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server rec.execute(self)
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server File "/opt/stack/data/venv/lib/python3.12/site-packages/sqlalchemy/orm/unitofwork.py", line 642, in execute
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server util.preloaded.orm_persistence.save_obj(
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server File "/opt/stack/data/venv/lib/python3.12/site-packages/sqlalchemy/orm/persistence.py", line 93, in save_obj
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server _emit_insert_statements(
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server File "/opt/stack/data/venv/lib/python3.12/site-packages/sqlalchemy/orm/persistence.py", line 1233, in _emit_insert_statements
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server result = connection.execute(
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server ^^^^^^^^^^^^^^^^^^^
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server File "/opt/stack/data/venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1416, in execute
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server return meth(
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server ^^^^^
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server File "/opt/stack/data/venv/lib/python3.12/site-packages/sqlalchemy/sql/elements.py", line 515, in _execute_on_connection
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server return connection._execute_clauseelement(
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server File "/opt/stack/data/venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1638, in _execute_clauseelement
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server ret = self._execute_context(
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server ^^^^^^^^^^^^^^^^^^^^^^
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server File "/opt/stack/data/venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1843, in _execute_context
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server return self._exec_single_context(
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server ^^^^^^^^^^^^^^^^^^^^^^^^^^
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server File "/opt/stack/data/venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1983, in _exec_single_context
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server self._handle_dbapi_exception(
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server File "/opt/stack/data/venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 2349, in _handle_dbapi_exception
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server raise newraise.with_traceback(exc_info[2]) from e
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server File "/opt/stack/data/venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1964, in _exec_single_context
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server self.dialect.do_execute(
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server File "/opt/stack/data/venv/lib/python3.12/site-packages/sqlalchemy/engine/default.py", line 942, in do_execute
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server cursor.execute(statement, parameters)
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server File "/opt/stack/data/venv/lib/python3.12/site-packages/pymysql/cursors.py", line 153, in execute
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server result = self._query(query)
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server ^^^^^^^^^^^^^^^^^^
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server File "/opt/stack/data/venv/lib/python3.12/site-packages/pymysql/cursors.py", line 322, in _query
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server conn.query(q)
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server File "/opt/stack/data/venv/lib/python3.12/site-packages/pymysql/connections.py", line 563, in query
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server self._affected_rows = self._read_query_result(unbuffered=unbuffered)
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server File "/opt/stack/data/venv/lib/python3.12/site-packages/pymysql/connections.py", line 825, in _read_query_result
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server result.read()
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server File "/opt/stack/data/venv/lib/python3.12/site-packages/pymysql/connections.py", line 1199, in read
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server first_packet = self.connection._read_packet()
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server File "/opt/stack/data/venv/lib/python3.12/site-packages/pymysql/connections.py", line 775, in _read_packet
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server packet.raise_for_error()
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server File "/opt/stack/data/venv/lib/python3.12/site-packages/pymysql/protocol.py", line 219, in raise_for_error
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server err.raise_mysql_exception(self._data)
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server File "/opt/stack/data/venv/lib/python3.12/site-packages/pymysql/err.py", line 150, in raise_mysql_exception
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server raise errorclass(errno, errval)
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server oslo_db.exception.DBDataError: (pymysql.err.DataError) (1406, "Data too long for column 'key' at row 1")
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server [SQL: INSERT INTO instance_system_metadata (`key`, value, instance_uuid, created_at, updated_at, deleted_at, deleted) VALUES (%(key)s, %(value)s, %(instance_uuid)s, %(created_at)s, %(updated_at)s, %(deleted_at)s, %(deleted)s)]
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server [parameters: {'key': 'image_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'value': 'yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy', 'instance_uuid': '52af5fa9-2ccf-40cf-ad6e-2b43c048ad0f', 'created_at': datetime.datetime(2025, 2, 13, 14, 57, 15, 549991), 'updated_at': None, 'deleted_at': None, 'deleted': 0}]
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server (Background on this error at: https://sqlalche.me/e/20/9h9h)
Feb 13 14:57:15 aio-tmp nova-conductor[100069]: ERROR oslo_messaging.rpc.server

Tags: db glance
tags: added: db glance
Revision history for this message
Balazs Gibizer (balazs-gibizer) wrote :

This happens as the Glance's DB model has different column sizes that the Nova's DB model when storing ImageProperties. Also nova stores the ImageProperties in instance_system_metadata with an "image_" prefix making the length of the key different in Nova and Glance.

Nova limits both the key and the value to 255 chars[2].

Glance limits the image property name length by the DB schema to 255 chars[1]. So there is a bug regarding image properties where 249 < len(name) <= 255 as nova will not be able to store them with the extra "image_" prefix in the nova DB.

For the value there is an even bigger gap. Glance only defines it in the DB as Text, while nova also limits it to String(255).

Also note that Nova stores this in the build_requests table as well but there the instance is stored as a json blob in a MediumText column hence the key / value length is not a problem there.

[1]https://github.com/openstack/glance/blob/a468ac01ffa2bc8c7ce73f6be1e8b4a108b4c2cd/glance/db/sqlalchemy/models.py#L163
[2]https://github.com/openstack/nova/blob/master/nova/db/main/models.py#L989-L990

Rajesh Tailor (ratailor)
Changed in nova:
assignee: nobody → Rajesh Tailor (ratailor)
Revision history for this message
sean mooney (sean-k-mooney) wrote :

i belvie this is invlaide

for one it loosk liek there is a bug in the image propeis show impematation

as that show respoocne has values that are not standard image proepreis

nova does not support custom image pripereis any more

so only field defined in our ovo should be displayed

https://github.com/openstack/nova/blob/master/nova/objects/image_meta.py#L314-L615

we previously agreed not to edxted the filed too in the caracal ptg after raising this as an API error in galnce.

the fact owner_specified.openstack.object='images/cirros-0.6.3-x86_64-disk' is in that respocne is a bug.
we should fix our new API before Feature freeze

the bug is here https://review.opendev.org/c/openstack/nova/+/939649/comment/ab5b5248_3da9889b/

Revision history for this message
sean mooney (sean-k-mooney) wrote :

its not the the bug is invliad the bug is just not with glance
its a bug in the new image property show feature as it is not preoply retrieve in the image propereis form the isntace.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/nova/+/942413

Changed in nova:
status: New → In Progress
Revision history for this message
Balazs Gibizer (balazs-gibizer) wrote :

The review https://review.opendev.org/c/openstack/nova/+/942413 is not a fix for this bug but a fix for a related bug about what we show in our API response.

Changed in nova:
status: In Progress → New
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to nova (master)

Reviewed: https://review.opendev.org/c/openstack/nova/+/942413
Committed: https://opendev.org/openstack/nova/commit/c7eac94fc53b02bb890638364f14fbbf361e478a
Submitter: "Zuul (22348)"
Branch: master

commit c7eac94fc53b02bb890638364f14fbbf361e478a
Author: Sean Mooney <email address hidden>
Date: Fri Mar 7 18:08:43 2025 +0000

    only show standard image properties in server show.

    nova stopped supporting custom image properties many years
    ago with the introduction of ovo.

    when the image property show feature was added it incorrectly
    filtered the instance_system_metadata table for the image prefix
    but didnt restrict the responce to only standard image properties

    This change adds that filtering and fixes minor issues with the
    responce schema validation.

    Related-Bug: #2098384
    Change-Id: I11a8783b02f35b7dfc964bf49f1a8a0a2469abc3
    Signed-off-by: Sean Mooney <email address hidden>

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to nova (stable/2025.1)

Related fix proposed to branch: stable/2025.1
Review: https://review.opendev.org/c/openstack/nova/+/957958

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to nova (master)

Related fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/nova/+/958230

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.