Public bug reported:
The upgrade from Precise+Essex to Precise+Folsom using the ubuntu-cloud
archive fails while running the 092_add_instance_system_metadata
migration. The migration fails while creating the
`instance_system_metadata` table (see below).
The '1005' MySQL error indicates that a foreign key is failing to apply.
After changing the table definition in the table to include
`mysql_charset='utf8'` the migration succeeds (see attached bug). This
is a similar bug that the `dns_domains` table had previously.
Error message received during package upgrade:
2012-10-04 10:59:55 INFO sqlalchemy.engine.base.Engine [-] SHOW CREATE TABLE
`instances`
2012-10-04 10:59:55 INFO sqlalchemy.engine.base.Engine [-] ()
2012-10-04 10:59:55 DEBUG sqlalchemy.engine.base.Engine [-] Col ('Table',
'Create Table') from (pid=24755) __init__
/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py:2789
2012-10-04 10:59:55 DEBUG sqlalchemy.engine.base.Engine [-] Row ('instances',
'CREATE TABLE `instances` (\n `created_at` datetime DEFAULT NULL,\n
`updated_at` datetime DEFAULT NULL,\n `deleted_at` datetime DEFAULT NULL,\n
`deleted` tinyint(1) DEFAULT NULL,\n `id` int(11) NOT NULL AUTO_INCREMENT,\n
`internal_id` int(11) DEFAULT NULL,\n`user_id` varchar(255) DEFAULT NULL,\n
`project_id` varchar(255) DEFAULT NULL,\n `image_ref` varchar(255) DEFAULT
NULL,\n `kernel_id` varchar(255) DEFAULT NULL,\n `ramdisk_id` varchar(255)
DEFAULT NULL,\n `server_name` varchar(255) DEFAULT NULL,\n `launch_index`
int(11) DEFAULT NULL,\n `key_name` varchar(255) DEFAULT NULL,\n `key_data`
mediumtext,\n `power_state` int(11) DEFAULT NULL,\n `vm_state` varchar(255)
DEFAULT NULL,\n `memory_mb` int(11) DEFAULT NULL,\n `vcpus` int(11) DEFAULT
NULL,\n `hostname` varchar(255) DEFAULT NULL,\n `host` varchar(255) DEFAULT
NULL,\n `user_data` mediumtext,\n `reservation_id` varchar(255) DEFAULT
NULL,\n `scheduled_at` datetime DEFAULT NULL,\n `launched_at` datetime
DEFAULT NULL,\n `terminated_at` datetime DEFAULT NULL,\n `display_name`
varchar(255) DEFAULT NULL,\n `display_description` varchar(255) DEFAULT
NULL,\n `availability_zone` varchar(255) DEFAULT NULL,\n `locked` tinyint(1)
DEFAULT NULL,\n `os_type` varchar(255) DEFAULT NULL,\n `launched_on`
ediumtext,\n `instance_type_id` int(11) DEFAULT NULL,\n `vm_mode`
varchar(255) DEFAULT NULL,\n `uuid` varchar(36) DEFAULT NULL,\n
`architecture` varchar(255) DEFAULT NULL,\n `root_device_name` varchar(255)
DEFAULT NULL,\n access_ip_v4` varchar(255) DEFAULT NULL,\n `access_ip_v6`
varchar(255) DEFAULT NULL,\n `config_drive` varchar(255) DEFAULT NULL,\n
`task_state` varchar(255) DEFAULT NULL,\n `default_ephemeral_device`
varchar(255) DEFAULT NULL,\n `default_swap_device` varchar(255) DEFAULT
NULL,\n `progress` int(11) DEFAULT NULL,\n `auto_disk_config` tinyint(1)
DEFAULT NULL,\n `shutdown_terminate` tinyint(1) DEFAULT NULL,\n
`disable_terminate` tinyint(1) DEFAULT NULL,\n `root_gb` int(11) DEFAULT
NULL,\n `ephemeral_gb` int(11) DEFAULT NULL,\n `cell_name` varchar(255)
DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `uuid` (`uuid`),\n KEY
`project_id` (`project_id`)\n) ENGINE=InnoDB AUTO_INCREMENT=17623 DEFAULT
CHARSET=utf8') from (pid=24755) process_rows
/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py:3194
2012-10-04 10:59:55 DEBUG sqlalchemy.pool.QueuePool [-] Connection
<_mysql.connection open to '10.55.58.1' at 28b0ed0> being returned to pool from
(pid=24755) _finalize_fairy
/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py:3
64
2012-10-04 10:59:55 DEBUG sqlalchemy.pool.QueuePool [-] Connection
<_mysql.connection open to '10.55.58.1' at 28b0ed0> checked out from pool from
(pid=24755) __init__ /usr/lib/python2.7/dist-packages/sqlalchemy/pool.py:401
2012-10-04 10:59:55 INFO sqlalchemy.engine.base.Engine [-]
CREATE TABLE instance_system_metadata (
created_at DATETIME,
updated_at DATETIME,
deleted_at DATETIME,
deleted BOOL,
id INTEGER NOT NULL AUTO_INCREMENT,
instance_uuid VARCHAR(36) NOT NULL,
`key` VARCHAR(255) NOT NULL,
value VARCHAR(255),
PRIMARY KEY (id),
CHECK (deleted IN (0, 1)),
FOREIGN KEY(instance_uuid) REFERENCES instances (uuid)
)ENGINE=InnoDB
2012-10-04 10:59:55 INFO sqlalchemy.engine.base.Engine [-] ()
2012-10-04 10:59:55 INFO sqlalchemy.engine.base.Engine [-] ROLLBACK
2012-10-04 10:59:55 DEBUG sqlalchemy.pool.QueuePool [-] Connection
<_mysql.connection open to '10.55.58.1' at 28b0ed0> being returned to pool from
(pid=24755) _finalize_fairy
/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py:364
No handlers could be found for logger "092_add_instance_system_metadata"
Command failed, please check log for more info
2012-10-04 10:59:55 CRITICAL nova [-] (OperationalError) (1005, "Can't create
table 'nova.instance_system_metadata' (errno: 150)") '\nCREATE TABLE
instance_system_metadata (\n\tcreated_at DATETIME, \n\tupdated_at DATETIME,
\n\tdeleted_at DATETIME, \n\tdeleted BOOL, \n\tid INTEGER NOT NULL
AUTO_INCREMENT, \n\tinstance_uuid VARCHAR(36) NOT NULL, \n\t`key` VARCHAR(255)
NOT NULL, \n\tvalue VARCHAR(255), \n\tPRIMARY KEY (id), \n\tCHECK (deleted IN
(0, 1)), \n\tFOREIGN KEY(instance_uuid) REFERENCES instances
(uuid)\n)ENGINE=InnoDB\n\n' ()
System information:
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.04
DISTRIB_CODENAME=precise
DISTRIB_DESCRIPTION="Ubuntu 12.04.1 LTS"
$ dpkg -l | grep nova
ii nova-api 2012.2-0ubuntu3~cloud0
OpenStack Compute - API frontend
ii nova-cert 2012.2-0ubuntu3~cloud0
OpenStack Compute - certificate management
ii nova-common 2012.2-0ubuntu3~cloud0
OpenStack Compute - common files
ii nova-doc 2012.2-0ubuntu3~cloud0
OpenStack Compute - documentation
ii nova-network 2012.2-0ubuntu3~cloud0
OpenStack Compute - Network manager
ii nova-objectstore 2012.2-0ubuntu3~cloud0
OpenStack Compute - object store
ii nova-scheduler 2012.2-0ubuntu3~cloud0
OpenStack Compute - virtual machine scheduler
ii python-nova 2012.2-0ubuntu3~cloud0
OpenStack Compute Python libraries
ii python-novaclient 1:2.9.0-0ubuntu1~cloud0
client library for OpenStack Compute API
** Affects: nova (Ubuntu)
Importance: Undecided
Status: New
** Tags: canonistack
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1062277
Title:
092_add_instance_system_metadata migration fails when upgrading
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nova/+bug/1062277/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs