← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1717559] [NEW] Error creating network - DBError Constraint Failed

 

Public bug reported:

Issue trying to create a network in a brand new Openstack Newton setup,
tried with horizon and with the cli and both fail with this error:

2017-09-15 16:49:09.827 142 ERROR neutron.pecan_wsgi.hooks.translation
DBError: (pymysql.err.InternalError) (4025, u'CONSTRAINT `CONSTRAINT_3`
failed for `neutron`.`networks`') [SQL: u'INSERT INTO networks
(project_id, id, name, status, admin_state_up, vlan_transparent,
availability_zone_hints, mtu, standard_attr_id) VALUES (%(project_id)s,
%(id)s, %(name)s, %(status)s, %(admin_state_up)s, %(vlan_transparent)s,
%(availability_zone_hints)s, %(mtu)s, %(standard_attr_id)s)']
[parameters: {'status': 'ACTIVE', 'availability_zone_hints': None,
'name': u'network0', 'admin_state_up': 1, 'mtu': 0, 'vlan_transparent':
None, 'standard_attr_id': 13, 'project_id':
u'f9ee32286b794ccba68cb0b2c2e943a6', 'id': '70acc814-6a93-495c-
8cc3-7fd02b85a3f7'}]

I've check the database and CONSTRAINT_3 is this one: CONSTRAINT
`CONSTRAINT_3` CHECK (`vlan_transparent` in (0,1))

Full Mysql Create:

mysql> SHOW CREATE TABLE networks;

| networks | CREATE TABLE `networks` (
  `project_id` varchar(255) DEFAULT NULL,
  `id` varchar(36) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `status` varchar(16) DEFAULT NULL,
  `admin_state_up` tinyint(1) DEFAULT NULL,
  `vlan_transparent` tinyint(1) DEFAULT NULL,
  `standard_attr_id` bigint(20) NOT NULL,
  `availability_zone_hints` varchar(255) DEFAULT NULL,
  `mtu` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_networks0standard_attr_id` (`standard_attr_id`),
  KEY `ix_networks_project_id` (`project_id`),
  CONSTRAINT `networks_ibfk_1` FOREIGN KEY (`standard_attr_id`) REFERENCES `standardattributes` (`id`) ON DELETE CASCADE,
  CONSTRAINT `CONSTRAINT_1` CHECK (`admin_state_up` in (0,1)),
  CONSTRAINT `CONSTRAINT_3` CHECK (`vlan_transparent` in (0,1))
) ENGINE=InnoDB DEFAULT CHARSET=utf8 |

** Affects: neutron
     Importance: Undecided
         Status: New

** Description changed:

- Ussue trying to create a network in Openstack Newton, tried with horizon
- and with the cli and both fail.
+ Issue trying to create a network in a brand new Openstack Newton setup,
+ tried with horizon and with the cli and both fail with this error:
  
  2017-09-15 16:49:09.827 142 ERROR neutron.pecan_wsgi.hooks.translation
  DBError: (pymysql.err.InternalError) (4025, u'CONSTRAINT `CONSTRAINT_3`
  failed for `neutron`.`networks`') [SQL: u'INSERT INTO networks
  (project_id, id, name, status, admin_state_up, vlan_transparent,
  availability_zone_hints, mtu, standard_attr_id) VALUES (%(project_id)s,
  %(id)s, %(name)s, %(status)s, %(admin_state_up)s, %(vlan_transparent)s,
  %(availability_zone_hints)s, %(mtu)s, %(standard_attr_id)s)']
  [parameters: {'status': 'ACTIVE', 'availability_zone_hints': None,
  'name': u'network0', 'admin_state_up': 1, 'mtu': 0, 'vlan_transparent':
  None, 'standard_attr_id': 13, 'project_id':
  u'f9ee32286b794ccba68cb0b2c2e943a6', 'id': '70acc814-6a93-495c-
  8cc3-7fd02b85a3f7'}]
  
- 
- I've check the database and CONSTRAINT_3 is this one: CONSTRAINT `CONSTRAINT_3` CHECK (`vlan_transparent` in (0,1))
+ I've check the database and CONSTRAINT_3 is this one: CONSTRAINT
+ `CONSTRAINT_3` CHECK (`vlan_transparent` in (0,1))
  
  Full Mysql Create:
  
+ mysql> SHOW CREATE TABLE networks;
  
- mysql> SHOW CREATE TABLE networks;                         
- 
- | networks | CREATE TABLE `networks` (                     
-   `project_id` varchar(255) DEFAULT NULL,                  
-   `id` varchar(36) NOT NULL,                               
-   `name` varchar(255) DEFAULT NULL,                        
-   `status` varchar(16) DEFAULT NULL,                       
-   `admin_state_up` tinyint(1) DEFAULT NULL,                
-   `vlan_transparent` tinyint(1) DEFAULT NULL,              
-   `standard_attr_id` bigint(20) NOT NULL,                  
-   `availability_zone_hints` varchar(255) DEFAULT NULL,     
-   `mtu` int(11) DEFAULT NULL,                              
-   PRIMARY KEY (`id`),                                      
-   UNIQUE KEY `uniq_networks0standard_attr_id` (`standard_attr_id`),
-   KEY `ix_networks_project_id` (`project_id`),             
-   CONSTRAINT `networks_ibfk_1` FOREIGN KEY (`standard_attr_id`) REFERENCES `standardattributes` (`id`) ON DELETE CASCADE,
-   CONSTRAINT `CONSTRAINT_1` CHECK (`admin_state_up` in (0,1)),
-   CONSTRAINT `CONSTRAINT_3` CHECK (`vlan_transparent` in (0,1))
+ | networks | CREATE TABLE `networks` (
+   `project_id` varchar(255) DEFAULT NULL,
+   `id` varchar(36) NOT NULL,
+   `name` varchar(255) DEFAULT NULL,
+   `status` varchar(16) DEFAULT NULL,
+   `admin_state_up` tinyint(1) DEFAULT NULL,
+   `vlan_transparent` tinyint(1) DEFAULT NULL,
+   `standard_attr_id` bigint(20) NOT NULL,
+   `availability_zone_hints` varchar(255) DEFAULT NULL,
+   `mtu` int(11) DEFAULT NULL,
+   PRIMARY KEY (`id`),
+   UNIQUE KEY `uniq_networks0standard_attr_id` (`standard_attr_id`),
+   KEY `ix_networks_project_id` (`project_id`),
+   CONSTRAINT `networks_ibfk_1` FOREIGN KEY (`standard_attr_id`) REFERENCES `standardattributes` (`id`) ON DELETE CASCADE,
+   CONSTRAINT `CONSTRAINT_1` CHECK (`admin_state_up` in (0,1)),
+   CONSTRAINT `CONSTRAINT_3` CHECK (`vlan_transparent` in (0,1))
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 |

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1717559

Title:
  Error creating network - DBError Constraint Failed

Status in neutron:
  New

Bug description:
  Issue trying to create a network in a brand new Openstack Newton
  setup, tried with horizon and with the cli and both fail with this
  error:

  2017-09-15 16:49:09.827 142 ERROR neutron.pecan_wsgi.hooks.translation
  DBError: (pymysql.err.InternalError) (4025, u'CONSTRAINT
  `CONSTRAINT_3` failed for `neutron`.`networks`') [SQL: u'INSERT INTO
  networks (project_id, id, name, status, admin_state_up,
  vlan_transparent, availability_zone_hints, mtu, standard_attr_id)
  VALUES (%(project_id)s, %(id)s, %(name)s, %(status)s,
  %(admin_state_up)s, %(vlan_transparent)s, %(availability_zone_hints)s,
  %(mtu)s, %(standard_attr_id)s)'] [parameters: {'status': 'ACTIVE',
  'availability_zone_hints': None, 'name': u'network0',
  'admin_state_up': 1, 'mtu': 0, 'vlan_transparent': None,
  'standard_attr_id': 13, 'project_id':
  u'f9ee32286b794ccba68cb0b2c2e943a6', 'id': '70acc814-6a93-495c-
  8cc3-7fd02b85a3f7'}]

  I've check the database and CONSTRAINT_3 is this one: CONSTRAINT
  `CONSTRAINT_3` CHECK (`vlan_transparent` in (0,1))

  Full Mysql Create:

  mysql> SHOW CREATE TABLE networks;

  | networks | CREATE TABLE `networks` (
    `project_id` varchar(255) DEFAULT NULL,
    `id` varchar(36) NOT NULL,
    `name` varchar(255) DEFAULT NULL,
    `status` varchar(16) DEFAULT NULL,
    `admin_state_up` tinyint(1) DEFAULT NULL,
    `vlan_transparent` tinyint(1) DEFAULT NULL,
    `standard_attr_id` bigint(20) NOT NULL,
    `availability_zone_hints` varchar(255) DEFAULT NULL,
    `mtu` int(11) DEFAULT NULL,
    PRIMARY KEY (`id`),
    UNIQUE KEY `uniq_networks0standard_attr_id` (`standard_attr_id`),
    KEY `ix_networks_project_id` (`project_id`),
    CONSTRAINT `networks_ibfk_1` FOREIGN KEY (`standard_attr_id`) REFERENCES `standardattributes` (`id`) ON DELETE CASCADE,
    CONSTRAINT `CONSTRAINT_1` CHECK (`admin_state_up` in (0,1)),
    CONSTRAINT `CONSTRAINT_3` CHECK (`vlan_transparent` in (0,1))
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 |

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1717559/+subscriptions


Follow ups