Ask Your Question
1

net-create & net-delete are fine but neutron net-list throws error

asked 2014-06-26 21:23:04 -0600

dwyaneini gravatar image

updated 2014-06-27 16:06:56 -0600

smaffulli gravatar image

I'm deploying openstack icehouse version with three-node architecture (controller node, network node, and compute node1) on Debian wheezy.

Now, I have the problem that neutron net-create and net-delete work fine.

But when i try to use the command "neutron net-list" to list the network I created, it prompts "request failed: internal server error while processing your request". Following is the log in neutron-server.log.

 2014-06-27 10:05:28.843 16448 INFO neutron.wsgi [-] (16448) accepted ('192.168.0.11', 40692)
 2014-06-27 10:05:28.860 16448 INFO requests.packages.urllib3.connectionpool [-] Starting new HTTP connection (1): hadoop01
 2014-06-27 10:05:29.073 16448 INFO requests.packages.urllib3.connectionpool [-] Starting new HTTP connection (1): hadoop01
 2014-06-27 10:05:29.298 16448 ERROR neutron.api.v2.resource [req-90a60609-f7d3-4b1d-8878-7e163ba0d937 None] index failed
 2014-06-27 10:05:29.298 16448 TRACE neutron.api.v2.resource Traceback (most recent call last):
 ...
2014-06-27 10:05:29.298 16448 TRACE neutron.api.v2.resource   File "/usr/lib/python2.7/dist-    packages/neutron/plugins/openvswitch/ovs_neutron_plugin.py", line 379, in _extend_network_dict_provider_ovs
 2014-06-27 10:05:29.298 16448 TRACE neutron.api.v2.resource     network[provider.NETWORK_TYPE] = binding.network_type
 2014-06-27 10:05:29.298 16448 TRACE neutron.api.v2.resource AttributeError: 'NoneType' object has no attribute 'network_type'
 2014-06-27 10:05:29.298 16448 TRACE neutron.api.v2.resource
 2014-06-27 10:05:29.302 16448 INFO neutron.wsgi [req-90a60609-f7d3-4b1d-8878-7e163ba0d937 None] 192.168.0.11 - - [27/Jun/2014 10:05:29] "GET /v2.0/networks.json HTTP/1.1" 500 296 0.457172

or see the figure!

image description

(this will be more clear).

I notice there are two errors: 1) ERROR neutron.api.v2.resource [req- None] index failed; 2) TRACE neutron.api.v2.resource network[provider.NETWORK_TYPE] = binding.network_type, AttributeError: 'NoneType' object has no attribute 'network_type'.

The first error may indicates the some errors with database. I use the keywords to search on Google engine, most of the information suggest me to drop the neutron db and recreate it. I haven't tried this one. The second error network_type, I doubt whether it refers as to tenant_network_type. After I use "neutron net-create", it prompts me "Created a new network", see the figure!

image description

this is the result of table networks status:

mysql> show table status from neutrondb11 like'networks';
+----------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+-----------------+----------+----------------+---------+

| Name | Engine | Version | Row_format | Rows | Avg_row_length | Data_length | Max_data_length | Index_length | Data_free | Auto_increment | Create_time | Update_time | Check_time | Collation | Checksum | Create_options | Comment |

+----------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+-----------------+----------+----------------+---------+

| networks | InnoDB | 10 | Compact | 3 | 5461 | 16384 | 0 | 0 | 0 | NULL | 2014-06-25 16:32:24 | NULL | NULL | utf8_unicode_ci | NULL | | |

+----------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+-----------------+----------+----------------+---------+ 1 row in set (0.00 sec)

Do you have some ideas? Thanks a lot, Dwyane.

edit retag flag offensive close merge delete

Comments

I try to view whether the created external network is stored in mysql. I find that the created external netowrk has been stored in mysql db. When I use 'neutron net-list' to list networks, it prompts the error information 'index failed'.Does it mean that listing the result fails to index the set?

dwyaneini gravatar imagedwyaneini ( 2014-06-26 21:45:49 -0600 )edit

Another question, does
neutron port-list && neutron router-list work ?

dbaxps gravatar imagedbaxps ( 2014-06-27 04:25:48 -0600 )edit
1

Guys, both of you try to update your question and answers to make them easily readable: a solution to a problem. Comments are just for short, brief comments not to paste debug info and logs

smaffulli gravatar imagesmaffulli ( 2014-06-27 16:10:35 -0600 )edit
1

Another thing: Screenshots are hard to parse. Copy and paste the text, format it as 'code' (use markdown) and they'll be a lot more useful.

smaffulli gravatar imagesmaffulli ( 2014-06-27 16:11:50 -0600 )edit

Thank you for your reminding, Smaffulli.

dwyaneini gravatar imagedwyaneini ( 2014-06-29 19:48:54 -0600 )edit

3 answers

Sort by ยป oldest newest most voted
2

answered 2014-06-26 22:13:07 -0600

dbaxps gravatar image

updated 2014-06-27 16:09:34 -0600

smaffulli gravatar image

Sounds as database error. Table networks or some other tables of Neutron database may be corrupted.
mysql> show networks status;

On my system it looks something like:

MariaDB [neutron]> show table status from neutron like'networks';

+----------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+-----------------+----------+----------------+---------+ | Name | Engine | Version | Row_format | Rows | Avg_row_length | Data_length | Max_data_length | Index_length | Data_free | Auto_increment | Create_time | Update_time | Check_time | Collation | Checksum | Create_options | Comment | +----------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+-----------------+----------+----------------+---------+ | networks | InnoDB | 10 | Compact | 2 | 8192 | 16384 | 0 | 0 | 0 | NULL | 2014-06-23 11:40:11 | NULL | NULL | utf8_general_ci | NULL | | | +----------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+-----------------+----------+----------------+---------+ 1 row in set (0.00 sec)

If yoursetup Neutron ML2&&OVS&&VLAN(GRE) and database "neutron" has not been created along with required tables, your setup is incorrect.

edit flag offensive delete link more

Comments

MariaDB [(none)]> SELECT TABLE_NAME, ENGINE FROM information_schema.TABLES where TABLE_SCHEMA = 'neutron';
+------------------------------+--------+
| TABLE_NAME | ENGINE |
+------------------------------+--------+
| agents | InnoDB |
| alembic_version | InnoDB |
| allowedaddresspairs | InnoDB |
| arista_provisioned_nets | InnoDB |
| arista_provisioned_tenants | InnoDB |
| arista_provisioned_vms | InnoDB |
| cisco_ml2_credentials | InnoDB |
| cisco_ml2_nexusport_bindings | InnoDB |
| consistencyhashes | InnoDB |
| dnsnameservers | InnoDB |
| externalnetworks | InnoDB |
| extradhcpopts | InnoDB |
| floatingips | InnoDB |
| ipallocationpools | InnoDB |
| ipallocations | InnoDB |
| ipavailabilityranges | InnoDB |
| ml2_brocadenetworks | InnoDB |
| ml2_brocadeports | InnoDB |
| ml2_flat_allocations | InnoDB |
| ml2_gre_allocations | InnoDB |
| ml2_gre_endpoints | InnoDB |
| ml2_network_segments | InnoDB |
| ml2_port_bindings | InnoDB |
| ml2_vlan_allocations | InnoDB |
| ml2_vxlan_allocations | InnoDB |
| ml2_vxlan_endpoints | InnoDB |
| networkdhcpagentbindings | InnoDB |
| networks | InnoDB |
| ports | InnoDB |
| quotas | InnoDB |
| routerl3agentbindings | InnoDB |
| routerroutes | InnoDB |
| routers | InnoDB |
| securitygroupportbindings | InnoDB
| | securitygrouprules | InnoDB |
| securitygroups | InnoDB |
| servicedefinitions | InnoDB |
| servicetypes | InnoDB |
| subnetroutes | InnoDB |
| subnets | InnoDB |
+------------------------------+--------+
40 rows in set (0.00 sec)

dbaxps gravatar imagedbaxps ( 2014-06-29 11:02:25 -0600 )edit
1

answered 2014-06-28 12:27:58 -0600

akshay-thakare gravatar image

updated 2014-06-28 13:14:26 -0600

smaffulli gravatar image

Refer the solution to this post
https://ask.openstack.org/en/question...

edit flag offensive delete link more
1

answered 2014-06-29 19:52:42 -0600

dwyaneini gravatar image

I have solved it by myself. The database of Neutron has already stored in database rather than not been created. It may be corrupted. So I drop Neutron database and reinstall Neutron server and Neutron-common. After restarting services, neutron net-create and net-list operations both are OK!

edit flag offensive delete link more

Comments

Thanks! I met a problem some kind like yours,a little different.You reminded me that check the database.Though I know little about database,I installed apache & php to run PHPmyadmin.I found that the neutron database was empty. I don't know how to solve it,but closer to the answer.

DBAWAY gravatar imageDBAWAY ( 2015-03-16 23:51:03 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

2 followers

Stats

Asked: 2014-06-26 21:23:04 -0600

Seen: 4,395 times

Last updated: Jun 29 '14