问题:
[root@localhost ~]# systemctl status neutron-server
● neutron-server.service - OpenStack Neutron Server
Loaded: loaded (/usr/lib/systemd/system/neutron-server.service; disabled; vendor preset: disabled)
Active: inactive (dead)
[root@localhost ~]# systemctl restart neutron-server
Job for neutron-server.service failed because the control process exited with error code. See "systemctl status neutron-server.service" and "journalctl -xe" for details.
[root@localhost ~]# systemctl status neutron-server.service
● neutron-server.service - OpenStack Neutron Server
Loaded: loaded (/usr/lib/systemd/system/neutron-server.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Wed 2016-09-21 02:24:59 EDT; 5s ago
Process: 3304 ExecStart=/usr/bin/neutron-server --config-file /usr/share/neutron/neutron-dist.conf --config-dir /usr/share/neutron/server --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugin.ini --config-dir /etc/neutron/conf.d/common --config-dir /etc/neutron/conf.d/neutron-server --log-file /var/log/neutron/server.log (code=exited, status=1/FAILURE)
Main PID: 3304 (code=exited, status=1/FAILURE)
Sep 21 02:24:56 localhost systemd[1]: Starting OpenStack Neutron Server...
Sep 21 02:24:57 localhost neutron-server[3304]: Guru mediation now registers SIGUSR1 and SIGUSR2 by defau...rts.
Sep 21 02:24:58 localhost neutron-server[3304]: Option "verbose" from group "DEFAULT" is deprecated for r...ure.
Sep 21 02:24:58 localhost neutron-server[3304]: Option "notification_driver" from group "DEFAULT" is depr...ns".
Sep 21 02:24:59 localhost systemd[1]: neutron-server.service: main process exited, code=exited, status=1/FAILURE
Sep 21 02:24:59 localhost systemd[1]: Failed to start OpenStack Neutron Server.
Sep 21 02:24:59 localhost systemd[1]: Unit neutron-server.service entered failed state.
Sep 21 02:24:59 localhost systemd[1]: neutron-server.service failed.
1.分析:
logs看问题:
cd /var/log/neutron/
tail -f *.log
2016-09-21 02:36:52.236 5132 INFO neutron.common.config [-] Logging enabled!
2016-09-21 02:36:52.236 5132 INFO neutron.common.config [-] /usr/bin/neutron-server version 8.1.2
2016-09-21 02:36:52.237 5132 INFO neutron.common.config [-] Logging enabled!
2016-09-21 02:36:52.237 5132 INFO neutron.common.config [-] /usr/bin/neutron-server version 8.1.2
2016-09-21 02:36:52.252 5132 INFO neutron.manager [-] Loading core plugin: neutron.plugins.ml2.plugin.Ml2Plugin
2016-09-21 02:36:52.453 5132 INFO neutron.plugins.ml2.managers [-] Configured type driver names: ['flat', 'local']
2016-09-21 02:36:52.457 5132 INFO neutron.plugins.ml2.drivers.type_flat [-] Arbitrary flat physical_network names allowed
2016-09-21 02:36:52.458 5132 INFO neutron.plugins.ml2.drivers.type_local [-] ML2 LocalTypeDriver initialization complete
2016-09-21 02:36:52.458 5132 INFO neutron.plugins.ml2.managers [-] Loaded type driver names: ['flat', 'local']
2016-09-21 02:36:52.458 5132 INFO neutron.plugins.ml2.managers [-] Registered types: ['flat', 'local']
2016-09-21 02:36:52.459 5132 ERROR neutron.plugins.ml2.managers [-] No type driver for tenant network_type: vlan. Service terminated!
查看配置文件:
/etc/neutron/plugins/ml2/ml2_conf.ini
[ml2]
#
# From neutron.ml2
#
# List of network type driver entrypoints to be loaded from the
# neutron.ml2.type_drivers namespace. (list value)
#type_drivers = local,flat,vlan,gre,vxlan,geneve
type_drivers = flat,local
# Ordered list of network_types to allocate as tenant networks. The default
# value 'local' is useful for single-box testing but provides no connectivity
# between hosts. (list value)
#tenant_network_types = local
tenant_network_types = vlan
driver支持flat和local两种,但是tenant_network_type却使用vlan类型导致:
No type driver for tenant network_type: vlan. Service terminated!
解决方法:
type_drivers = flat,vlan,local
结果:
[root@localhost ml2]# systemctl restart neutron-server
[root@localhost ml2]# systemctl status neutron-server
● neutron-server.service - OpenStack Neutron Server
Loaded: loaded (/usr/lib/systemd/system/neutron-server.service; disabled; vendor preset: disabled)
Active: active (running) since Wed 2016-09-21 02:38:28 EDT; 6min ago
Main PID: 5384 (neutron-server)
CGroup: /system.slice/neutron-server.service
├─5384 /usr/bin/python2 /usr/bin/neutron-server --config-file /usr/share/neutron/neutron-dist.conf...
├─5400 /usr/bin/python2 /usr/bin/neutron-server --config-file /usr/share/neutron/neutron-dist.conf...
├─5401 /usr/bin/python2 /usr/bin/neutron-server --config-file /usr/share/neutron/neutron-dist.conf...
├─5402 /usr/bin/python2 /usr/bin/neutron-server --config-file /usr/share/neutron/neutron-dist.conf...
├─5403 /usr/bin/python2 /usr/bin/neutron-server --config-file /usr/share/neutron/neutron-dist.conf...
└─5404 /usr/bin/python2 /usr/bin/neutron-server --config-file /usr/share/neutron/neutron-dist.conf...
Sep 21 02:38:24 localhost systemd[1]: Starting OpenStack Neutron Server...
Sep 21 02:38:24 localhost neutron-server[5384]: Guru mediation now registers SIGUSR1 and SIGUSR2 by defau...rts.
Sep 21 02:38:26 localhost neutron-server[5384]: Option "verbose" from group "DEFAULT" is deprecated for r...ure.
Sep 21 02:38:26 localhost neutron-server[5384]: Option "notification_driver" from group "DEFAULT" is depr...ns".
Sep 21 02:38:28 localhost systemd[1]: Started OpenStack Neutron Server.
Hint: Some lines were ellipsized, use -l to show in full.