openstack 中的neutron模块controller节点配置完成后数据库同步不了,已完成keystone、Nova、模块部署。

openstack小玩家 发布于 2015/09/22 11:24
阅读 4K+
收藏 0

rhel7+icehouse

neutron.conf
******************
【DEFAULT】
rpc_backend = rabbit
rabbit_host = controller
rabbit_password = admin
auth_strategy = keystone
core_plugin = ml2
service_plugins = router
allow_overlapping_ips = True
notify_nova_on_port_status_changes = True
notify_nova_on_port_data_changes = True
nova_url = http://controller:8774/v2
nova_admin_auth_url = http://controller:35357/v2.0
nova_region_name = regionOne
nova_admin_username = nova
nova_admin_tenant_id = 35f51a9b342f4853b4f7355820c03ee4
nova_admin_password = admin
verbose = True


【database】
connection = mysql://neutron:admin@controller/neutron


【keystone_authtoken】
auth_uri = http://controller:5000/v2.0
identity_uri = http://controller:35357
admin_tenant_name = service
admin_user = neutron
admin_password = admin




*****************************************
ml2_conf.ini配置
********************


【ml2】
type_drivers = flat,gre
tenant_network_types = gre
mechanism_drivers = openvswitch


【ml2_type_gre】
tunnel_id_ranges = 1:1000


【securitygroup】
enable_security_group = True
enable_ipset = True
firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver


****************************************************
Nova.conf
*************************
【default】
network_api_class = nova.network.neutronv2.api.API
security_group_api = neutron
linuxnet_interface_driver = nova.network.linux_net.LinuxOVSInterfaceDriver
firewall_driver = nova.virt.firewall.NoopFirewallDriver


【neutron】
url = http://controller:9696
auth_strategy = keystone
admin_auth_url = http://controller:35357/v2.0
admin_tenant_name = service
admin_username = neutron
admin_password = admin

数据库同步报错:
[root@controller 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 head" neutron


*******************************
No handlers could be found for logger "neutron.common.legacy"
Traceback (most recent call last):
  File "/usr/bin/neutron-db-manage", line 10, in <module>
    sys.exit(main())
  File "/usr/lib/python2.7/site-packages/neutron/db/migration/cli.py", line 169, in main
    CONF.command.func(config, CONF.command.name)
  File "/usr/lib/python2.7/site-packages/neutron/db/migration/cli.py", line 82, in do_upgrade_downgrade
    do_alembic_command(config, cmd, revision, sql=CONF.command.sql)
  File "/usr/lib/python2.7/site-packages/neutron/db/migration/cli.py", line 60, in do_alembic_command
    getattr(alembic_command, cmd)(config, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/alembic/command.py", line 124, in upgrade
    script.run_env()
  File "/usr/lib/python2.7/site-packages/alembic/script.py", line 191, in run_env
    util.load_python_file(self.dir, 'env.py')
  File "/usr/lib/python2.7/site-packages/alembic/util.py", line 186, in load_python_file
    module = imp.load_source(module_id, path, open(path, 'rb'))
  File "/usr/lib/python2.7/site-packages/neutron/db/migration/alembic_migrations/env.py", line 42, in <module>
    importutils.import_class(class_path)
  File "/usr/lib/python2.7/site-packages/neutron/openstack/common/importutils.py", line 33, in import_class
    traceback.format_exception(*sys.exc_info())))
ImportError: Class ml2 cannot be found (['Traceback (most recent call last):\n', '  File "/usr/lib/python2.7/site-packages/neutron/openstack/common/importutils.py", line 28, in import_class\n    __import__(mod_str)\n', 'ValueError: Empty module name\n'])




启动neutron-server报错,server.log
2015-09-22 09:53:07.896 23609 INFO neutron.common.config [-] Logging enabled!
2015-09-22 09:53:07.903 23609 INFO neutron.common.config [-] Config paste file: /usr/share/neutron/api-paste.ini
2015-09-22 09:53:08.008 23609 INFO neutron.manager [-] Loading core plugin: ml2
2015-09-22 09:53:08.162 23609 INFO neutron.plugins.ml2.managers [-] Configured type driver names: ['flat', 'gre']
2015-09-22 09:53:08.165 23609 INFO neutron.plugins.ml2.drivers.type_flat [-] Allowable flat physical_network names: []
2015-09-22 09:53:08.172 23609 INFO neutron.plugins.ml2.managers [-] Loaded type driver names: ['flat', 'gre']
2015-09-22 09:53:08.173 23609 INFO neutron.plugins.ml2.managers [-] Registered types: ['flat', 'gre']
2015-09-22 09:53:08.173 23609 INFO neutron.plugins.ml2.managers [-] Tenant network_types: ['gre']
2015-09-22 09:53:08.174 23609 INFO neutron.plugins.ml2.managers [-] Configured mechanism driver names: ['openvswitch']
2015-09-22 09:53:08.175 23609 INFO neutron.plugins.ml2.managers [-] Loaded mechanism driver names: ['openvswitch']
2015-09-22 09:53:08.176 23609 INFO neutron.plugins.ml2.managers [-] Registered mechanism drivers: ['openvswitch']
2015-09-22 09:53:08.183 23609 WARNING neutron.openstack.common.db.sqlalchemy.session [-] This application has not enabled MySQL traditional mode, which means silent data corruption may occur. Please encourage the application developers to enable this mode.
2015-09-22 09:53:08.216 23609 INFO neutron.plugins.ml2.managers [-] Initializing driver for type 'flat'
2015-09-22 09:53:08.217 23609 INFO neutron.plugins.ml2.drivers.type_flat [-] ML2 FlatTypeDriver initialization complete
2015-09-22 09:53:08.217 23609 INFO neutron.plugins.ml2.managers [-] Initializing driver for type 'gre'
2015-09-22 09:53:08.217 23609 INFO neutron.plugins.ml2.drivers.type_tunnel [-] gre ID ranges: [(1, 1000)]
2015-09-22 09:53:08.340 23609 INFO neutron.plugins.ml2.managers [-] Initializing mechanism driver 'openvswitch'
2015-09-22 09:53:08.341 23609 INFO neutron.plugins.ml2.plugin [-] Modular L2 Plugin initialization complete
2015-09-22 09:53:08.343 23609 INFO neutron.manager [-] Loading Plugin: router
2015-09-22 09:53:08.381 23609 ERROR neutron.common.config [-] Unable to load neutron from configuration file /usr/share/neutron/api-paste.ini.
2015-09-22 09:53:08.381 23609 TRACE neutron.common.config Traceback (most recent call last):
2015-09-22 09:53:08.381 23609 TRACE neutron.common.config   File "/usr/lib/python2.7/site-packages/neutron/common/config.py", line 170, in load_paste_app
2015-09-22 09:53:08.381 23609 TRACE neutron.common.config     app = deploy.loadapp("config:%s" % config_path, name=app_name)
2015-09-22 09:53:08.381 23609 TRACE neutron.common.config   File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 247, in loadapp
2015-09-22 09:53:08.381 23609 TRACE neutron.common.config     return loadobj(APP, uri, name=name, **kw)
2015-09-22 09:53:08.381 23609 TRACE neutron.common.config   File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 272, in loadobj
2015-09-22 09:53:08.381 23609 TRACE neutron.common.config     return context.create()
2015-09-22 09:53:08.381 23609 TRACE neutron.common.config   File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 710, in create
2015-09-22 09:53:08.381 23609 TRACE neutron.common.config     return self.object_type.invoke(self)
2015-09-22 09:53:08.381 23609 TRACE neutron.common.config   File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 144, in invoke
2015-09-22 09:53:08.381 23609 TRACE neutron.common.config     **context.local_conf)
2015-09-22 09:53:08.381 23609 TRACE neutron.common.config   File "/usr/lib/python2.7/site-packages/paste/deploy/util.py", line 56, in fix_call
2015-09-22 09:53:08.381 23609 TRACE neutron.common.config     val = callable(*args, **kw)
2015-09-22 09:53:08.381 23609 TRACE neutron.common.config   File "/usr/lib/python2.7/site-packages/paste/urlmap.py", line 25, in urlmap_factory
2015-09-22 09:53:08.381 23609 TRACE neutron.common.config     app = loader.get_app(app_name, global_conf=global_conf)
2015-09-22 09:53:08.381 23609 TRACE neutron.common.config   File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 350, in get_app
2015-09-22 09:53:08.381 23609 TRACE neutron.common.config     name=name, global_conf=global_conf).create()
2015-09-22 09:53:08.381 23609 TRACE neutron.common.config   File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 710, in create
2015-09-22 09:53:08.381 23609 TRACE neutron.common.config     return self.object_type.invoke(self)
2015-09-22 09:53:08.381 23609 TRACE neutron.common.config   File "/usr/lib/python2.7/site-packages/neutron/services/l3_router/l3_router_plugin.py", line 76, in setup_rpc
2015-09-22 09:53:08.381 23609 TRACE neutron.common.config     self.conn = rpc.create_connection(new=True)
2015-09-22 09:53:08.381 23609 TRACE neutron.common.config   File "/usr/lib/python2.7/site-packages/neutron/openstack/common/rpc/__init__.py", line 89, in create_connection
2015-09-22 09:53:08.381 23609 TRACE neutron.common.config     return _get_impl().create_connection(CONF, new=new)
2015-09-22 09:53:08.381 23609 TRACE neutron.common.config   File "/usr/lib/python2.7/site-packages/neutron/openstack/common/rpc/__init__.py", line 274, in _get_impl
2015-09-22 09:53:08.381 23609 TRACE neutron.common.config     _RPCIMPL = importutils.import_module(impl)
2015-09-22 09:53:08.381 23609 TRACE neutron.common.config   File "/usr/lib/python2.7/site-packages/neutron/openstack/common/importutils.py", line 57, in import_module
2015-09-22 09:53:08.381 23609 TRACE neutron.common.config     __import__(import_str)
2015-09-22 09:53:08.381 23609 TRACE neutron.common.config ImportError: No module named rabbit
2015-09-22 09:53:08.381 23609 TRACE neutron.common.config
2015-09-22 09:53:08.383 23609 ERROR neutron.service [-] Error occurred: trying old api-paste.ini.
2015-09-22 09:53:08.383 23609 TRACE neutron.service Traceback (most recent call last):
2015-09-22 09:53:08.383 23609 TRACE neutron.service   File "/usr/lib/python2.7/site-packages/neutron/service.py", line 105, in serve_wsgi
2015-09-22 09:53:08.383 23609 TRACE neutron.service     service.start()
2015-09-22 09:53:08.383 23609 TRACE neutron.service   File "/usr/lib/python2.7/site-packages/neutron/service.py", line 74, in start
2015-09-22 09:53:08.383 23609 TRACE neutron.service     self.wsgi_app = _run_wsgi(self.app_name)
2015-09-22 09:53:08.383 23609 TRACE neutron.service   File "/usr/lib/python2.7/site-packages/neutron/service.py", line 173, in _run_wsgi
2015-09-22 09:53:08.383 23609 TRACE neutron.service     app = config.load_paste_app(app_name)
2015-09-22 09:53:08.383 23609 TRACE neutron.service   File "/usr/lib/python2.7/site-packages/neutron/common/config.py", line 177, in load_paste_app
2015-09-22 09:53:08.383 23609 TRACE neutron.service     raise RuntimeError(msg)
2015-09-22 09:53:08.383 23609 TRACE neutron.service RuntimeError: Unable to load neutron from configuration file /usr/share/neutron/api-paste.ini.
2015-09-22 09:53:08.383 23609 TRACE neutron.service
2015-09-22 09:53:08.385 23609 INFO neutron.common.config [-] Logging enabled!
2015-09-22 09:53:08.392 23609 INFO neutron.common.config [-] Config paste file: /usr/share/neutron/api-paste.ini
2015-09-22 09:53:08.393 23609 ERROR neutron.common.config [-] Unable to load quantum from configuration file /usr/share/neutron/api-paste.ini.
2015-09-22 09:53:08.385 23609 INFO neutron.common.config [-] Logging enabled!
2015-09-22 09:53:08.392 23609 INFO neutron.common.config [-] Config paste file: /usr/share/neutron/api-paste.ini
2015-09-22 09:53:08.393 23609 ERROR neutron.common.config [-] Unable to load quantum from configuration file /usr/share/neutron/api-paste.ini.
2015-09-22 09:53:08.393 23609 TRACE neutron.common.config Traceback (most recent call last):
2015-09-22 09:53:08.393 23609 TRACE neutron.common.config   File "/usr/lib/python2.7/site-packages/neutron/common/config.py", line 170, in load_paste_app
2015-09-22 09:53:08.393 23609 TRACE neutron.common.config     app = deploy.loadapp("config:%s" % config_path, name=app_name)
2015-09-22 09:53:08.393 23609 TRACE neutron.common.config   File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 247, in loadapp
2015-09-22 09:53:08.393 23609 TRACE neutron.common.config     return loadobj(APP, uri, name=name, **kw)
2015-09-22 09:53:08.393 23609 TRACE neutron.common.config   File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 271, in loadobj
2015-09-22 09:53:08.393 23609 TRACE neutron.common.config     global_conf=global_conf)
2015-09-22 09:53:08.393 23609 TRACE neutron.common.config   File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 296, in loadcontext
2015-09-22 09:53:08.393 23609 TRACE neutron.common.config     global_conf=global_conf)
2015-09-22 09:53:08.393 23609 TRACE neutron.common.config   File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 320, in _loadconfig
2015-09-22 09:53:08.393 23609 TRACE neutron.common.config     return loader.get_context(object_type, name, global_conf)
2015-09-22 09:53:08.393 23609 TRACE neutron.common.config   File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 408, in get_context
2015-09-22 09:53:08.393 23609 TRACE neutron.common.config     object_type, name=name)
2015-09-22 09:53:08.393 23609 TRACE neutron.common.config   File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 587, in find_config_section
2015-09-22 09:53:08.393 23609 TRACE neutron.common.config     self.filename))
2015-09-22 09:53:08.393 23609 TRACE neutron.common.config LookupError: No section 'quantum' (prefixed by 'app' or 'application' or 'composite' or 'composit' or 'pipeline' or 'filter-app') found in config /usr/share/neutron/api-paste.ini
2015-09-22 09:53:08.393 23609 TRACE neutron.common.config
2015-09-22 09:53:08.393 23609 ERROR neutron.service [-] Unrecoverable error: please check log for details.
2015-09-22 09:53:08.393 23609 TRACE neutron.service Traceback (most recent call last):
2015-09-22 09:53:08.393 23609 TRACE neutron.service   File "/usr/lib/python2.7/site-packages/neutron/service.py", line 109, in serve_wsgi
2015-09-22 09:53:08.393 23609 TRACE neutron.service     service.start()
2015-09-22 09:53:08.393 23609 TRACE neutron.service   File "/usr/lib/python2.7/site-packages/neutron/service.py", line 74, in start
2015-09-22 09:53:08.393 23609 TRACE neutron.service     self.wsgi_app = _run_wsgi(self.app_name)
2015-09-22 09:53:08.393 23609 TRACE neutron.service   File "/usr/lib/python2.7/site-packages/neutron/service.py", line 173, in _run_wsgi
2015-09-22 09:53:08.393 23609 TRACE neutron.service     app = config.load_paste_app(app_name)
2015-09-22 09:53:08.393 23609 TRACE neutron.service   File "/usr/lib/python2.7/site-packages/neutron/common/config.py", line 177, in load_paste_app
2015-09-22 09:53:08.393 23609 TRACE neutron.service     raise RuntimeError(msg)
2015-09-22 09:53:08.393 23609 TRACE neutron.service RuntimeError: Unable to load quantum from configuration file /usr/share/neutron/api-paste.ini.
2015-09-22 09:53:08.393 23609 TRACE neutron.service




加载中
0
s
shore_go

后来找到原因为什么了? 

我载入kilo版本时,也提示:

 Unable to load neutron from configuration file /usr/share/neutron/api-paste.ini

返回顶部
顶部