分享

求助:执行 【#neutron agent-list】报错

kaiser1103 发表于 2015-5-22 09:29:35 [显示全部楼层] 回帖奖励 阅读模式 关闭右栏 15 74891
本帖最后由 kaiser1103 于 2015-5-22 09:33 编辑

[mw_shl_code=shell,true]root@controller:~# neutron agent-list
Request Failed: internal server error while processing your request.[/mw_shl_code]

以下是相关信息:
[mw_shl_code=shell,true]root@controller:~# neutron ext-list
+-----------------------+-----------------------------------------------+
| alias                 | name                                          |
+-----------------------+-----------------------------------------------+
| security-group        | security-group                                |
| l3_agent_scheduler    | L3 Agent Scheduler                            |
| net-mtu               | Network MTU                                   |
| ext-gw-mode           | Neutron L3 Configurable external gateway mode |
| binding               | Port Binding                                  |
| provider              | Provider Network                              |
| agent                 | agent                                         |
| quotas                | Quota management support                      |
| subnet_allocation     | Subnet Allocation                             |
| dhcp_agent_scheduler  | DHCP Agent Scheduler                          |
| l3-ha                 | HA Router extension                           |
| multi-provider        | Multi Provider Network                        |
| external-net          | Neutron external network                      |
| router                | Neutron L3 Router                             |
| allowed-address-pairs | Allowed Address Pairs                         |
| extraroute            | Neutron Extra Route                           |
| extra_dhcp_opt        | Neutron Extra DHCP opts                       |
| dvr                   | Distributed Virtual Router                    |
+-----------------------+-----------------------------------------------+[/mw_shl_code]

[mw_shl_code=shell,true]root@controller:~# keystone service-list
+----------------------------------+----------+----------+-------------------------+
|                id                |   name   |   type   |       description       |
+----------------------------------+----------+----------+-------------------------+
| b6118585cf654e0b9cb3ba5e13118608 |  glance  |  image   | Openstack Image Service |
| b8e6e1585f9a49d8bf50733a6516c787 | keystone | identity |    Openstack Identity   |
| 37188eb14de54c579742ac761fbfc61e | neutron  | network  |   OpenStack Networking  |
| f57bc6659a324bb898df2bed07522090 |   nova   | compute  |    OpenStack Compute    |
+----------------------------------+----------+----------+-------------------------+
[/mw_shl_code]

[mw_shl_code=shell,true]root@controller:~# keystone user-list
+----------------------------------+---------+---------+---------------------+
|                id                |   name  | enabled |        email        |
+----------------------------------+---------+---------+---------------------+
| 364a69f6b4e841d8bf9546e6f3fea3ce |  admin  |   True  | kaiser@vargo.com.cn |
| 70266d9642824d838345bc5f6da12dae |   demo  |   True  |  demo@vargo.com.cn  |
| 4720c21672b9497faa3769cbc8835bd6 |  glance |   True  |                     |
| 09a25501107a45bfbbe100cb34f3ca9a | neutron |   True  |                     |
| 0332b3ced0124c91802e46e1e8ffbbe8 |   nova  |   True  |                     |
+----------------------------------+---------+---------+---------------------+
[/mw_shl_code]

[mw_shl_code=shell,true]root@controller:~# keystone user-role-list
+----------------------------------+-------+----------------------------------+----------------------------------+
|                id                |  name |             user_id              |            tenant_id             |
+----------------------------------+-------+----------------------------------+----------------------------------+
| d36a121360f04ba097c4b60ba2cbf164 | admin | 364a69f6b4e841d8bf9546e6f3fea3ce | 00fa451adb2f4f21941b0a2da7c093fc |
+----------------------------------+-------+----------------------------------+----------------------------------+
[/mw_shl_code]


[mw_shl_code=shell,true]root@controller:~# keystone endpoint-list
+----------------------------------+-----------+-----------------------------------------+-----------------------------------------+-----------------------------------------+----------------------------------+
|                id                |   region  |                publicurl                |               internalurl               |                 adminurl                |            service_id            |
+----------------------------------+-----------+-----------------------------------------+-----------------------------------------+-----------------------------------------+----------------------------------+
| 06a4d4e29d5a4a6aae7185c8942d8d04 | RegionOne | http://controller:8774/v2/%(tenant_id)s | http://controller:8774/v2/%(tenant_id)s | http://controller:8774/v2/%(tenant_id)s | f57bc6659a324bb898df2bed07522090 |
| 691e868a61dd48af9ea80caa2f025d7d | regionOne |          http://controller:9696         |          http://controller:9696         |          http://controller:9696         | 37188eb14de54c579742ac761fbfc61e |
| eef258524ad2455e886c2ba7f315fe01 | regionOne |          http://controller:9292         |          http://comtroller:9292         |          http://controller:9292         | b6118585cf654e0b9cb3ba5e13118608 |
| f745aa6a9f94407a98a5a357710ec4e9 | regionOne |       http://controller:5000/v2.0       |       http://comtroller:5000/v2.0       |       http://controller:35357/v2.0      | b8e6e1585f9a49d8bf50733a6516c787 |
+----------------------------------+-----------+-----------------------------------------+-----------------------------------------+-----------------------------------------+----------------------------------+
[/mw_shl_code]

[mw_shl_code=shell,true]root@controller:~# neutron agent-list --debug
DEBUG: keystoneclient.session REQ: curl -g -i -X GET http://controller:35357/v2.0 -H "Accept: application/json" -H "User-Agent: python-keystoneclient"
DEBUG: keystoneclient.session RESP: [200] content-length: 337 vary: X-Auth-Token x-distribution: Ubuntu connection: keep-alive date: Fri, 22 May 2015 01:28:53 GMT content-type: application/json x-openstack-request-id: req-8a405149-6f18-47c7-b906-dd82c8dc5c65
RESP BODY: {"version": {"status": "stable", "updated": "2014-04-17T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v2.0+json"}], "id": "v2.0", "links": [{"href": "http://controller:35357/v2.0/", "rel": "self"}, {"href": "http://docs.openstack.org/", "type": "text/html", "rel": "describedby"}]}}

DEBUG: stevedore.extension found extension EntryPoint.parse('yaml = clifftablib.formatters:YamlFormatter')
DEBUG: stevedore.extension found extension EntryPoint.parse('json = clifftablib.formatters:JsonFormatter')
DEBUG: stevedore.extension found extension EntryPoint.parse('html = clifftablib.formatters:HtmlFormatter')
DEBUG: stevedore.extension found extension EntryPoint.parse('table = cliff.formatters.table:TableFormatter')
DEBUG: stevedore.extension found extension EntryPoint.parse('csv = cliff.formatters.commaseparated:CSVLister')
DEBUG: neutronclient.neutron.v2_0.agent.ListAgent get_data(Namespace(columns=[], fields=[], formatter='table', max_width=0, quote_mode='nonnumeric', request_format='json', show_details=False, sort_dir=[], sort_key=[]))
DEBUG: keystoneclient.auth.identity.v2 Making authentication request to http://controller:35357/v2.0/tokens
DEBUG: keystoneclient.session REQ: curl -g -i -X GET http://controller:9696/v2.0/agents.json -H "User-Agent: python-neutronclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}4e7369f0e64b5959d06433d215679259191c732d"
DEBUG: keystoneclient.session RESP:
DEBUG: neutronclient.v2_0.client Error message: {"NeutronError": {"message": "Request Failed: internal server error while processing your request.", "type": "HTTPInternalServerError", "detail": ""}}
ERROR: neutronclient.shell Request Failed: internal server error while processing your request.
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/neutronclient/shell.py", line 731, in run_subcommand
    return run_command(cmd, cmd_parser, sub_argv)
  File "/usr/lib/python2.7/dist-packages/neutronclient/shell.py", line 97, in run_command
    return cmd.run(known_args)
  File "/usr/lib/python2.7/dist-packages/neutronclient/common/command.py", line 29, in run
    return super(OpenStackCommand, self).run(parsed_args)
  File "/usr/lib/python2.7/dist-packages/cliff/display.py", line 91, in run
    column_names, data = self.take_action(parsed_args)
  File "/usr/lib/python2.7/dist-packages/neutronclient/common/command.py", line 35, in take_action
    return self.get_data(parsed_args)
  File "/usr/lib/python2.7/dist-packages/neutronclient/neutron/v2_0/__init__.py", line 687, in get_data
    data = self.retrieve_list(parsed_args)
  File "/usr/lib/python2.7/dist-packages/neutronclient/neutron/v2_0/__init__.py", line 650, in retrieve_list
    data = self.call_server(neutron_client, search_opts, parsed_args)
  File "/usr/lib/python2.7/dist-packages/neutronclient/neutron/v2_0/__init__.py", line 622, in call_server
    data = obj_lister(**search_opts)
  File "/usr/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 99, in with_params
    ret = self.function(instance, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 1114, in list_agents
    return self.get(self.agents_path, params=_params)
  File "/usr/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 290, in get
    headers=headers, params=params)
  File "/usr/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 267, in retry_request
    headers=headers, params=params)
  File "/usr/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 208, in do_request
    self._handle_fault_response(status_code, replybody)
  File "/usr/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 182, in _handle_fault_response
    exception_handler_v20(status_code, des_error_body)
  File "/usr/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 67, in exception_handler_v20
    status_code=status_code)
InternalServerError: Request Failed: internal server error while processing your request.
[/mw_shl_code]


控制节点的 neitron-server.log:[mw_shl_code=applescript,true]2015-05-22 09:32:40.722 105987 ERROR oslo_messaging.rpc.dispatcher [req-2417168b-bd21-438b-8304-946510e7dfc1 ] Exception during message handling: (OperationalError) (1054, "Unknown column 'ml2_gre_endpoints.host' in 'field list'") 'SELECT ml2_gre_endpoints.ip_address AS ml2_gre_endpoints_ip_address, ml2_gre_endpoints.host AS ml2_gre_endpoints_host \nFROM ml2_gre_endpoints \nWHERE ml2_gre_endpoints.host = %s \n LIMIT %s' ('network', 1)
2015-05-22 09:32:40.722 105987 TRACE oslo_messaging.rpc.dispatcher Traceback (most recent call last):
2015-05-22 09:32:40.722 105987 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 142, in _dispatch_and_reply
2015-05-22 09:32:40.722 105987 TRACE oslo_messaging.rpc.dispatcher     executor_callback))
2015-05-22 09:32:40.722 105987 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 186, in _dispatch
2015-05-22 09:32:40.722 105987 TRACE oslo_messaging.rpc.dispatcher     executor_callback)
2015-05-22 09:32:40.722 105987 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 130, in _do_dispatch
2015-05-22 09:32:40.722 105987 TRACE oslo_messaging.rpc.dispatcher     result = func(ctxt, **new_args)
2015-05-22 09:32:40.722 105987 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/neutron/plugins/ml2/drivers/type_tunnel.py", line 238, in tunnel_sync
2015-05-22 09:32:40.722 105987 TRACE oslo_messaging.rpc.dispatcher     host_endpoint = driver.obj.get_endpoint_by_host(host)
2015-05-22 09:32:40.722 105987 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/neutron/plugins/ml2/drivers/type_gre.py", line 143, in get_endpoint_by_host
2015-05-22 09:32:40.722 105987 TRACE oslo_messaging.rpc.dispatcher     filter_by(host=host).first())
2015-05-22 09:32:40.722 105987 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2367, in first
2015-05-22 09:32:40.722 105987 TRACE oslo_messaging.rpc.dispatcher     ret = list(self[0:1])
2015-05-22 09:32:40.722 105987 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2228, in __getitem__
2015-05-22 09:32:40.722 105987 TRACE oslo_messaging.rpc.dispatcher     return list(res)
2015-05-22 09:32:40.722 105987 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2438, in __iter__
2015-05-22 09:32:40.722 105987 TRACE oslo_messaging.rpc.dispatcher     return self._execute_and_instances(context)
2015-05-22 09:32:40.722 105987 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2453, in _execute_and_instances
2015-05-22 09:32:40.722 105987 TRACE oslo_messaging.rpc.dispatcher     result = conn.execute(querycontext.statement, self._params)
2015-05-22 09:32:40.722 105987 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 729, in execute
2015-05-22 09:32:40.722 105987 TRACE oslo_messaging.rpc.dispatcher     return meth(self, multiparams, params)
2015-05-22 09:32:40.722 105987 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/sqlalchemy/sql/elements.py", line 322, in _execute_on_connection
2015-05-22 09:32:40.722 105987 TRACE oslo_messaging.rpc.dispatcher     return connection._execute_clauseelement(self, multiparams, params)
2015-05-22 09:32:40.722 105987 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 826, in _execute_clauseelement
2015-05-22 09:32:40.722 105987 TRACE oslo_messaging.rpc.dispatcher     compiled_sql, distilled_params
2015-05-22 09:32:40.722 105987 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 958, in _execute_context
2015-05-22 09:32:40.722 105987 TRACE oslo_messaging.rpc.dispatcher     context)
2015-05-22 09:32:40.722 105987 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/oslo_db/sqlalchemy/compat/handle_error.py", line 261, in _handle_dbapi_exception
2015-05-22 09:32:40.722 105987 TRACE oslo_messaging.rpc.dispatcher     e, statement, parameters, cursor, context)
2015-05-22 09:32:40.722 105987 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1155, in _handle_dbapi_exception
2015-05-22 09:32:40.722 105987 TRACE oslo_messaging.rpc.dispatcher     util.raise_from_cause(newraise, exc_info)
2015-05-22 09:32:40.722 105987 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 199, in raise_from_cause
2015-05-22 09:32:40.722 105987 TRACE oslo_messaging.rpc.dispatcher     reraise(type(exception), exception, tb=exc_tb)
2015-05-22 09:32:40.722 105987 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 951, in _execute_context
2015-05-22 09:32:40.722 105987 TRACE oslo_messaging.rpc.dispatcher     context)
2015-05-22 09:32:40.722 105987 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 436, in do_execute
2015-05-22 09:32:40.722 105987 TRACE oslo_messaging.rpc.dispatcher     cursor.execute(statement, parameters)
2015-05-22 09:32:40.722 105987 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 174, in execute
2015-05-22 09:32:40.722 105987 TRACE oslo_messaging.rpc.dispatcher     self.errorhandler(self, exc, value)
2015-05-22 09:32:40.722 105987 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
2015-05-22 09:32:40.722 105987 TRACE oslo_messaging.rpc.dispatcher     raise errorclass, errorvalue
2015-05-22 09:32:40.722 105987 TRACE oslo_messaging.rpc.dispatcher OperationalError: (OperationalError) (1054, "Unknown column 'ml2_gre_endpoints.host' in 'field list'") 'SELECT ml2_gre_endpoints.ip_address AS ml2_gre_endpoints_ip_address, ml2_gre_endpoints.host AS ml2_gre_endpoints_host \nFROM ml2_gre_endpoints \nWHERE ml2_gre_endpoints.host = %s \n LIMIT %s' ('network', 1)
2015-05-22 09:32:40.722 105987 TRACE oslo_messaging.rpc.dispatcher
2015-05-22 09:32:40.726 105987 ERROR oslo_messaging._drivers.common [req-2417168b-bd21-438b-8304-946510e7dfc1 ] Returning exception (OperationalError) (1054, "Unknown column 'ml2_gre_endpoints.host' in 'field list'") 'SELECT ml2_gre_endpoints.ip_address AS ml2_gre_endpoints_ip_address, ml2_gre_endpoints.host AS ml2_gre_endpoints_host \nFROM ml2_gre_endpoints \nWHERE ml2_gre_endpoints.host = %s \n LIMIT %s' ('network', 1) to caller
2015-05-22 09:32:40.727 105987 ERROR oslo_messaging._drivers.common [req-2417168b-bd21-438b-8304-946510e7dfc1 ] ['Traceback (most recent call last):\n', '  File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 142, in _dispatch_and_reply\n    executor_callback))\n', '  File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 186, in _dispatch\n    executor_callback)\n', '  File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 130, in _do_dispatch\n    result = func(ctxt, **new_args)\n', '  File "/usr/lib/python2.7/dist-packages/neutron/plugins/ml2/drivers/type_tunnel.py", line 238, in tunnel_sync\n    host_endpoint = driver.obj.get_endpoint_by_host(host)\n', '  File "/usr/lib/python2.7/dist-packages/neutron/plugins/ml2/drivers/type_gre.py", line 143, in get_endpoint_by_host\n    filter_by(host=host).first())\n', '  File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2367, in first\n    ret = list(self[0:1])\n', '  File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2228, in __getitem__\n    return list(res)\n', '  File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2438, in __iter__\n    return self._execute_and_instances(context)\n', '  File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2453, in _execute_and_instances\n    result = conn.execute(querycontext.statement, self._params)\n', '  File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 729, in execute\n    return meth(self, multiparams, params)\n', '  File "/usr/lib/python2.7/dist-packages/sqlalchemy/sql/elements.py", line 322, in _execute_on_connection\n    return connection._execute_clauseelement(self, multiparams, params)\n', '  File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 826, in _execute_clauseelement\n    compiled_sql, distilled_params\n', '  File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 958, in _execute_context\n    context)\n', '  File "/usr/lib/python2.7/dist-packages/oslo_db/sqlalchemy/compat/handle_error.py", line 261, in _handle_dbapi_exception\n    e, statement, parameters, cursor, context)\n', '  File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1155, in _handle_dbapi_exception\n    util.raise_from_cause(newraise, exc_info)\n', '  File "/usr/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 199, in raise_from_cause\n    reraise(type(exception), exception, tb=exc_tb)\n', '  File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 951, in _execute_context\n    context)\n', '  File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 436, in do_execute\n    cursor.execute(statement, parameters)\n', '  File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 174, in execute\n    self.errorhandler(self, exc, value)\n', '  File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler\n    raise errorclass, errorvalue\n', 'OperationalError: (OperationalError) (1054, "Unknown column \'ml2_gre_endpoints.host\' in \'field list\'") \'SELECT ml2_gre_endpoints.ip_address AS ml2_gre_endpoints_ip_address, ml2_gre_endpoints.host AS ml2_gre_endpoints_host \\nFROM ml2_gre_endpoints \\nWHERE ml2_gre_endpoints.host = %s \\n LIMIT %s\' (\'network\', 1)\n']
[/mw_shl_code]


然后我看了数据库neutron,里面表都有,但是每个表里都没有数据。


已有(15)人评论

跳转到指定楼层
kaiser1103 发表于 2015-5-22 09:40:01
试过:

删除neutron数据库,重新同步过,问题依旧。
回复

使用道具 举报

xuanxufeng 发表于 2015-5-22 10:14:42
kaiser1103 发表于 2015-5-22 09:40
试过:

删除neutron数据库,重新同步过,问题依旧。

首先原理是这样的:
先配置neutron,然后同步数据库
同步的过程中,会读取配置文件相关信息。
然后同步完成。

[mw_shl_code=bash,true]neutron agent-list --debug[/mw_shl_code]
发出命令,然后回到数据中去查询,查询的过程中发现问题在数据库中ml2_gre_endpoints没有字段ml2_gre_endpoints.host,所以楼主根据这个原理,到数据库中,看看有没有这个字段。如果没有说明同步还是有问题。如果有,说明配置文件有问题

ERROR oslo_messaging._drivers.common [req-2417168b-bd21-438b-8304-946510e7dfc1 ] Returning exception (OperationalError) (1054, "Unknown column 'ml2_gre_endpoints.host' in 'field list'") 'SELECT ml2_gre_endpoints.ip_address AS ml2_gre_endpoints_ip_address, ml2_gre_endpoints.host AS ml2_gre_endpoints_host \nFROM ml2_gre_endpoints \nWHERE ml2_gre_endpoints.host = %s \n LIMIT %s' ('network', 1) to caller
回复

使用道具 举报

kaiser1103 发表于 2015-5-22 10:34:37
xuanxufeng 发表于 2015-5-22 10:14
首先原理是这样的:
先配置neutron,然后同步数据库
同步的过程中,会读取配置文件相关信息。

我是按照这个顺序去检查的,
一开始我发现有问题,然后我删除了neutron数据库,重新建立了neutron数据库,
然后把keystone里跟neutron有关的user,user-role,endpoint,service都删除了,重新create了一遍,
再检查了一遍配置,没问题,
然后同步数据,
最后重启服务,发现数据库里的表存在,但是数据还是空的。

我也发现关键的问题就是数据库没有同步到数据,但是我重新同步数据库的时候也没有报错 。
回复

使用道具 举报

leo_1989 发表于 2015-5-22 11:09:19
kaiser1103 发表于 2015-5-22 10:34
我是按照这个顺序去检查的,
一开始我发现有问题,然后我删除了neutron数据库,重新建立了neutron数据库 ...



用这个命令同步 下
[mw_shl_code=bash,true] su -s /bin/sh -c "neutron-db-manage --config-file /etc/neutron/neutron.conf \
  --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade juno" neutron[/mw_shl_code]

更多参考
openstack【juno】入门 【网络篇】十五:neutron安装部署(控制节点)
回复

使用道具 举报

kaiser1103 发表于 2015-5-22 11:24:06
leo_1989 发表于 2015-5-22 11:09
用这个命令同步 下
[mw_shl_code=bash,true] su -s /bin/sh -c "neutron-db-manage --config-file / ...

试过了,没用。

[mw_shl_code=applescript,true]root@controller:/etc/neutron# su -s /bin/sh -c "neutron-db-manage --config-file /etc/neutron/neutron.conf \
>  --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade juno" neutron
INFO  [alembic.migration] Context impl MySQLImpl.
INFO  [alembic.migration] Will assume non-transactional DDL.
INFO  [alembic.migration] Context impl MySQLImpl.
INFO  [alembic.migration] Will assume non-transactional DDL.
[/mw_shl_code]
回复

使用道具 举报

leo_1989 发表于 2015-5-22 12:35:24
kaiser1103 发表于 2015-5-22 11:24
试过了,没用。

[mw_shl_code=applescript,true]root@controller:/etc/neutron# su -s /bin/sh -c "ne ...

没用?同步成功了,还是没有成功。上图
回复

使用道具 举报

kaiser1103 发表于 2015-5-22 12:43:24
leo_1989 发表于 2015-5-22 12:35
没用?同步成功了,还是没有成功。上图

前面不是说了么,有数据表,但是表里没数据,
回复

使用道具 举报

Alkaloid0515 发表于 2015-5-22 13:06:27
kaiser1103 发表于 2015-5-22 12:43
前面不是说了么,有数据表,但是表里没数据,

同步的过程中,有可能同步被终止或则中断,这时候同步是残缺的,可能造成只同步一部分。
贴出来,根据同步信息,可以知道是全部成功了,还是部分成功。
回复

使用道具 举报

kaiser1103 发表于 2015-5-22 13:57:14
Alkaloid0515 发表于 2015-5-22 13:06
同步的过程中,有可能同步被终止或则中断,这时候同步是残缺的,可能造成只同步一部分。
贴出来,根据同 ...

这是重新同步数据库的详细信息:

[mw_shl_code=applescript,true]su -s /bin/sh -c "neutron-db-manage --config-file /etc/neutron/neutron.conf \
>   --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade juno" neutron
INFO  [alembic.migration] Context impl MySQLImpl.
INFO  [alembic.migration] Will assume non-transactional DDL.
INFO  [alembic.migration] Context impl MySQLImpl.
INFO  [alembic.migration] Will assume non-transactional DDL.
INFO  [alembic.migration] Running upgrade  -> havana, havana_initial
INFO  [alembic.migration] Running upgrade havana -> e197124d4b9, add unique constraint to members
INFO  [alembic.migration] Running upgrade e197124d4b9 -> 1fcfc149aca4, Add a unique constraint on (agent_type, host) columns to prevent a race
condition when an agent entry is 'upserted'.
INFO  [alembic.migration] Running upgrade 1fcfc149aca4 -> 50e86cb2637a, nsx_mappings
INFO  [alembic.migration] Running upgrade 50e86cb2637a -> 1421183d533f, NSX DHCP/metadata support
INFO  [alembic.migration] Running upgrade 1421183d533f -> 3d3cb89d84ee, nsx_switch_mappings
INFO  [alembic.migration] Running upgrade 3d3cb89d84ee -> 4ca36cfc898c, nsx_router_mappings
INFO  [alembic.migration] Running upgrade 4ca36cfc898c -> 27cc183af192, ml2_vnic_type
INFO  [alembic.migration] Running upgrade 27cc183af192 -> 50d5ba354c23, ml2 binding:vif_details
INFO  [alembic.migration] Running upgrade 50d5ba354c23 -> 157a5d299379, ml2 binding:profile
INFO  [alembic.migration] Running upgrade 157a5d299379 -> 3d2585038b95, VMware NSX rebranding
INFO  [alembic.migration] Running upgrade 3d2585038b95 -> abc88c33f74f, lb stats
INFO  [alembic.migration] Running upgrade abc88c33f74f -> 1b2580001654, nsx_sec_group_mapping
INFO  [alembic.migration] Running upgrade 1b2580001654 -> e766b19a3bb, nuage_initial
INFO  [alembic.migration] Running upgrade e766b19a3bb -> 2eeaf963a447, floatingip_status
INFO  [alembic.migration] Running upgrade 2eeaf963a447 -> 492a106273f8, Brocade ML2 Mech. Driver
INFO  [alembic.migration] Running upgrade 492a106273f8 -> 24c7ea5160d7, Cisco CSR VPNaaS
INFO  [alembic.migration] Running upgrade 24c7ea5160d7 -> 81c553f3776c, bsn_consistencyhashes
INFO  [alembic.migration] Running upgrade 81c553f3776c -> 117643811bca, nec: delete old ofc mapping tables
INFO  [alembic.migration] Running upgrade 117643811bca -> 19180cf98af6, nsx_gw_devices
INFO  [alembic.migration] Running upgrade 19180cf98af6 -> 33dd0a9fa487, embrane_lbaas_driver
INFO  [alembic.migration] Running upgrade 33dd0a9fa487 -> 2447ad0e9585, Add IPv6 Subnet properties
INFO  [alembic.migration] Running upgrade 2447ad0e9585 -> 538732fa21e1, NEC Rename quantum_id to neutron_id
INFO  [alembic.migration] Running upgrade 538732fa21e1 -> 5ac1c354a051, n1kv segment allocs for cisco n1kv plugin
INFO  [alembic.migration] Running upgrade 5ac1c354a051 -> icehouse, icehouse
INFO  [alembic.migration] Running upgrade icehouse -> 54f7549a0e5f, set_not_null_peer_address
INFO  [alembic.migration] Running upgrade 54f7549a0e5f -> 1e5dd1d09b22, set_not_null_fields_lb_stats
INFO  [alembic.migration] Running upgrade 1e5dd1d09b22 -> b65aa907aec, set_length_of_protocol_field
INFO  [alembic.migration] Running upgrade b65aa907aec -> 33c3db036fe4, set_length_of_description_field_metering
INFO  [alembic.migration] Running upgrade 33c3db036fe4 -> 4eca4a84f08a, Remove ML2 Cisco Credentials DB
INFO  [alembic.migration] Running upgrade 4eca4a84f08a -> d06e871c0d5, set_admin_state_up_not_null_ml2
INFO  [alembic.migration] Running upgrade d06e871c0d5 -> 6be312499f9, set_not_null_vlan_id_cisco
INFO  [alembic.migration] Running upgrade 6be312499f9 -> 1b837a7125a9, Cisco APIC Mechanism Driver
INFO  [alembic.migration] Running upgrade 1b837a7125a9 -> 10cd28e692e9, nuage_extraroute
INFO  [alembic.migration] Running upgrade 10cd28e692e9 -> 2db5203cb7a9, nuage_floatingip
INFO  [alembic.migration] Running upgrade 2db5203cb7a9 -> 5446f2a45467, set_server_default
INFO  [alembic.migration] Running upgrade 5446f2a45467 -> db_healing, Include all tables and make migrations unconditional.
INFO  [alembic.migration] Context impl MySQLImpl.
INFO  [alembic.migration] Will assume non-transactional DDL.
INFO  [alembic.autogenerate.compare] Detected server default on column 'cisco_ml2_apic_epgs.provider'
INFO  [alembic.autogenerate.compare] Detected server default on column 'cisco_n1kv_vxlan_allocations.allocated'
INFO  [alembic.autogenerate.compare] Detected server default on column 'cisco_network_profiles.multicast_ip_index'
INFO  [alembic.autogenerate.compare] Detected server default on column 'meteringlabelrules.excluded'
INFO  [alembic.autogenerate.compare] Detected server default on column 'ml2_port_bindings.host'
INFO  [alembic.autogenerate.compare] Detected removed foreign key (router_id)(id) on table nuage_floatingip_pool_mapping
INFO  [alembic.autogenerate.compare] Detected added column 'nuage_routerroutes_mapping.destination'
INFO  [alembic.autogenerate.compare] Detected added column 'nuage_routerroutes_mapping.nexthop'
INFO  [alembic.autogenerate.compare] Detected server default on column 'poolmonitorassociations.status'
INFO  [alembic.autogenerate.compare] Detected added index 'ix_quotas_tenant_id' on '['tenant_id']'
INFO  [alembic.migration] Running upgrade db_healing -> 3927f7f7c456, L3 extension distributed mode
INFO  [alembic.migration] Running upgrade 3927f7f7c456 -> 2026156eab2f, L2 models to support DVR
INFO  [alembic.migration] Running upgrade 2026156eab2f -> 37f322991f59, removing_mapping_tables
INFO  [alembic.migration] Running upgrade 37f322991f59 -> 31d7f831a591, add constraint for routerid
INFO  [alembic.migration] Running upgrade 31d7f831a591 -> 5589aa32bf80, L3 scheduler additions to support DVR
INFO  [alembic.migration] Running upgrade 5589aa32bf80 -> 884573acbf1c, Drop NSX table in favor of the extra_attributes one
INFO  [alembic.migration] Running upgrade 884573acbf1c -> 4eba2f05c2f4, correct Vxlan Endpoint primary key
INFO  [alembic.migration] Running upgrade 4eba2f05c2f4 -> 327ee5fde2c7, set_innodb_engine
INFO  [alembic.migration] Running upgrade 327ee5fde2c7 -> 3b85b693a95f, Drop unused servicedefinitions and servicetypes tables.
INFO  [alembic.migration] Running upgrade 3b85b693a95f -> aae5706a396, nuage_provider_networks
INFO  [alembic.migration] Running upgrade aae5706a396 -> 32f3915891fd, cisco_apic_driver_update
INFO  [alembic.migration] Running upgrade 32f3915891fd -> 58fe87a01143, cisco_csr_routing
INFO  [alembic.migration] Running upgrade 58fe87a01143 -> 236b90af57ab, ml2_type_driver_refactor_dynamic_segments
INFO  [alembic.migration] Running upgrade 236b90af57ab -> 86d6d9776e2b, Cisco APIC Mechanism Driver
INFO  [alembic.migration] Running upgrade 86d6d9776e2b -> 16a27a58e093, ext_l3_ha_mode
INFO  [alembic.migration] Running upgrade 16a27a58e093 -> 3c346828361e, metering_label_shared
INFO  [alembic.migration] Running upgrade 3c346828361e -> 1680e1f0c4dc, Remove Cisco Nexus Monolithic Plugin
INFO  [alembic.migration] Running upgrade 1680e1f0c4dc -> 544673ac99ab, add router port relationship
INFO  [alembic.migration] Running upgrade 544673ac99ab -> juno, juno
[/mw_shl_code]
回复

使用道具 举报

12下一页
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

推荐上一条 /2 下一条