[Openstack] neutron database error in Icehouse

Mark Kirkwood mark.kirkwood at catalyst.net.nz
Wed Jun 18 08:42:58 UTC 2014


On 18/06/14 16:10, Raphael Ribeiro wrote:
> Hello, I have configured a multi node and neutron single flat network in
> CentOS OpenStack IceHouse version
>
> Have one controller, one compute and one network node. But when I try
> create a neutron network we are getting below error:
>

> Maybe a database error?
>
> I noticed that the database does not have this table "ipallocationpools":
>
> mysql> show tables;
>
> +-----------------------+
>
> | Tables_in_neutron     |
>
> +-----------------------+
>
> | agents                |
>
> | alembic_version       |
>
> | externalnetworks      |
>
> | ml2_flat_allocations  |
>
> | ml2_gre_allocations   |
>
> | ml2_gre_endpoints     |
>
> | ml2_network_segments  |
>
> | ml2_vlan_allocations  |
>
> | ml2_vxlan_allocations |
>
> | ml2_vxlan_endpoints   |
>
> | networks              |
>
> | ports                 |
>
> | quotas                |
>
> | securitygrouprules    |
>
> | securitygroups        |
>
> | subnets               |
>
> +-----------------------+
>
> 16 rows in set (0.00 sec)


Yes. not enough tables! Here are mine:

mysql> show tables;
+------------------------------+
| Tables_in_neutron            |
+------------------------------+
| agents                       |
| alembic_version              |
| allowedaddresspairs          |
| arista_provisioned_nets      |
| arista_provisioned_tenants   |
| arista_provisioned_vms       |
| cisco_ml2_credentials        |
| cisco_ml2_nexusport_bindings |
| consistencyhashes            |
| dnsnameservers               |
| externalnetworks             |
| extradhcpopts                |
| floatingips                  |
| ipallocationpools            |
| ipallocations                |
| ipavailabilityranges         |
| ml2_brocadenetworks          |
| ml2_brocadeports             |
| ml2_flat_allocations         |
| ml2_gre_allocations          |
| ml2_gre_endpoints            |
| ml2_network_segments         |
| ml2_port_bindings            |
| ml2_vlan_allocations         |
| ml2_vxlan_allocations        |
| ml2_vxlan_endpoints          |
| networkdhcpagentbindings     |
| networks                     |
| ports                        |
| quotas                       |
| routerl3agentbindings        |
| routerroutes                 |
| routers                      |
| securitygroupportbindings    |
| securitygrouprules           |
| securitygroups               |
| servicedefinitions           |
| servicetypes                 |
| subnetroutes                 |
| subnets                      |
+------------------------------+
40 rows in set (0.00 sec)

I suspect you have the db connection set in the wrong file - the docs 
are a little light on which of the plethora of neutron files actually 
need it. In short *only* the plugin config does. E.g I'm using ML2 so:

$ cat /etc/neutron/neutron.conf
...
[database]
# set in plugin
#connection =


$ cat /etc/neutron/plugins/ml2/ml2_conf.ini
...
[database]
connection = mysql://neutron:password@127.0.0.1/neutron

Then (re)initialize the various db structures and restart all neutron 
daemons:

$ neutron-db-manage --config-file /etc/neutron/neutron.conf \
   --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head


If things are still confused, you might need to drop your existing 
neutron db and redo the above with a clean one!

Regards

Mark




More information about the Openstack mailing list