分享

nova 计算节点启动异常

笑傲风云 发表于 2016-4-11 09:18:30 [显示全部楼层] 回帖奖励 阅读模式 关闭右栏 5 12557
环境:C7.1+L版
启动计算节点nova:
[root@linux-node2 ~]# systemctl enable libvirtd openstack-nova-compute
[root@linux-node2 nova]# systemctl start libvirtd openstack-nova-compute

查看启动状态:
[root@linux-node2 ~]# systemctl status libvirtd      
● libvirtd.service - Virtualization daemon
   Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled; vendor preset: enabled)
   Active: active (running) since Sat 2016-04-09 21:35:33 CST; 1min 25s ago
     Docs: man:libvirtd(8)
           http://libvirt.org
Main PID: 4517 (libvirtd)
   CGroup: /system.slice/libvirtd.service
           └─4517 /usr/sbin/libvirtd
Apr 09 21:35:33 linux-node2.oldboyedu.com systemd[1]: Starting Virtualization daemon...
Apr 09 21:35:33 linux-node2.oldboyedu.com libvirtd[4517]: libvirt version: 1.2.17, pa...
Apr 09 21:35:33 linux-node2.oldboyedu.com libvirtd[4517]: Module /usr/lib64/libvirt/c...
Apr 09 21:35:33 linux-node2.oldboyedu.com systemd[1]: Started Virtualization daemon.
Hint: Some lines were ellipsized, use -l to show in full.
[root@linux-node2 ~]# systemctl status openstack-nova-compute
● openstack-nova-compute.service - OpenStack Nova Compute Server
   Loaded: loaded (/usr/lib/systemd/system/openstack-nova-compute.service; enabled; vendor preset: disabled)
   Active: failed (Result: start-limit) since Sat 2016-04-09 21:35:42 CST; 4min 31s ago
  Process: 4589 ExecStart=/usr/bin/nova-compute (code=exited, status=0/SUCCESS)
Main PID: 4589 (code=exited, status=0/SUCCESS)
Apr 09 21:35:42 linux-node2.oldboyedu.com systemd[1]: Started OpenStack Nova Comp....
Apr 09 21:35:42 linux-node2.oldboyedu.com systemd[1]: openstack-nova-compute.serv....
Apr 09 21:35:42 linux-node2.oldboyedu.com systemd[1]: start request repeated too ...e
Apr 09 21:35:42 linux-node2.oldboyedu.com systemd[1]: Failed to start OpenStack N....
Apr 09 21:35:42 linux-node2.oldboyedu.com systemd[1]: Unit openstack-nova-compute....
Apr 09 21:35:42 linux-node2.oldboyedu.com systemd[1]: openstack-nova-compute.serv....
Hint: Some lines were ellipsized, use -l to show in full.

验证nova是否注册成功:
#没注册过来
[root@linux-node1 ~]# source admin-openrc.sh
[root@linux-node1 ~]# openstack host list
+---------------------------+-------------+----------+
| Host Name                 | Service     | Zone     |
+---------------------------+-------------+----------+
| linux-node1.oldboyedu.com | conductor   | internal |
| linux-node1.oldboyedu.com | consoleauth | internal |
| linux-node1.oldboyedu.com | scheduler   | internal |
| linux-node1.oldboyedu.com | cert        | internal |

查看日志:
[root@linux-node2 ~]# tail -f /var/log/nova/nova-compute.log
2016-04-08 22:25:22.418 24884 ERROR nova.virt.driver [-] Unable to load the virtualization driver
2016-04-08 22:25:22.418 24884 ERROR nova.virt.driver Traceback (most recent call last):
2016-04-08 22:25:22.418 24884 ERROR nova.virt.driver   File "/usr/lib/python2.7/site-packages/nova/virt/driver.py", line 1454, in load_compute_driver
2016-04-08 22:25:22.418 24884 ERROR nova.virt.driver     virtapi)
2016-04-08 22:25:22.418 24884 ERROR nova.virt.driver   File "/usr/lib/python2.7/site-packages/oslo_utils/importutils.py", line 52, in import_object_ns
2016-04-08 22:25:22.418 24884 ERROR nova.virt.driver     return import_class(import_str)(*args, **kwargs)
2016-04-08 22:25:22.418 24884 ERROR nova.virt.driver   File "/usr/lib/python2.7/site-packages/oslo_utils/importutils.py", line 33, in import_class
2016-04-08 22:25:22.418 24884 ERROR nova.virt.driver     traceback.format_exception(*sys.exc_info())))
2016-04-08 22:25:22.418 24884 ERROR nova.virt.driver ImportError: Class LibvirtDriver cannot be found (['Traceback (most recent call last):\n', '  File "/usr/lib/python2.7/site-packages/oslo_utils/importutils.py", line 29, in import_class\n    return getattr(sys.modules[mod_str], class_str)\n', "AttributeError: 'module' object has no attribute 'LibvirtDriver'\n"])









已有(5)人评论

跳转到指定楼层
wscl1213 发表于 2016-4-11 14:23:44
nova的配置不多,查看下关于libvirt的相关配置
回复

使用道具 举报

Alkaloid0515 发表于 2016-4-11 14:29:04


这个配置文件检测下,你在L 版中找到对应的信息
/etc/nova/nova.conf:
# COMPUTE
libvirt_type=kvm
compute_driver=libvirt.LibvirtDriver
instance_name_template=instance-%08x
api_paste_config=/etc/nova/api-paste.ini

还有
compute_driver=libvirt.LibvirtDriver  
还是
compute_driver=nova.virt.libvirt.LibvirtDriver


回复

使用道具 举报

笑傲风云 发表于 2016-4-11 17:47:23
这是原配置信息:
[root@linux-node2 ~]# grep -n '^[a-Z]' /etc/nova/nova.conf
196:my_ip=10.0.0.3
342:enabled_apis=osapi_compute,metadata
505:auth_strategy=keystone
837:network_api_class=nova.network.neutronv2.api.API
929:linuxnet_interface_driver=nova.network.linux_net.NeutroLinuxBridgeInterfaceDriver
1063:security_group_api=neutron
1214:compute_driver=libvirt.LibvirtDriver
1240:firewall_driver=nova.virt.libvirt.firewall.NoopFirewallDriver
1277:debug=ture
1283:verbose=true
1422:rpc_backend=rabbit
1461:connection=mysql://nova:nova@10.0.0.2/nova
1943:host=10.0.0.2
2126:auth_uri = http://10.0.0.2:5000
2127:auth_url = http://10.0.0.2:35357
2128:auth_plugin = password
2129:project_domain_id = default
2130:user_domain_id = default
2131:project_name = service
2132:username = nova
2133:password = nova
2311:virt_type=kvm
2754:lock_path=/var/lib/nova/tmp
2935:rabbit_host=10.0.0.2
2939:rabbit_port=5672
2951:rabbit_userid=openstack
2955:rabbit_password=openstack
3313:novncproxy_base_url=http://10.0.0.2:6080/vnc_auto.html
3322:vncserver_listen=0.0.0.0
3327:vncserver_proxyclient_address=10.0.0.3
3331:vnc_enabled=true
3335:vnc_keymap=en-us
回复

使用道具 举报

atsky123 发表于 2016-4-11 18:31:55
本帖最后由 atsky123 于 2016-4-11 18:38 编辑
笑傲风云 发表于 2016-4-11 17:47
这是原配置信息:
[root@linux-node2 ~]# grep -n '^[a-Z]' /etc/nova/nova.conf
196:my_ip=10.0.0.3

2311:virt_type=kvm
换成qemu
2311:virt_type= qemu

然后重启下服务
[mw_shl_code=bash,true]service nova-compute restart[/mw_shl_code]
这是Ubuntu的,找到centos对应的服务
回复

使用道具 举报

笑傲风云 发表于 2016-4-11 20:27:44

只需要改这个参数吗,其他的需要改吗
[root@linux-node2 ~]# grep virt_type /etc/nova/nova.conf
virt_type=qemu
#libvirt_type=kvm
# Override the default libvirt URI (which is dependent on virt_type) (string
# is dependent on virt_type. (valid options are: sd, xvd, uvd, vd) (string
# CPU model; to "none" to not set any CPU model. If virt_type="kvm|qemu", it
# virt_type="kvm|qemu" (string value)
[root@linux-node2 ~]# systemctl restart libvirtd               
[root@linux-node2 ~]# systemctl restart openstack-nova-compute
[root@linux-node2 ~]# systemctl status openstack-nova-compute   

[root@linux-node2 ~]# systemctl status openstack-nova-compute
● openstack-nova-compute.service - OpenStack Nova Compute Server
   Loaded: loaded (/usr/lib/systemd/system/openstack-nova-compute.service; enabled; vendor preset: disabled)
   Active: failed (Result: start-limit) since 二 2016-04-12 04:27:51 CST; 11s ago
  Process: 2830 ExecStart=/usr/bin/nova-compute (code=exited, status=0/SUCCESS)
Main PID: 2830 (code=exited, status=0/SUCCESS)

4月 12 04:27:51 linux-node2.oldboyedu.com systemd[1]: Started OpenStack Nova Comp...
4月 12 04:27:51 linux-node2.oldboyedu.com systemd[1]: openstack-nova-compute.serv...
4月 12 04:27:51 linux-node2.oldboyedu.com systemd[1]: start request repeated too ...
4月 12 04:27:51 linux-node2.oldboyedu.com systemd[1]: Failed to start OpenStack N...
4月 12 04:27:51 linux-node2.oldboyedu.com systemd[1]: Unit openstack-nova-compute...
4月 12 04:27:51 linux-node2.oldboyedu.com systemd[1]: openstack-nova-compute.serv...
Hint: Some lines were ellipsized, use -l to show in full.
回复

使用道具 举报

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

本版积分规则

关闭

推荐上一条 /2 下一条