Comment 4 for bug 1662849

Revision history for this message
Marius Cornea (mcornea) wrote :

Quick update on this:

## Before running the upgrade, on fresh Newton installation:

## gnocchi before upgrade, newton
MariaDB [(none)]> use gnocchi;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
MariaDB [gnocchi]> SHOW CREATE TABLE metric;
+--------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table |
+--------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| metric | CREATE TABLE `metric` (
  `id` binary(16) NOT NULL,
  `archive_policy_name` varchar(255) NOT NULL,
  `created_by_user_id` varchar(255) DEFAULT NULL,
  `created_by_project_id` varchar(255) DEFAULT NULL,
  `resource_id` binary(16) DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `unit` varchar(31) DEFAULT NULL,
  `status` enum('active','delete') NOT NULL DEFAULT 'active',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_metric0resource_id0name` (`resource_id`,`name`),
  KEY `fk_metric_ap_name_ap_name` (`archive_policy_name`),
  KEY `ix_metric_status` (`status`),
  CONSTRAINT `fk_metric_ap_name_ap_name` FOREIGN KEY (`archive_policy_name`) REFERENCES `archive_policy` (`name`),
  CONSTRAINT `fk_metric_resource_id_resource_id` FOREIGN KEY (`resource_id`) REFERENCES `resource` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 |
+--------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

## During upgrade, after gnocchi-upgrade failed:

[root@overcloud-controller-0 heat-admin]# gnocchi-upgrade; echo $?
1
[root@overcloud-controller-0 heat-admin]# mysql
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 375
Server version: 10.1.18-MariaDB MariaDB Server

Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> use gnocchi;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
MariaDB [gnocchi]> SHOW CREATE TABLE metric;
+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table |
+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| metric | CREATE TABLE `metric` (
  `id` binary(16) NOT NULL,
  `archive_policy_name` varchar(255) NOT NULL,
  `resource_id` binary(16) DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `unit` varchar(31) DEFAULT NULL,
  `status` enum('active','delete') NOT NULL DEFAULT 'active',
  `creator` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_metric0resource_id0name` (`resource_id`,`name`),
  KEY `fk_metric_ap_name_ap_name` (`archive_policy_name`),
  KEY `ix_metric_status` (`status`),
  CONSTRAINT `fk_metric_ap_name_ap_name` FOREIGN KEY (`archive_policy_name`) REFERENCES `archive_policy` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 |
+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)