Commit 80e4d086 authored by Thomas Goirand's avatar Thomas Goirand

Fixed machines table with default SQL values.

parent 1d1ebc9c
......@@ -5,6 +5,7 @@ openstack-cluster-installer (17) UNRELEASED; urgency=medium
* Run gnocchi-api using uwsgi rather than Apache to avoid port bind conflict.
* Fix neutron.conf [database]/connection to be empty on compute nodes.
* Fix puppet scheduling of swiftproxy install.
* Fixed machines table with default SQL values.
-- Thomas Goirand <zigo@debian.org> Tue, 22 Jan 2019 10:14:26 +0100
......
......@@ -14,7 +14,7 @@ $q = array();
$q[] = "CREATE TABLE IF NOT EXISTS `blockdevices` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`machine_id` int(11) NOT NULL,
`machine_id` int(11) NOT NULL ,
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`size_mb` int(11) NOT NULL,
PRIMARY KEY (`id`)
......@@ -45,7 +45,7 @@ $q[] = "CREATE TABLE IF NOT EXISTS `ifnames` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=25754 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;";
$q[] = "CREATE TABLE `ips` (
$q[] = "CREATE TABLE IF NOT EXISTS `ips` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`network` int(11) NOT NULL,
`ip` bigint(128) NOT NULL,
......@@ -57,7 +57,7 @@ $q[] = "CREATE TABLE `ips` (
UNIQUE KEY `uniquemachine` (`network`,`machine`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;";
$q[] = "CREATE TABLE `locations` (
$q[] = "CREATE TABLE IF NOT EXISTS `locations` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
`swiftregion` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
......@@ -71,29 +71,29 @@ $q[] = "CREATE TABLE IF NOT EXISTS `machines` (
`ipaddr` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`serial` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
`product_name` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
`hostname` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`hostname` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`installed` enum('yes','no') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'no',
`lastseen` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`status` varchar(128) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'None',
`role` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
`role` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`cluster` int(11) DEFAULT NULL,
`ipmi_use` enum('yes','no') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'no',
`ipmi_call_chassis_bootdev` enum('yes','no') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'no',
`ipmi_addr` varchar(254) COLLATE utf8_unicode_ci NOT NULL,
`ipmi_addr` varchar(254) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`ipmi_port` int(11) NOT NULL DEFAULT '623',
`ipmi_username` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
`ipmi_password` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
`ipmi_username` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`ipmi_password` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`location_id` int(11) NULL,
`notes` VARCHAR(256) NOT NULL,
`ladvd_report` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
`bios_version` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
`ipmi_firmware_version` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
`ipmi_detected_ip` VARCHAR(64) NOT NULL,
`notes` VARCHAR(256) NOT NULL DEFAULT '',
`ladvd_report` varchar(128) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`bios_version` varchar(128) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`ipmi_firmware_version` varchar(128) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`ipmi_detected_ip` VARCHAR(64) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
UNIQUE KEY `serial` (`serial`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;";
$q[] = "CREATE TABLE `networks` (
$q[] = "CREATE TABLE IF NOT EXISTS `networks` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(128) NOT NULL,
`ip` varchar(64) NOT NULL,
......@@ -110,7 +110,7 @@ $q[] = "CREATE TABLE `networks` (
UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;";
$q[] = "CREATE TABLE `passwords` (
$q[] = "CREATE TABLE IF NOT EXISTS `passwords` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`cluster` int(11) NOT NULL,
`service` varchar(64) NOT NULL,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment