OpenStack 无法连接到Neutron 问题解决

    我们在Icehouse版本创建虚拟机会遇到错误:无法连接到Neutron.的报错,但是虚拟机还可以创建成功,这个是一个已知的bug,可以通过修改源码解决。     注意:还有一种情况,就是你的Neutron真的无法连接,要查看服务和监听端口是否正常! Yum安装的文件在这里: [root@test-node1 ~]# vim /usr/share/openstack-dashboard/openstack_dashboard/api/neutron.py 源码安装的在这里: vim /usr/lib/python2.6/site-packages/openstack_dashboard/api/neutron.py 在class FloatingIpManager类里少了is_supported的方法,这个是一个bug,可以通过手动修改解决。 def is_simple_associate_supported(self):         # NOTE: There are two reason that simple association support         # needs more considerations. (1) Neutron does not support the         # default floating IP pool at the moment. It can be avoided         # in case where only one floating IP pool exists.         # (2) Neutron floating IP is associated with each VIF and         # we need to check whether such VIF is only one for an instance         # to enable simple association support.         return False #在这个类的最下面,增加下面的方法,注意缩进。     def is_supported(self):         network_config = getattr(settings, 'OPENSTACK_NEUTRON_NETWORK', {})         return network_config.get('enable_router', True) 修改完毕后,需要重启apache才可以生效: [root@test-node1 ~]# /etc/init.d/httpd restart

2 个评论

赵班长,我的openstack创建了云主机,并成功启动,但是在控制台登录的时候输入cirros ,cubswin显示 Login incorrect是怎么回事啊? 求救赵班长!! 这是compute的日志文件 tail -f /var/log/nova/compute.log 2016-04-05 22:58:23.879 3261 WARNING nova.virt.disk.vfs.guestfs [req-7dd54cac-02f0-4ae6-a4e6-a638993334e5 755b587f422646918bbae1ab1bf8b5ca 4bcaccf2fa8f4ec49b278a3c4c2831ce] Failed to close augeas aug_close: do_aug_close: you must call 'aug-init' first to initialize Augeas 2016-04-05 23:11:07.977 3261 WARNING nova.virt.libvirt.imagecache [-] Unknown base file: /var/lib/nova/instances/_base/5eab6e9067b448e665dd25a970a246b90c83b1ea 2016-04-05 23:35:36.929 3261 WARNING nova.compute.manager [-] [instance: 5dcba5f2-3518-44c5-a050-12ea5c4ad3a1] Instance is paused unexpectedly. Ignore. 2016-04-05 23:35:58.522 3261 WARNING nova.compute.manager [-] [instance: 5dcba5f2-3518-44c5-a050-12ea5c4ad3a1] Instance shutdown by itself. Calling the stop API. 2016-04-06 09:04:44.800 3228 INFO oslo.messaging._drivers.impl_rabbit [-] Connected to AMQP server on 192.168.75.10:5672 2016-04-06 09:04:44.932 3228 INFO oslo.messaging._drivers.impl_rabbit [-] Connected to AMQP server on 192.168.75.10:5672 2016-04-06 09:04:54.959 3228 WARNING nova.conductor.api [req-d81103bc-afb6-4495-8210-053723fedf3d None None] Timed out waiting for nova-conductor. Is it running? Or did this service start before nova-conductor? 2016-04-06 09:04:56.761 3228 INFO oslo.messaging._drivers.impl_rabbit [-] Connected to AMQP server on 192.168.75.10:5672 2016-04-06 09:05:30.202 3228 WARNING nova.compute.manager [req-f264e8de-ba44-4e88-b5f2-1d8df4defc24 None None] Found 1 in the database and 0 on the hypervisor. 2016-04-06 09:14:41.753 3228 WARNING nova.compute.manager [-] Bandwidth usage not supported by hypervisor. 这是api的日志文件 tail -f /var/log/nova/api.log 2016-04-05 22:31:14.487 3245 WARNING keystoneclient.middleware.auth_token [-] Configuring admin URI using auth fragments. This is deprecated, use 'identity_uri' instead. 2016-04-05 22:38:52.893 3539 INFO oslo.messaging._drivers.impl_rabbit [-] Connected to AMQP server on 192.168.75.10:5672 2016-04-05 22:40:15.790 3539 WARNING keystoneclient.middleware.auth_token [-] Unable to find authentication token in headers 2016-04-05 22:40:26.035 3539 INFO oslo.messaging._drivers.impl_rabbit [-] Connected to AMQP server on 192.168.75.10:5672 2016-04-06 09:04:47.060 3212 WARNING keystoneclient.middleware.auth_token [-] Configuring admin URI using auth fragments. This is deprecated, use 'identity_uri' instead. 2016-04-06 09:04:47.097 3212 WARNING keystoneclient.middleware.auth_token [-] Configuring admin URI using auth fragments. This is deprecated, use 'identity_uri' instead. 2016-04-06 09:04:48.285 3212 WARNING keystoneclient.middleware.auth_token [-] Configuring admin URI using auth fragments. This is deprecated, use 'identity_uri' instead. 2016-04-06 09:06:39.462 3525 INFO oslo.messaging._drivers.impl_rabbit [-] Connected to AMQP server on 192.168.75.10:5672 2016-04-06 09:06:45.779 3525 WARNING keystoneclient.middleware.auth_token [-] Unable to find authentication token in headers 2016-04-06 09:07:00.309 3525 INFO oslo.messaging._drivers.impl_rabbit [-] Connected to AMQP server on 192.168.75.10:5672 这是consoleauth的日志文件 [root@linux-node1 ~]# tail -f /var/log/nova/consoleauth.log 2016-04-05 22:23:01.851 39247 WARNING nova.openstack.common.loopingcall [-] task run outlasted interval by 20.782529 sec 2016-04-05 22:24:37.333 39247 WARNING nova.openstack.common.loopingcall [-] task run outlasted interval by 85.479656 sec 2016-04-05 22:27:00.920 39247 WARNING nova.openstack.common.loopingcall [-] task run outlasted interval by 133.586994 sec 2016-04-05 22:27:23.201 39247 WARNING nova.openstack.common.loopingcall [-] task run outlasted interval by 2.267414 sec 2016-04-05 22:31:14.551 3277 INFO oslo.messaging._drivers.impl_rabbit [-] Connected to AMQP server on 192.168.75.10:5672 2016-04-05 22:40:26.138 3277 INFO oslo.messaging._drivers.impl_rabbit [-] Connected to AMQP server on 192.168.75.10:5672 2016-04-05 22:40:27.305 3277 INFO oslo.messaging._drivers.impl_rabbit [-] Connected to AMQP server on 192.168.75.10:5672 2016-04-06 09:04:49.345 3244 INFO oslo.messaging._drivers.impl_rabbit [-] Connected to AMQP server on 192.168.75.10:5672 2016-04-06 09:07:00.395 3244 INFO oslo.messaging._drivers.impl_rabbit [-] Connected to AMQP server on 192.168.75.10:5672 2016-04-06 09:07:01.347 3244 INFO oslo.messaging._drivers.impl_rabbit [-] Connected to AMQP server on 192.168.75.10:5672
密码输入错了吧

要回复文章请先登录注册