声明:绝对原创,欢迎转载,但请标明出处,谢谢!
最近在做openstack与Docker的集成工作,走了不少弯路,遇到不少问题,不过最终搭建成功了。现在将过程分享出来,以供参考。
一、环境介绍
1、软件环境:
CentOs7 64位、OpenStack(Juno)、Docker version 1.5.0
2、网络:
- 1 $vim /etc/hosts
- 2
- 3 192.168.245.148 compute1
- 4
- 5 192.168.245.141 controller
3、安装前提:
3.1 控制节点安装
身份认证服务——Keystone
镜像服务——Glance
计算服务——Nova
网络服务——Nova-network
Web界面——Dashboard
3.2 计算节点安装:
计算服务——Nova
网络服务——Nova-network
3.3 计算节点与控制节点已联通
二、计算节点配置
1、管理员权限:
1 $su
2、关闭防火墙、selinux
- 1 $systemctl stop firewalld.service
- 2
- 3 $setenforce 0
3、安装Docker
1 $yum install docker
4、获得Docker CentOs镜像、开启容器
- 1 $docker pull centos
- 2
- 3 $docker images centos
- 4
- 5 $docker run -i -t centos /bin/bash
- 6
- 7 $exit
5、nova-docker-driver安装前准备工作
5.1 安装pip
官网下载安装包 https://pypi.python.org/pypi/pip 。解压之后:
1 $python setup.py install
5.2 安装Python-dev
1 $yum install python-devel
6、nova-docker-driver安装
- 1 $pip install -e git+https://github.com/stackforge/nova-docker#egg=novadocker
- 2
- 3 $cd src/novadocker/
- 4
- 5 $python setup.py install
7、Nova配置
配置 /etc/nova/nova.conf
- 1 $vim /etc/nova/nova.conf
- 2
- 3 [DEFAULT]
- 4
- 5 compute_driver = novadocker.virt.docker.DockerDriver
创建文件夹 /etc/nova/rootwrap.d在其中创建文件docker.filters,内容如下:
- 1 # nova-rootwrap command filters for setting up network in the docker driver
- 2
- 3 # This file should be owned by (and only-writeable by) the root user
- 4
- 5
- 6
- 7 [Filters]
- 8
- 9 # nova/virt/docker/driver.py: 'ln', '-sf', '/var/run/netns/.*'
- 10
- 11 ln: CommandFilter, /bin/ln, root
三、控制节点配置
- 1 $vim /etc/glance/glance-api.conf
- 2
- 3 container_formats=ami,ari,aki,bare,ovf,ova,docker
四、docker镜像发布
- 1 $vim admin.sh
- 2
- 3 export OS_TENANT_NAME=admin
- 4
- 5 export OS_USERNAME=admin
- 6
- 7 export OS_PASSWORD=YOUR_PASS
- 8
- 9 export OS_AUTH_URL=http://controller:35357/v2.0
- 1 $source admin.sh
- 2
- 3 $docker save centos | glance image-create --is-public=True --container-format=docker --disk-format=raw --name centos
至此,基本的安装配置已完成,你可以尝试在控制节点的web界面上启动centOS的镜像实例。
但事实远非如此,以下记录排错过程。涉及到的日志文件有
控制节点上:/var/log/nova/nova-scheduler.log、/var/log/nova/nova-conductor.log
计算节点上:/var/log/nova/nova-compute.log、/var/log/messages、systemctl status openstack-nova-network.service –l 、systemctl status openstack-nova-compute.service -l
问题1:计算节点Nova-compute启动报错
- 1 Apr 23 16:05:23 localhost systemd: Starting OpenStack Nova Compute Server...
- 2 Apr 23 16:05:23 localhost nova-compute: 2015-04-23 16:05:23.701 6559 DEBUG nova.servicegroup.api [-] ServiceGroup driver defined as an instance of db __new__ /usr/lib/python2.7/site-packages/nova/servicegroup/api.py:65
- 3 Apr 23 16:05:23 localhost nova-compute: 2015-04-23 16:05:23.967 6559 INFO nova.virt.driver [-] Loading compute driver 'novadocker.virt.docker.DockerDriver'
- 4 Apr 23 16:05:23 localhost nova-compute: 2015-04-23 16:05:23.975 6559 ERROR nova.virt.driver [-] Unable to load the virtualization driver
- 5 Apr 23 16:05:23 localhost nova-compute: 2015-04-23 16:05:23.975 6559 TRACE nova.virt.driver Traceback (most recent call last):
- 6 Apr 23 16:05:23 localhost nova-compute: 2015-04-23 16:05:23.975 6559 TRACE nova.virt.driver File "/usr/lib/python2.7/site-packages/nova/virt/driver.py", line 1402, in load_compute_driver
- 7 Apr 23 16:05:23 localhost nova-compute: 2015-04-23 16:05:23.975 6559 TRACE nova.virt.driver virtapi)
- 8 Apr 23 16:05:23 localhost nova-compute: 2015-04-23 16:05:23.975 6559 TRACE nova.virt.driver File "/usr/lib/python2.7/site-packages/nova/openstack/common/importutils.py", line 52, in import_object_ns
- 9 Apr 23 16:05:23 localhost nova-compute: 2015-04-23 16:05:23.975 6559 TRACE nova.virt.driver return import_class(import_str)(*args, **kwargs)
- 10 Apr 23 16:05:23 localhost nova-compute: 2015-04-23 16:05:23.975 6559 TRACE nova.virt.driver File "/usr/lib/python2.7/site-packages/nova/openstack/common/importutils.py", line 27, in import_class
- 11 Apr 23 16:05:23 localhost nova-compute: 2015-04-23 16:05:23.975 6559 TRACE nova.virt.driver __import__(mod_str)
- 12 Apr 23 16:05:23 localhost nova-compute: 2015-04-23 16:05:23.975 6559 TRACE nova.virt.driver File "/usr/lib/python2.7/site-packages/novadocker/virt/docker/__init__.py", line 20, in <module>
- 13 Apr 23 16:05:23 localhost nova-compute: 2015-04-23 16:05:23.975 6559 TRACE nova.virt.driver from novadocker.virt.docker import driver
- 14 Apr 23 16:05:23 localhost nova-compute: 2015-04-23 16:05:23.975 6559 TRACE nova.virt.driver File "/usr/lib/python2.7/site-packages/novadocker/virt/docker/driver.py", line 29, in <module>
- 15 Apr 23 16:05:23 localhost nova-compute: 2015-04-23 16:05:23.975 6559 TRACE nova.virt.driver from oslo_log import log
- 16 Apr 23 16:05:23 localhost nova-compute: 2015-04-23 16:05:23.975 6559 TRACE nova.virt.driver ImportError: No module named oslo_log
- 17 Apr 23 16:05:23 localhost nova-compute: 2015-04-23 16:05:23.975 6559 TRACE nova.virt.driver
- 18 Apr 23 16:05:24 localhost systemd: openstack-nova-compute.service: main process exited, code=exited, status=1/FAILURE
- 19 Apr 23 16:05:24 localhost systemd: Failed to start OpenStack Nova Compute Server.
- 20 Apr 23 16:05:24 localhost systemd: Unit openstack-nova-compute.service entered failed state.
- 21 Apr 23 16:05:24 localhost systemd: openstack-nova-compute.service holdoff time over, scheduling restart.
- 22 Apr 23 16:05:24 localhost systemd: Stopping OpenStack Nova Compute Server...
解决方法:安装oslo.log,下载oslo.log-1.1.0.tar.gz,解压缩,python setup.py install
问题2:计算节点Nova-compute启动报错
- 1 Apr 23 16:40:11 localhost systemd: Starting OpenStack Nova Compute Server...
- 2 Apr 23 16:40:12 localhost nova-compute: 2015-04-23 16:40:12.216 8158 DEBUG nova.servicegroup.api [-] ServiceGroup driver defined as an instance of db __new__ /usr/lib/python2.7/site-packages/nova/servicegroup/api.py:65
- 3 Apr 23 16:40:12 localhost nova-compute: 2015-04-23 16:40:12.435 8158 INFO nova.virt.driver [-] Loading compute driver 'novadocker.virt.docker.DockerDriver'
- 4 Apr 23 16:40:12 localhost nova-compute: 2015-04-23 16:40:12.497 8158 INFO nova.openstack.common.periodic_task [-] Skipping periodic task _periodic_update_dns because its interval is negative
- 5 Apr 23 16:40:12 localhost nova-compute: 2015-04-23 16:40:12.545 8158 CRITICAL nova [-] TypeError: __init__() takes at least 2 arguments (1 given)
- 6 Apr 23 16:40:12 localhost nova-compute: 2015-04-23 16:40:12.545 8158 TRACE nova Traceback (most recent call last):
- 7 Apr 23 16:40:12 localhost nova-compute: 2015-04-23 16:40:12.545 8158 TRACE nova File "/usr/bin/nova-compute", line 10, in <module>
- 8 Apr 23 16:40:12 localhost nova-compute: 2015-04-23 16:40:12.545 8158 TRACE nova sys.exit(main())
- 9 Apr 23 16:40:12 localhost nova-compute: 2015-04-23 16:40:12.545 8158 TRACE nova File "/usr/lib/python2.7/site-packages/nova/cmd/compute.py", line 72, in main
- 10 Apr 23 16:40:12 localhost nova-compute: 2015-04-23 16:40:12.545 8158 TRACE nova db_allowed=CONF.conductor.use_local)
- 11 Apr 23 16:40:12 localhost nova-compute: 2015-04-23 16:40:12.545 8158 TRACE nova File "/usr/lib/python2.7/site-packages/nova/service.py", line 275, in create
- 12 Apr 23 16:40:12 localhost nova-compute: 2015-04-23 16:40:12.545 8158 TRACE nova db_allowed=db_allowed)
- 13 Apr 23 16:40:12 localhost nova-compute: 2015-04-23 16:40:12.545 8158 TRACE nova File "/usr/lib/python2.7/site-packages/nova/service.py", line 148, in __init__
- 14 Apr 23 16:40:12 localhost nova-compute: 2015-04-23 16:40:12.545 8158 TRACE nova self.manager = manager_class(host=self.host, *args, **kwargs)
- 15 Apr 23 16:40:12 localhost nova-compute: 2015-04-23 16:40:12.545 8158 TRACE nova File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 631, in __init__
- 16 Apr 23 16:40:12 localhost nova-compute: 2015-04-23 16:40:12.545 8158 TRACE nova self.driver = driver.load_compute_driver(self.virtapi, compute_driver)
- 17 Apr 23 16:40:12 localhost nova-compute: 2015-04-23 16:40:12.545 8158 TRACE nova File "/usr/lib/python2.7/site-packages/nova/virt/driver.py", line 1402, in load_compute_driver
- 18 Apr 23 16:40:12 localhost nova-compute: 2015-04-23 16:40:12.545 8158 TRACE nova virtapi)
- 19 Apr 23 16:40:12 localhost nova-compute: 2015-04-23 16:40:12.545 8158 TRACE nova File "/usr/lib/python2.7/site-packages/nova/openstack/common/importutils.py", line 52, in import_object_ns
- 20 Apr 23 16:40:12 localhost nova-compute: 2015-04-23 16:40:12.545 8158 TRACE nova return import_class(import_str)(*args, **kwargs)
- 21 Apr 23 16:40:12 localhost nova-compute: 2015-04-23 16:40:12.545 8158 TRACE nova File "/usr/lib/python2.7/site-packages/novadocker/virt/docker/driver.py", line 102, in __init__
- 22 Apr 23 16:40:12 localhost nova-compute: 2015-04-23 16:40:12.545 8158 TRACE nova default='nova.virt.firewall.NoopFirewallDriver')
- 23 Apr 23 16:40:12 localhost nova-compute: 2015-04-23 16:40:12.545 8158 TRACE nova File "/usr/lib/python2.7/site-packages/nova/virt/firewall.py", line 49, in load_driver
- 24 Apr 23 16:40:12 localhost nova-compute: 2015-04-23 16:40:12.545 8158 TRACE nova return fw_class(*args, **kwargs)
- 25 Apr 23 16:40:12 localhost nova-compute: 2015-04-23 16:40:12.545 8158 TRACE nova TypeError: __init__() takes at least 2 arguments (1 given)
- 26 Apr 23 16:40:12 localhost nova-compute: 2015-04-23 16:40:12.545 8158 TRACE nova
- 27 Apr 23 16:40:12 localhost systemd: openstack-nova-compute.service: main process exited, code=exited, status=1/FAILURE
- 28 Apr 23 16:40:12 localhost systemd: Failed to start OpenStack Nova Compute Server.
- 29 Apr 23 16:40:12 localhost systemd: Unit openstack-nova-compute.service entered failed state.
- 30 Apr 23 16:40:12 localhost systemd: openstack-nova-compute.service holdoff time over, scheduling restart.
- 31 Apr 23 16:40:12 localhost systemd: Stopping OpenStack Nova Compute Server...
- 32 Apr 23 16:40:12 localhost systemd: Starting OpenStack Nova Compute Server...
- 33 Apr 23 16:40:12 localhost systemd: openstack-nova-compute.service start request repeated too quickly, refusing to start.
- 34 Apr 23 16:40:12 localhost systemd: Failed to start OpenStack Nova Compute Server.
- 35 Apr 23 16:40:12 localhost systemd: Unit openstack-nova-compute.service entered failed state.
解决方法:关闭nova.conf中如下选项
1 $vim /etc/nova/nova.conf#firewall_driver = nova.virt.libvirt.firewall.IptablesFirewallDriver
问题3:计算节点Nova-compute启动报错
- 1 Apr 23 16:59:41 localhost systemd: Starting OpenStack Nova Compute Server...
- 2 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.245 4381 DEBUG nova.servicegroup.api [-] ServiceGroup driver defined as an instance of db __new__ /usr/lib/python2.7/site-packages/nova/servicegroup/api.py:65
- 3 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.446 4381 INFO nova.virt.driver [-] Loading compute driver 'novadocker.virt.docker.DockerDriver'
- 4 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.501 4381 INFO nova.openstack.common.periodic_task [-] Skipping periodic task _periodic_update_dns because its interval is negative
- 5 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.505 4381 INFO oslo.messaging._drivers.impl_rabbit [req-31fa628a-dbcc-41b2-9622-ecb9b30d3dee ] Connecting to AMQP server on controller:5672
- 6 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.543 4381 INFO oslo.messaging._drivers.impl_rabbit [req-31fa628a-dbcc-41b2-9622-ecb9b30d3dee ] Connected to AMQP server on controller:5672
- 7 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.561 4381 INFO oslo.messaging._drivers.impl_rabbit [req-31fa628a-dbcc-41b2-9622-ecb9b30d3dee ] Connecting to AMQP server on controller:5672
- 8 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.594 4381 INFO oslo.messaging._drivers.impl_rabbit [req-31fa628a-dbcc-41b2-9622-ecb9b30d3dee ] Connected to AMQP server on controller:5672
- 9 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.609 4381 DEBUG nova.openstack.common.service [-] Full set of CONF: _wait_for_exit_or_signal /usr/lib/python2.7/site-packages/nova/openstack/common/service.py:167
- 10 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.610 4381 DEBUG nova.openstack.common.service [-] ******************************************************************************** log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2171
- 11 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.610 4381 DEBUG nova.openstack.common.service [-] Configuration options gathered from: log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2172
- 12 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.610 4381 DEBUG nova.openstack.common.service [-] command line args: [] log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2173
- 13 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.610 4381 DEBUG nova.openstack.common.service [-] config files: ['/etc/nova/nova.conf'] log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2174
- 14 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.610 4381 DEBUG nova.openstack.common.service [-] ================================================================================ log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2175
- 15 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.610 4381 DEBUG nova.openstack.common.service [-] allow_instance_snapshots = True log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2184
- 16 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.611 4381 DEBUG nova.openstack.common.service [-] allow_migrate_to_same_host = False log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2184
- 17 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.611 4381 DEBUG nova.openstack.common.service [-] allow_resize_to_same_host = False log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2184
- 18 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.611 4381 DEBUG nova.openstack.common.service [-] allow_same_net_traffic = False log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2184
- 19 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.611 4381 DEBUG nova.openstack.common.service [-] amqp_auto_delete = False log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2184
- 20 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.611 4381 DEBUG nova.openstack.common.service [-] amqp_durable_queues = False log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2184
- 21 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.611 4381 DEBUG nova.openstack.common.service [-] api_paste_config = api-paste.ini log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2184
- 22 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.612 4381 DEBUG nova.openstack.common.service [-] api_rate_limit = False log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2184
- 23 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.612 4381 DEBUG nova.openstack.common.service [-] auth_strategy = keystone log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2184
- 24 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.612 4381 DEBUG nova.openstack.common.service [-] auto_assign_floating_ip = False log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2184
- 25 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.612 4381 DEBUG nova.openstack.common.service [-] backdoor_port = None log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2184
- 26 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.613 4381 DEBUG nova.openstack.common.service [-] bandwidth_poll_interval = 600 log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2184
- 27 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.613 4381 DEBUG nova.openstack.common.service [-] bindir = /usr/local/bin log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2184
- 28 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.613 4381 DEBUG nova.openstack.common.service [-] block_device_allocate_retries = 60 log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2184
- 29 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.614 4381 DEBUG nova.openstack.common.service [-] block_device_allocate_retries_interval = 3 log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2184
- 30 Apr 23 16:59:42 localhost systemd: Started OpenStack Nova Compute Server.
- 31 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.614 4381 DEBUG nova.openstack.common.service [-] boot_script_template = /usr/lib/python2.7/site-packages/nova/cloudpipe/bootscript.template log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2184
- 32 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.614 4381 DEBUG nova.openstack.common.service [-] ca_file = cacert.pem log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2184
- 33 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.615 4381 DEBUG nova.openstack.common.service [-] ca_path = /usr/lib/python2.7/site-packages/CA log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2184
- 34 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.615 4381 DEBUG nova.openstack.common.service [-] cert_manager = nova.cert.manager.CertManager log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2184
- 35 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.615 4381 DEBUG nova.openstack.common.service [-] client_socket_timeout = 0 log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2184
- 36 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.615 4381 DEBUG nova.openstack.common.service [-] cnt_vpn_clients = 0 log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2184
- 37 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.615 4381 DEBUG nova.openstack.common.service [-] compute_available_monitors = ['nova.compute.monitors.all_monitors'] log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2184
- 38 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.616 4381 DEBUG nova.openstack.common.service [-] compute_driver = novadocker.virt.docker.DockerDriver log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2184
- 39 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.616 4381 DEBUG nova.openstack.common.service [-] compute_manager = nova.compute.manager.ComputeManager log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2184
- 40 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.616 4381 DEBUG nova.openstack.common.service [-] compute_monitors = [] log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2184
- 41 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.616 4381 DEBUG nova.openstack.common.service [-] compute_resources = ['vcpu'] log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2184
- 42 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.617 4381 DEBUG nova.openstack.common.service [-] compute_stats_class = nova.compute.stats.Stats log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2184
- 43 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.617 4381 DEBUG nova.openstack.common.service [-] compute_topic = compute log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2184
- 44 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.619 4381 DEBUG nova.openstack.common.service [-] config_dir = None log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2184
- 45 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.619 4381 DEBUG nova.openstack.common.service [-] config_file = ['/etc/nova/nova.conf'] log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2184
- 46 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.619 4381 DEBUG nova.openstack.common.service [-] console_host = compute1 log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2184
- 47 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.619 4381 DEBUG nova.openstack.common.service [-] console_manager = nova.console.manager.ConsoleProxyManager log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2184
- 48 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.620 4381 DEBUG nova.openstack.common.service [-] console_topic = console log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2184
- 49 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.620 4381 DEBUG nova.openstack.common.service [-] consoleauth_manager = nova.consoleauth.manager.ConsoleAuthManager log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2184
- 50 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.620 4381 DEBUG nova.openstack.common.service [-] consoleauth_topic = consoleauth log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2184
- 51 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.621 4381 DEBUG nova.openstack.common.service [-] control_exchange = nova log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2184
- 52 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.621 4381 DEBUG nova.openstack.common.service [-] create_unique_mac_address_attempts = 5 log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2184
- 53 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.621 4381 DEBUG nova.openstack.common.service [-] crl_file = crl.pem log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2184
- 54 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.622 4381 DEBUG nova.openstack.common.service [-] db_driver = nova.db log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2184
- 55 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.622 4381 DEBUG nova.openstack.common.service [-] debug = True log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2184
- 56 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.622 4381 DEBUG nova.openstack.common.service [-] default_access_ip_network_name = None log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2184
- 57 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.622 4381 DEBUG nova.openstack.common.service [-] default_availability_zone = nova log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2184
- 58 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.623 4381 DEBUG nova.openstack.common.service [-] default_ephemeral_format = None log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2184
- 59 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.623 4381 DEBUG nova.openstack.common.service [-] default_flavor = m1.small log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2184
- 60 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.623 4381 DEBUG nova.openstack.common.service [-] default_floating_pool = nova log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2184
- 61 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.623 4381 DEBUG nova.openstack.common.service [-] default_log_levels = ['amqp=WARN', 'amqplib=WARN', 'boto=WARN', 'qpid=WARN', 'sqlalchemy=WARN', 'suds=INFO', 'oslo.messaging=INFO', 'iso8601=WARN', 'requests.packages.urllib3.connectionpool=WARN', 'urllib3.connectionpool=WARN', 'websocket=WARN', 'keystonemiddleware=WARN', 'routes.middleware=WARN', 'stevedore=WARN'] log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2184
- 62 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.624 4381 DEBUG nova.openstack.common.service [-] default_notification_level = INFO log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2184
- 63 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.624 4381 DEBUG nova.openstack.common.service [-] default_publisher_id = None log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2184
- 64 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.624 4381 DEBUG nova.openstack.common.service [-] default_schedule_zone = None log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2184
- 65 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.624 4381 DEBUG nova.openstack.common.service [-] defer_iptables_apply = False log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2184
- 66 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.625 4381 DEBUG nova.openstack.common.service [-] dhcp_domain = novalocal log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2184
- 67 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.625 4381 DEBUG nova.openstack.common.service [-] dhcp_lease_time = 86400 log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2184
- 68 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.625 4381 DEBUG nova.openstack.common.service [-] dhcpbridge = /usr/local/bin/nova-dhcpbridge log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2184
- 69 Apr 23 16:59:42 localhost nova-compute: 2015-04-23 16:59:42.626 4381 DEBUG nova.openstack.common.service [-] dhcpbridge_flagfile = ['/etc/nova/nova-dhcpbridge.conf'] log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2184
- 70 Apr 23 16:59:42 localhost systemd: openstack-nova-compute.service holdoff time over, scheduling restart.
- 71 Apr 23 16:59:42 localhost systemd: Stopping OpenStack Nova Compute Server...
- 72 Apr 23 16:59:42 localhost systemd: Starting OpenStack Nova Compute Server...
- 73 Apr 23 16:59:43 localhost systemd: Started OpenStack Nova Compute Server.
- 74 Apr 23 16:59:44 localhost systemd: openstack-nova-compute.service holdoff time over, scheduling restart.
- 75 Apr 23 16:59:44 localhost systemd: Stopping OpenStack Nova Compute Server...
- 76 Apr 23 16:59:44 localhost systemd: Starting OpenStack Nova Compute Server...
- 77 Apr 23 16:59:44 localhost systemd: openstack-nova-compute.service start request repeated too quickly, refusing to start.
- 78 Apr 23 16:59:44 localhost systemd: Failed to start OpenStack Nova Compute Server.
- 79 Apr 23 16:59:44 localhost systemd: Unit openstack-nova-compute.service entered failed state.
This looks like that the owner of the nova-compute process does not have write permission to the docker socket:
解决方法:
1 $usermod -G root nova
问题4:计算节点Nova-compute启动报错
- 1 Apr 23 18:21:20 localhost dbus-daemon: 'list' object has no attribute 'split'
- 2 Apr 23 18:21:21 localhost systemd: Starting OpenStack Nova Network Server...
- 3 Apr 23 18:21:22 localhost systemd: Started OpenStack Nova Network Server.
- 4 Apr 23 18:21:22 localhost dbus-daemon: dbus[794]: [system] Activating service name='org.fedoraproject.Setroubleshootd' (using servicehelper)
- 5 Apr 23 18:21:22 localhost dbus[794]: [system] Activating service name='org.fedoraproject.Setroubleshootd' (using servicehelper)
- 6 Apr 23 18:21:22 localhost systemd: openstack-nova-network.service holdoff time over, scheduling restart.
- 7 Apr 23 18:21:22 localhost systemd: Stopping OpenStack Nova Network Server...
- 8 Apr 23 18:21:23 localhost systemd: Starting OpenStack Nova Network Server...
- 9 Apr 23 18:21:23 localhost dbus-daemon: dbus[794]: [system] Successfully activated service 'org.fedoraproject.Setroubleshootd'
- 10 Apr 23 18:21:23 localhost dbus[794]: [system] Successfully activated service 'org.fedoraproject.Setroubleshootd'
- 11 Apr 23 18:21:23 localhost systemd: Started OpenStack Nova Network Server.
- 12 Apr 23 18:21:24 localhost setroubleshoot: Plugin Exception restorecon_source
- 13 Apr 23 18:21:24 localhost setroubleshoot: SELinux is preventing /usr/bin/sudo from search access on the directory /var/lib/sss. For complete SELinux messages. run sealert -l d5691bba-2631-47e7-85d6-f1c6de6fca13
- 14 Apr 23 18:21:24 localhost python: SELinux is preventing /usr/bin/sudo from search access on the directory /var/lib/sss.
解决方法:关闭selinux
1、临时关闭(不用重启机器):
1 $setenforce 0
2、修改配置文件需要重启机器:
1 $vim /etc/selinux/config2 SELINUX=disabled
重启机器即可
问题5:计算节点Nova-network启动报错
- 1 Apr 24 11:41:53 localhost systemd: openstack-nova-network.service holdoff time over, scheduling restart.
- 2 Apr 24 11:41:53 localhost systemd: Stopping OpenStack Nova Network Server...
- 3 Apr 24 11:41:53 localhost systemd: Starting OpenStack Nova Network Server...
- 4 Apr 24 11:41:54 localhost nova-network: 2015-04-24 11:41:54.297 5473 INFO nova.openstack.common.periodic_task [-] Skipping periodic task _periodic_update_dns because its interval is negative
- 5 Apr 24 11:41:54 localhost nova-network: 2015-04-24 11:41:54.299 5473 INFO nova.network.driver [-] Loading network driver 'nova.network.linux_net'
- 6 Apr 24 11:41:54 localhost nova-network: 2015-04-24 11:41:54.302 5473 INFO oslo.messaging._drivers.impl_rabbit [req-a893822c-a843-43cf-9be6-357f35810c05 ] Connecting to AMQP server on controller:5672
- 7 Apr 24 11:41:54 localhost nova-network: 2015-04-24 11:41:54.338 5473 INFO oslo.messaging._drivers.impl_rabbit [req-a893822c-a843-43cf-9be6-357f35810c05 ] Connected to AMQP server on controller:5672
- 8 Apr 24 11:41:54 localhost nova-network: 2015-04-24 11:41:54.362 5473 INFO oslo.messaging._drivers.impl_rabbit [req-a893822c-a843-43cf-9be6-357f35810c05 ] Connecting to AMQP server on controller:5672
- 9 Apr 24 11:41:54 localhost nova-network: 2015-04-24 11:41:54.383 5473 INFO oslo.messaging._drivers.impl_rabbit [req-a893822c-a843-43cf-9be6-357f35810c05 ] Connected to AMQP server on controller:5672
- 10 Apr 24 11:41:54 localhost systemd: Started OpenStack Nova Network Server.
- 11 Apr 24 11:41:54 localhost nova-network: 2015-04-24 11:41:54.429 5473 AUDIT nova.service [-] Starting network node (version 2014.2.2-1.el7)
- 12 Apr 24 11:41:54 localhost nova-network: Traceback (most recent call last):
- 13 Apr 24 11:41:54 localhost nova-network: File "/usr/lib/python2.7/site-packages/eventlet/hubs/poll.py", line 115, in wait
- 14 Apr 24 11:41:54 localhost nova-network: listener.cb(fileno)
- 15 Apr 24 11:41:54 localhost nova-network: File "/usr/lib/python2.7/site-packages/eventlet/greenthread.py", line 212, in main
- 16 Apr 24 11:41:54 localhost nova-network: result = function(*args, **kwargs)
- 17 Apr 24 11:41:54 localhost nova-network: File "/usr/lib/python2.7/site-packages/nova/openstack/common/service.py", line 492, in run_service
- 18 Apr 24 11:41:54 localhost nova-network: service.start()
- 19 Apr 24 11:41:54 localhost nova-network: File "/usr/lib/python2.7/site-packages/nova/service.py", line 164, in start
- 20 Apr 24 11:41:54 localhost nova-network: self.manager.init_host()
- 21 Apr 24 11:41:54 localhost nova-network: File "/usr/lib/python2.7/site-packages/nova/network/manager.py", line 1810, in init_host
- 22 Apr 24 11:41:54 localhost nova-network: self.driver.iptables_manager.defer_apply_off()
- 23 Apr 24 11:41:54 localhost nova-network: File "/usr/lib/python2.7/site-packages/nova/network/linux_net.py", line 418, in defer_apply_off
- 24 Apr 24 11:41:54 localhost nova-network: self.apply()
- 25 Apr 24 11:41:54 localhost nova-network: File "/usr/lib/python2.7/site-packages/nova/network/linux_net.py", line 434, in apply
- 26 Apr 24 11:41:54 localhost nova-network: self._apply()
- 27 Apr 24 11:41:54 localhost nova-network: File "/usr/lib/python2.7/site-packages/nova/openstack/common/lockutils.py", line 269, in inner
- 28 Apr 24 11:41:54 localhost nova-network: with lock(name, lock_file_prefix, external, lock_path):
- 29 Apr 24 11:41:54 localhost nova-network: File "/usr/lib64/python2.7/contextlib.py", line 17, in __enter__
- 30 Apr 24 11:41:54 localhost nova-network: return self.gen.next()
- 31 Apr 24 11:41:54 localhost nova-network: File "/usr/lib/python2.7/site-packages/nova/openstack/common/lockutils.py", line 232, in lock
- 32 Apr 24 11:41:54 localhost nova-network: ext_lock = external_lock(name, lock_file_prefix, lock_path)
- 33 Apr 24 11:41:54 localhost nova-network: File "/usr/lib/python2.7/site-packages/nova/openstack/common/lockutils.py", line 180, in external_lock
- 34 Apr 24 11:41:54 localhost nova-network: lock_file_path = _get_lock_path(name, lock_file_prefix, lock_path)
- 35 Apr 24 11:41:54 localhost nova-network: File "/usr/lib/python2.7/site-packages/nova/openstack/common/lockutils.py", line 171, in _get_lock_path
- 36 Apr 24 11:41:54 localhost nova-network: raise cfg.RequiredOptError('lock_path')
- 37 Apr 24 11:41:54 localhost nova-network: RequiredOptError: value required for option: lock_path
- 38 Apr 24 11:41:54 localhost nova-network: Removing descriptor: 3
- 39 Apr 24 11:41:54 localhost nova-network: 2015-04-24 11:41:54.607 5473 ERROR nova.openstack.common.threadgroup [-] value required for option: lock_path
- 40 Apr 24 11:41:54 localhost nova-network: 2015-04-24 11:41:54.607 5473 TRACE nova.openstack.common.threadgroup Traceback (most recent call last):
- 41 Apr 24 11:41:54 localhost nova-network: 2015-04-24 11:41:54.607 5473 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.7/site-packages/nova/openstack/common/threadgroup.py", line 125, in wait
- 42 Apr 24 11:41:54 localhost nova-network: 2015-04-24 11:41:54.607 5473 TRACE nova.openstack.common.threadgroup x.wait()
- 43 Apr 24 11:41:54 localhost nova-network: 2015-04-24 11:41:54.607 5473 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.7/site-packages/nova/openstack/common/threadgroup.py", line 47, in wait
- 44 Apr 24 11:41:54 localhost nova-network: 2015-04-24 11:41:54.607 5473 TRACE nova.openstack.common.threadgroup return self.thread.wait()
- 45 Apr 24 11:41:54 localhost nova-network: 2015-04-24 11:41:54.607 5473 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.7/site-packages/eventlet/greenthread.py", line 173, in wait
- 46 Apr 24 11:41:54 localhost nova-network: 2015-04-24 11:41:54.607 5473 TRACE nova.openstack.common.threadgroup return self._exit_event.wait()
- 47 Apr 24 11:41:54 localhost nova-network: 2015-04-24 11:41:54.607 5473 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.7/site-packages/eventlet/event.py", line 121, in wait
- 48 Apr 24 11:41:54 localhost nova-network: 2015-04-24 11:41:54.607 5473 TRACE nova.openstack.common.threadgroup return hubs.get_hub().switch()
- 49 Apr 24 11:41:54 localhost nova-network: 2015-04-24 11:41:54.607 5473 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.7/site-packages/eventlet/hubs/hub.py", line 293, in switch
- 50 Apr 24 11:41:54 localhost nova-network: 2015-04-24 11:41:54.607 5473 TRACE nova.openstack.common.threadgroup return self.greenlet.switch()
- 51 Apr 24 11:41:54 localhost nova-network: 2015-04-24 11:41:54.607 5473 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.7/site-packages/eventlet/greenthread.py", line 212, in main
- 52 Apr 24 11:41:54 localhost nova-network: 2015-04-24 11:41:54.607 5473 TRACE nova.openstack.common.threadgroup result = function(*args, **kwargs)
- 53 Apr 24 11:41:54 localhost nova-network: 2015-04-24 11:41:54.607 5473 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.7/site-packages/nova/openstack/common/service.py", line 492, in run_service
- 54 Apr 24 11:41:54 localhost nova-network: 2015-04-24 11:41:54.607 5473 TRACE nova.openstack.common.threadgroup service.start()
- 55 Apr 24 11:41:54 localhost nova-network: 2015-04-24 11:41:54.607 5473 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.7/site-packages/nova/service.py", line 164, in start
- 56 Apr 24 11:41:54 localhost nova-network: 2015-04-24 11:41:54.607 5473 TRACE nova.openstack.common.threadgroup self.manager.init_host()
- 57 Apr 24 11:41:54 localhost nova-network: 2015-04-24 11:41:54.607 5473 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.7/site-packages/nova/network/manager.py", line 1810, in init_host
- 58 Apr 24 11:41:54 localhost nova-network: 2015-04-24 11:41:54.607 5473 TRACE nova.openstack.common.threadgroup self.driver.iptables_manager.defer_apply_off()
- 59 Apr 24 11:41:54 localhost nova-network: 2015-04-24 11:41:54.607 5473 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.7/site-packages/nova/network/linux_net.py", line 418, in defer_apply_off
- 60 Apr 24 11:41:54 localhost nova-network: 2015-04-24 11:41:54.607 5473 TRACE nova.openstack.common.threadgroup self.apply()
- 61 Apr 24 11:41:54 localhost nova-network: 2015-04-24 11:41:54.607 5473 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.7/site-packages/nova/network/linux_net.py", line 434, in apply
- 62 Apr 24 11:41:54 localhost nova-network: 2015-04-24 11:41:54.607 5473 TRACE nova.openstack.common.threadgroup self._apply()
- 63 Apr 24 11:41:54 localhost nova-network: 2015-04-24 11:41:54.607 5473 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.7/site-packages/nova/openstack/common/lockutils.py", line 269, in inner
- 64 Apr 24 11:41:54 localhost nova-network: 2015-04-24 11:41:54.607 5473 TRACE nova.openstack.common.threadgroup with lock(name, lock_file_prefix, external, lock_path):
- 65 Apr 24 11:41:54 localhost nova-network: 2015-04-24 11:41:54.607 5473 TRACE nova.openstack.common.threadgroup File "/usr/lib64/python2.7/contextlib.py", line 17, in __enter__
- 66 Apr 24 11:41:54 localhost nova-network: 2015-04-24 11:41:54.607 5473 TRACE nova.openstack.common.threadgroup return self.gen.next()
- 67 Apr 24 11:41:54 localhost nova-network: 2015-04-24 11:41:54.607 5473 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.7/site-packages/nova/openstack/common/lockutils.py", line 232, in lock
- 68 Apr 24 11:41:54 localhost nova-network: 2015-04-24 11:41:54.607 5473 TRACE nova.openstack.common.threadgroup ext_lock = external_lock(name, lock_file_prefix, lock_path)
- 69 Apr 24 11:41:54 localhost nova-network: 2015-04-24 11:41:54.607 5473 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.7/site-packages/nova/openstack/common/lockutils.py", line 180, in external_lock
- 70 Apr 24 11:41:54 localhost nova-network: 2015-04-24 11:41:54.607 5473 TRACE nova.openstack.common.threadgroup lock_file_path = _get_lock_path(name, lock_file_prefix, lock_path)
- 71 Apr 24 11:41:54 localhost nova-network: 2015-04-24 11:41:54.607 5473 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.7/site-packages/nova/openstack/common/lockutils.py", line 171, in _get_lock_path
- 72 Apr 24 11:41:54 localhost nova-network: 2015-04-24 11:41:54.607 5473 TRACE nova.openstack.common.threadgroup raise cfg.RequiredOptError('lock_path')
- 73 Apr 24 11:41:54 localhost nova-network: 2015-04-24 11:41:54.607 5473 TRACE nova.openstack.common.threadgroup RequiredOptError: value required for option: lock_path
- 74 Apr 24 11:41:54 localhost nova-network: 2015-04-24 11:41:54.607 5473 TRACE nova.openstack.common.threadgroup
- 75 Apr 24 11:41:54 localhost systemd: openstack-nova-network.service holdoff time over, scheduling restart.
- 76 Apr 24 11:41:54 localhost systemd: Stopping OpenStack Nova Network Server...
- 77 Apr 24 11:41:54 localhost systemd: Starting OpenStack Nova Network Server...
- 78 Apr 24 11:41:54 localhost systemd: openstack-nova-network.service start request repeated too quickly, refusing to start.
- 79 Apr 24 11:41:54 localhost systemd: Failed to start OpenStack Nova Network Server.
- 80 Apr 24 11:41:54 localhost systemd: Unit openstack-nova-network.service entered failed state.
- 81 Apr 24 11:42:46 localhost nova-compute: 2015-04-24 11:42:46.123 5299 AUDIT nova.compute.resource_tracker [-] Auditing locally available compute resources
- 82 Apr 24 11:42:46 localhost docker: time="2015-04-24T11:42:46+08:00" level="info" msg="GET /v1.13/containers/json?all=1&limit=-1&trunc_cmd=1&size=0"
- 83 Apr 24 11:42:46 localhost docker: time="2015-04-24T11:42:46+08:00" level="info" msg="+job containers()"
- 84 Apr 24 11:42:46 localhost docker: time="2015-04-24T11:42:46+08:00" level="info" msg="-job containers() = OK (0)"
- 85 Apr 24 11:42:46 localhost docker: time="2015-04-24T11:42:46+08:00" level="info" msg="GET /v1.13/containers/c0dc9faa6e04a64a3a4e6ac3a93adcd5cb478d972ac5afd07967b74609be975c/json"
- 86 Apr 24 11:42:46 localhost docker: time="2015-04-24T11:42:46+08:00" level="info" msg="+job container_inspect(c0dc9faa6e04a64a3a4e6ac3a93adcd5cb478d972ac5afd07967b74609be975c)"
- 87 Apr 24 11:42:46 localhost docker: time="2015-04-24T11:42:46+08:00" level="info" msg="-job container_inspect(c0dc9faa6e04a64a3a4e6ac3a93adcd5cb478d972ac5afd07967b74609be975c) = OK (0)"
- 88 Apr 24 11:42:46 localhost nova-compute: 2015-04-24 11:42:46.223 5299 AUDIT nova.compute.resource_tracker [-] Total physical ram (MB): 2807, total allocated virtual ram (MB): 512
- 89 Apr 24 11:42:46 localhost nova-compute: 2015-04-24 11:42:46.223 5299 AUDIT nova.compute.resource_tracker [-] Free disk (GB): 26
- 90 Apr 24 11:42:46 localhost nova-compute: 2015-04-24 11:42:46.223 5299 AUDIT nova.compute.resource_tracker [-] Total usable vcpus: 2, total allocated vcpus: 0
- 91 Apr 24 11:42:46 localhost nova-compute: 2015-04-24 11:42:46.223 5299 AUDIT nova.compute.resource_tracker [-] PCI stats: []
- 92 Apr 24 11:42:46 localhost nova-compute: 2015-04-24 11:42:46.224 5299 INFO nova.compute.resource_tracker [-] Compute_service record updated for compute1:compute1
解决方法:
- 1 $mkdir -p /var/lib/nova/tmp
- 2 $chmod -R 777 /var/lib/nova/tmp
- 3 $vim /etc/nova/nova.conf
- 4 lock_path=/var/lib/nova/tmp
问题6:计算节点Nova-network启动报错
- 1 [root@compute1 Desktop]# systemctl status libvirtd.service
- 2 libvirtd.service - Virtualization daemon
- 3 Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled)
- 4 Active: active (running) since Tue 2015-04-28 14:13:48 CST; 21min ago
- 5 Docs: man:libvirtd(8)
- 6 http://libvirt.org
- 7 Main PID: 1447 (libvirtd)
- 8 CGroup: /system.slice/libvirtd.service
- 9 └─1447 /usr/sbin/libvirtd
- 10
- 11 Apr 28 14:13:47 compute1 libvirtd[1447]: libvirt version: 1.2.8, package: 16.el7_1.2 (CentOS BuildSystem <http://bugs.centos.org>, 2015-03-...tos.org)
- 12 Apr 28 14:13:47 compute1 libvirtd[1447]: Module /usr/lib64/libvirt/connection-driver/libvirt_driver_lxc.so not accessible
- 13 Apr 28 14:13:48 compute1 systemd[1]: Started Virtualization daemon.
- 14 Apr 28 14:19:51 compute1 libvirtd[1447]: internal error: referenced filter 'no-mac-spoofing' is missing
- 15 Hint: Some lines were ellipsized, use -l to show in full.
解决方法:需下载libvirtd的针对juno的补丁
1 yum install libvirt-daemon-config-nwfilter
问题7:计算节点Nova-network启动报错
- 1 2015-04-28 17:22:04.373 3302 ERROR nova.scheduler.utils [req-188f10fe-7773-4637-baeb-3704a9aabeee None] [instance: 3a26ef5b-aead-4dad-8519-9f42a6cd3840] Error from last host: compute1 (node compute1): [u'Traceback (most recent call last):\n', u' File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 2033, in _do_build_and_run_instance\n filter_properties)\n', u' File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 2164, in _build_and_run_instance\n instance_uuid=instance.uuid, reason=six.text_type(e))\n', u'RescheduledException: Build of instance 3a26ef5b-aead-4dad-8519-9f42a6cd3840 was re-scheduled: [Errno 13] Permission denied\n']
- 2
- 3 Build of instance[Errno 13] Permission denied
- 4 Build of instance was re-scheduled: [Errno 13] Permission denied
- 5
- 6
- 7 Apr 28 17:36:00 compute1 nova-network[1088]: 2015-04-28 17:36:00.820 1088 TRACE oslo.messaging.rpc.dispatcher fileutils.ensure_tree(CON...ks_path)
- 8 Apr 28 17:36:00 compute1 nova-network[1088]: 2015-04-28 17:36:00.820 1088 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/si...ure_tree
- 9 Apr 28 17:36:00 compute1 nova-network[1088]: 2015-04-28 17:36:00.820 1088 TRACE oslo.messaging.rpc.dispatcher os.makedirs(path)
- 10 Apr 28 17:36:00 compute1 nova-network[1088]: 2015-04-28 17:36:00.820 1088 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib64/python2.7/...makedirs
- 11 Apr 28 17:36:00 compute1 nova-network[1088]: 2015-04-28 17:36:00.820 1088 TRACE oslo.messaging.rpc.dispatcher mkdir(name, mode)
- 12 Apr 28 17:36:00 compute1 nova-network[1088]: 2015-04-28 17:36:00.820 1088 TRACE oslo.messaging.rpc.dispatcher OSError: [Errno 13] Permissio...etworks'
- 13 Apr 28 17:36:00 compute1 nova-network[1088]: 2015-04-28 17:36:00.820 1088 TRACE oslo.messaging.rpc.dispatcher
- 14 Apr 28 17:36:00 compute1 nova-network[1088]: 2015-04-28 17:36:00.822 1088 ERROR oslo.messaging._drivers.common [req-d01b04d0-c9fa-45a1-a173...o caller
- 15 Apr 28 17:36:00 compute1 nova-network[1088]: 2015-04-28 17:36:00.823 1088 ERROR oslo.messaging._drivers.common [req-d01b04d0-c9fa-45a1-a173...n', ' F
- 16 Apr 28 17:36:00 compute1 nova-network[1088]: e "/usr/lib64/python2.7/os.py", line 157, in makedirs\n mkdir(name, mode)\n', "OSError: [Er...rks'\n"]
- 17 Hint: Some lines were ellipsized, use -l to show in full.
解决方法:
1 $chmod -R 777 /usr/lib/python2.7/site-packages
问题8:openstack启动docker容器失败——找不到flavor名字
1 docker Instance object has no attribute flavor
解决方法:该问题为驱动bug,昨天早晨六点解决的
- 1 https://review.openstack.org/#/c/165196/
- 2 git fetch https://review.openstack.org/stackforge/nova-docker refs/changes/96/165196/2 && git checkout FETCH_HEAD
- 3
- 4 python setup.py install
问题9:openstack启动docker容器失败
- 1 ERROR oslo.messaging._drivers.common [req-f35e6205-cece-4025-a394-00588cbada4f ] Returning exception Unexpected error while running command.
- 2 Apr 29 09:06:08 compute1 nova-network[23089]: Command: sudo nova-rootwrap /etc/nova/rootwrap.conf env CONFIG_FILE=["/etc/nova/nova-dhcpbridge.conf"] NETWORK_ID=2 dnsmasq --strict-order --bind-interfaces --conf-file= --pid-file=/usr/lib/python2.7/site-packages/networks/nova-br100.pid --dhcp-optsfile=/usr/lib/python2.7/site-packages/networks/nova-br100.opts --listen-address=203.0.113.25 --except-interface=lo --dhcp-range=set:demo-net,203.0.113.26,static,255.255.255.248,86400s --dhcp-lease-max=8 --dhcp-hostsfile=/usr/lib/python2.7/site-packages/networks/nova-br100.conf --dhcp-script=/usr/local/bin/nova-dhcpbridge --no-hosts --leasefile-ro --domain=novalocal --addn-hosts=/usr/lib/python2.7/site-packages/networks/nova-br100.hosts
- 3 Apr 29 09:06:08 compute1 nova-network[23089]: Exit code: 3
- 4 Apr 29 09:06:08 compute1 nova-network[23089]: Stdout: u''
- 5 Apr 29 09:06:08 compute1 nova-network[23089]: Stderr: u'sh: /usr/local/bin/nova-dhcpbridge: No such file or directory\n\ndnsmasq: cannot run lease-init script /usr/local/bin/nova-dhcpbridge: No such file or directory\n' to caller
- 6 Apr 29 09:06:08 compute1 nova-network[23089]: 2015-04-29 09:06:08.149 23089 ERROR oslo.messaging._drivers.common [req-f35e6205-cece-4025-a394-00588cbada4f ] ['Traceback (most recent call last):\n', ' File "/usr/lib/python2.7/site-packages/oslo/messaging/rpc/dispatcher.py", line 134, in _dispatch_and_reply\n incoming.message))\n', ' File "/usr/lib/python2.7/site-packages/oslo/messaging/rpc/dispatcher.py", line 177, in _dispatch\n return self._do_dispatch(endpoint, method, ctxt, args)\n', ' File "/usr/lib/python2.7/site-packages/oslo/messaging/rpc/dispatcher.py", line 123, in _do_dispatch\n result = getattr(endpoint, method)(ctxt, **new_args)\n', ' File "/usr/lib/python2.7/site-packages/nova/network/floating_ips.py", line 114, in allocate_for_instance\n **kwargs)\n', ' File "/usr/lib/python2.7/site-packages/nova/network/manager.py", line 511, in allocate_for_instance\n requested_networks=requested_networks)\n', ' File "/usr/lib/python2.7/site-packages/nova/network/manager.py", line 192, in _allocate_fixed_ips\n vpn=vpn, address=address)\n', ' File "/usr/lib/python2.7/site-packages/nova/network/manager.py", line 967, in allocate_fixed_ip\n exc_info=True)\n', ' File "/usr/lib/python2.7/site-packages/nova/openstack/common/excutils.py", line 82, in __exit__\n six.reraise(self.type_, self.value, self.tb)\n', ' File "/usr/lib/python2.7/site-packages/nova/network/manager.py", line 943, in allocate_fixed_ip\n self._setup_network_on_host(context, network)\n', ' File "/usr/lib/python2.7/site-packages/nova/network/manager.py", line 1823, in _setup_network_on_host\n self.driver.update_dhcp(elevated, dev, network)\n', ' File "/usr/lib/python2.7/site-packages/nova/network/linux_net.py", line 1012, in update_dhcp\n restart_dhcp(context, dev, network_ref, fixedips)\n', ' File "/usr/lib/python2.7/site-packages/nova/openstack/common/lockutils.py", line 272, in inner\n return f(*args, **kwargs)\n', ' File "/usr/lib/python2.7/site-packages/nova/network/linux_net.py", line 1127, in restart_dhcp\n _execute(*cmd, run_as_root=True)\
- 7 Apr 29 09:06:08 compute1 nova-network[23089]: n', ' File "/usr/lib/python2.7/site-packages/nova/network/linux_net.py", line 1228, in _execute\n return utils.execute(*cmd, **kwargs)\n', ' File "/usr/lib/python2.7/site-packages/nova/utils.py", line 163, in execute\n return processutils.execute(*cmd, **kwargs)\n', ' File "/usr/lib/python2.7/site-packages/nova/openstack/common/processutils.py", line 203, in execute\n cmd=sanitized_cmd)\n', 'ProcessExecutionError: Unexpected error while running command.\nCommand: sudo nova-rootwrap /etc/nova/rootwrap.conf env CONFIG_FILE=["/etc/nova/nova-dhcpbridge.conf"] NETWORK_ID=2 dnsmasq --strict-order --bind-interfaces --conf-file= --pid-file=/usr/lib/python2.7/site-packages/networks/nova-br100.pid --dhcp-optsfile=/usr/lib/python2.7/site-packages/networks/nova-br100.opts --listen-address=203.0.113.25 --except-interface=lo --dhcp-range=set:demo-net,203.0.113.26,static,255.255.255.248,86400s --dhcp-lease-max=8 --dhcp-hostsfile=/usr/lib/python2.7/site-packages/networks/nova-br100.conf --dhcp-script=/usr/local/bin/nova-dhcpbridge --no-hosts --leasefile-ro --domain=novalocal --addn-hosts=/usr/lib/python2.7/site-packages/networks/nova-br100.hosts\nExit code: 3\nStdout: u\'\'\nStderr: u\'sh: /usr/local/bin/nova-dhcpbridge: No such file or directory\\n\\ndnsmasq: cannot run lease-init script /usr/local/bin/nova-dhcpbridge: No such file or directory\\n\'\n']
解决方法:
- 1 $vim /etc/nova/nova.conf
- 2
- 3 dhcpbridge=/usr/bin/nova-dhcpbridge
问题10:openstack启动docker容器失败
- 1 Apr 29 09:58:20 compute1 nova-network[24902]: 2015-04-29 09:58:20.040 24902 ERROR oslo.messaging._drivers.common
- 2 [req-094f943e-e7c7-4b47-9a4b-0ba1049440dc ] Returning exception Unexpected error while running command.
- 3 Apr 29 09:58:20 compute1 nova-network[24902]: Command: sudo nova-rootwrap /etc/nova/rootwrap.conf env CONFIG_FILE=["/etc/nova/nova-dhcpbridge.conf"]
- 4 NETWORK_ID=2 dnsmasq --strict-order --bind-interfaces --conf-file= --pid-file=/usr/lib/python2.7/site-packages/networks/nova-br100.pid
- 5 --dhcp-optsfile=/usr/lib/python2.7/site-packages/networks/nova-br100.opts --listen-address=203.0.113.25 --except-interface=lo
- 6 --dhcp-range=set:demo-net,203.0.113.26,static,255.255.255.248,86400s --dhcp-lease-max=8 --dhcp-hostsfile=/usr/lib/python2.7/site-packages/networks/nova-br100.conf
- 7 --dhcp-script=/usr/bin/nova-dhcpbridge --no-hosts --leasefile-ro --domain=novalocal --addn-hosts=/usr/lib/python2.7/site-packages/networks/nova-br100.hosts
- 8 Apr 29 09:58:20 compute1 nova-network[24902]: Exit code: 11
- 9 Apr 29 09:58:20 compute1 nova-network[24902]: Stdout: u''
- 10 Apr 29 09:58:20 compute1 nova-network[24902]: Stderr: u'Traceback (most recent call last):\n File "/usr/bin/nova-dhcpbridge", line 10, in <module>\n
- 11 sys.exit(main())\n File "/usr/lib/python2.7/site-packages/nova/cmd/dhcpbridge.py", line 118, in main\n
- 12 default_config_files=jsonutils.loads(os.environ[\'CONFIG_FILE\']))\n File "/usr/lib/python2.7/site-packages/nova/config.py", line 40, in parse_args\n
- 13 default_config_files=default_config_files)\n File "/usr/lib/python2.7/site-packages/oslo_config/cfg.py", line 1853, in __call__\n
- 14 raise ConfigFilesNotFoundError(self._namespace._files_not_found)\noslo_config.cfg.ConfigFilesNotFoundError:
- 15 Failed to find some config files: /etc/nova/nova-dhcpbridge.conf\n\ndnsmasq: lease-init script returned exit code 1\n' to caller
- 16 Apr 29 09:58:20 compute1 nova-network[24902]: 2015-04-29 09:58:20.041 24902 ERROR oslo.messaging._drivers.common [req-094f943e-e7c7-4b47-9a4b-0ba1049440dc ] ['Traceback (most recent call last):\n', ' File "/usr/lib/python2.7/site-packages/oslo/messaging/rpc/dispatcher.py", line 134, in _dispatch_and_reply\n incoming.message))\n', ' File "/usr/lib/python2.7/site-packages/oslo/messaging/rpc/dispatcher.py", line 177, in _dispatch\n return self._do_dispatch(endpoint, method, ctxt, args)\n', ' File "/usr/lib/python2.7/site-packages/oslo/messaging/rpc/dispatcher.py", line 123, in _do_dispatch\n result = getattr(endpoint, method)(ctxt, **new_args)\n', ' File "/usr/lib/python2.7/site-packages/nova/network/floating_ips.py", line 114, in allocate_for_instance\n **kwargs)\n', ' File "/usr/lib/python2.7/site-packages/nova/network/manager.py", line 511, in allocate_for_instance\n requested_networks=requested_networks)\n', ' File "/usr/lib/python2.7/site-packages/nova/network/manager.py", line 192, in _allocate_fixed_ips\n vpn=vpn, address=address)\n', ' File "/usr/lib/python2.7/site-packages/nova/network/manager.py", line 967, in allocate_fixed_ip\n exc_info=True)\n', ' File "/usr/lib/python2.7/site-packages/nova/openstack/common/excutils.py", line 82, in __exit__\n six.reraise(self.type_, self.value, self.tb)\n', ' File "/usr/lib/python2.7/site-packages/nova/network/manager.py", line 943, in allocate_fixed_ip\n self._setup_network_on_host(context, network)\n', ' File "/usr/lib/python2.7/site-packages/nova/network/manager.py", line 1823, in _setup_network_on_host\n self.driver.update_dhcp(elevated, dev, network)\n', ' File "/usr/lib/python2.7/site-packages/nova/network/linux_net.py", line 1012, in update_dhcp\n restart_dhcp(context, dev, network_ref, fixedips)\n', ' File "/usr/lib/python2.7/site-packages/nova/openstack/common/lockutils.py", line 272, in inner\n return f(*args, **kwargs)\n', ' File "/usr/lib/python2.7/site-packages/nova/network/linux_net.py", line 1127, in restart_dhcp\n _execute(*cmd, run_as_root=True)\
- 17 Apr 29 09:58:20 compute1 nova-network[24902]: n', ' File "/usr/lib/python2.7/site-packages/nova/network/linux_net.py", line 1228, in _execute\n return utils.execute(*cmd, **kwargs)\n', ' File "/usr/lib/python2.7/site-packages/nova/utils.py", line 163, in execute\n return processutils.execute(*cmd, **kwargs)\n', ' File "/usr/lib/python2.7/site-packages/nova/openstack/common/processutils.py", line 203, in execute\n cmd=sanitized_cmd)\n', 'ProcessExecutionError: Unexpected error while running command.\nCommand: sudo nova-rootwrap /etc/nova/rootwrap.conf env CONFIG_FILE=["/etc/nova/nova-dhcpbridge.conf"] NETWORK_ID=2 dnsmasq --strict-order --bind-interfaces --conf-file= --pid-file=/usr/lib/python2.7/site-packages/networks/nova-br100.pid --dhcp-optsfile=/usr/lib/python2.7/site-packages/networks/nova-br100.opts --listen-address=203.0.113.25 --except-interface=lo --dhcp-range=set:demo-net,203.0.113.26,static,255.255.255.248,86400s --dhcp-lease-max=8 --dhcp-hostsfile=/usr/lib/python2.7/site-packages/networks/nova-br100.conf --dhcp-script=/usr/bin/nova-dhcpbridge --no-hosts --leasefile-ro --domain=novalocal --addn-hosts=/usr/lib/python2.7/site-packages/networks/nova-br100.hosts\nExit code: 11\nStdout: u\'\'\nStderr: u\'Traceback (most recent call last):\\n File "/usr/bin/nova-dhcpbridge", line 10, in <module>\\n sys.exit(main())\\n File "/usr/lib/python2.7/site-packages/nova/cmd/dhcpbridge.py", line 118, in main\\n default_config_files=jsonutils.loads(os.environ[\\\'CONFIG_FILE\\\']))\\n File "/usr/lib/python2.7/site-packages/nova/config.py", line 40, in parse_args\\n default_config_files=default_config_files)\\n File "/usr/lib/python2.7/site-packages/oslo_config/cfg.py", line 1853, in __call__\\n raise ConfigFilesNotFoundError(self._namespace._files_not_found)\\noslo_config.cfg.ConfigFilesNotFoundError: Failed to find some config files: /etc/nova/nova-dhcpbridge.conf\\n\\ndnsmasq: lease-init script returned exit code 1\\n\'\n']
解决方法:
- 1 $vim /etc/nova/nova.conf
- 2
- 3 dhcpbridge_flagfile=/etc/nova/nova.conf
问题11:openstack启动docker容器失败
- 1 ERROR nova.scheduler.utils [req-1acf2a88-cfd6-4018-80b2-3fcce844a58d None] [instance: 49cbea5c-24fb-44f3-b0fa-99b53f08a505]
- 2 Error from last host: compute1 (node compute1): [u'Traceback (most recent call last):\n', u'
- 3 File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 2033, in _do_build_and_run_instance\n
- 4 filter_properties)\n', u' File "/usr/lib/python2.7/site-packages/nova/compute/manager.py",
- 5 line 2164, in _build_and_run_instance\n instance_uuid=instance.uuid, reason=six.text_type(e))\n',
- 6 u'RescheduledException: Build of instance 49cbea5c-24fb-44f3-b0fa-99b53f08a505 was re-scheduled:
- 7 Cannot setup network: Cannot find any PID under container "4fd5e1ef22a49e4078c484fc7c530847d010d7fd573be008459c91a4509cd7fe"\n']
解决方法:
打这个补丁 https://review.openstack.org/#/c/84830/
问题12:openstack启动docker容器失败
- 1 ERROR nova.scheduler.utils [req-c5282979-da83-4d08-a97d-48a9aa5658bd None] [instance: 5c95ab9d-bc47-4bc6-ae95-d6a6ac19b5f0]
- 2 Error from last host: compute1 (node compute1): [u'Traceback (most recent call last):\n', u'
- 3 File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 2033, in _do_build_and_run_instance\n
- 4 filter_properties)\n', u' File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 2164, in _build_and_run_instance\n
- 5 instance_uuid=instance.uuid, reason=six.text_type(e))\n', u'RescheduledException: Build of instance 5c95ab9d-bc47-4bc6-ae95-d6a6ac19b5f0 was re-scheduled:
- 6 Cannot create container\n']
- 7
- 8 failed to load names nova-br100.hosts: No such file or directory
解决方法:在相应目录下建nova-br100.hosts空文件
问题13:openstack启动docker容器失败(找不到image)
- 1 Apr 29 13:09:29 localhost nova-compute: 2015-04-29 13:09:29.610 1080 AUDIT nova.compute.manager [req-f4550ddc-49a5-4d58-becc-81e811bef89f None] [instance: 3a71e9cd-3fff-47c8-b60c-1faf6da85b9d] Starting instance...
- 2 Apr 29 13:09:29 localhost nova-compute: 2015-04-29 13:09:29.893 1080 AUDIT nova.compute.claims [-] [instance: 3a71e9cd-3fff-47c8-b60c-1faf6da85b9d] Attempting claim: memory 512 MB, disk 1 GB
- 3 Apr 29 13:09:29 localhost nova-compute: 2015-04-29 13:09:29.894 1080 AUDIT nova.compute.claims [-] [instance: 3a71e9cd-3fff-47c8-b60c-1faf6da85b9d] Total memory: 2807 MB, used: 512.00 MB
- 4 Apr 29 13:09:29 localhost nova-compute: 2015-04-29 13:09:29.894 1080 AUDIT nova.compute.claims [-] [instance: 3a71e9cd-3fff-47c8-b60c-1faf6da85b9d] memory limit: 4210.50 MB, free: 3698.50 MB
- 5 Apr 29 13:09:29 localhost nova-compute: 2015-04-29 13:09:29.894 1080 AUDIT nova.compute.claims [-] [instance: 3a71e9cd-3fff-47c8-b60c-1faf6da85b9d] Total disk: 26 GB, used: 0.00 GB
- 6 Apr 29 13:09:29 localhost nova-compute: 2015-04-29 13:09:29.895 1080 AUDIT nova.compute.claims [-] [instance: 3a71e9cd-3fff-47c8-b60c-1faf6da85b9d] disk limit not specified, defaulting to unlimited
- 7 Apr 29 13:09:29 localhost nova-compute: 2015-04-29 13:09:29.942 1080 AUDIT nova.compute.claims [-] [instance: 3a71e9cd-3fff-47c8-b60c-1faf6da85b9d] Claim successful
- 8 Apr 29 13:09:30 localhost nova-compute: 2015-04-29 13:09:30.539 1080 INFO nova.scheduler.client.report [-] Compute_service record updated for ('compute1', 'compute1')
- 9 Apr 29 13:09:30 localhost nova-compute: 2015-04-29 13:09:30.735 1080 INFO nova.scheduler.client.report [-] Compute_service record updated for ('compute1', 'compute1')
- 10 Apr 29 13:09:31 localhost docker: time="2015-04-29T13:09:31+08:00" level="info" msg="GET /v1.7/images/192.168.245.148:5042/centos/json"
- 11 Apr 29 13:09:31 localhost docker: time="2015-04-29T13:09:31+08:00" level="info" msg="+job image_inspect(192.168.245.148:5042/centos)"
- 12 Apr 29 13:09:31 localhost docker: No such image: 192.168.245.148:5042/centos
- 13 Apr 29 13:09:31 localhost docker: time="2015-04-29T13:09:31+08:00" level="info" msg="-job image_inspect(192.168.245.148:5042/centos) = ERR (1)"
- 14 Apr 29 13:09:31 localhost docker: time="2015-04-29T13:09:31+08:00" level="error" msg="Handler for GET /images/{name:.*}/json returned error: No such image: 192.168.245.148:5042/centos"
- 15 Apr 29 13:09:31 localhost docker: time="2015-04-29T13:09:31+08:00" level="error" msg="HTTP Error: statusCode=404 No such image: 192.168.245.148:5042/centos"
- 16 Apr 29 13:09:31 localhost docker: time="2015-04-29T13:09:31+08:00" level="info" msg="POST /v1.7/containers/create?name=nova-3a71e9cd-3fff-47c8-b60c-1faf6da85b9d"
- 17 Apr 29 13:09:31 localhost docker: time="2015-04-29T13:09:31+08:00" level="info" msg="+job create(nova-3a71e9cd-3fff-47c8-b60c-1faf6da85b9d)"
- 18 Apr 29 13:09:31 localhost docker: No such image: 192.168.245.148:5042/centos (tag: latest)
- 19 Apr 29 13:09:31 localhost docker: time="2015-04-29T13:09:31+08:00" level="info" msg="-job create(nova-3a71e9cd-3fff-47c8-b60c-1faf6da85b9d) = ERR (1)"
- 20 Apr 29 13:09:31 localhost docker: time="2015-04-29T13:09:31+08:00" level="error" msg="Handler for POST /containers/create returned error: No such image: 192.168.245.148:5042/centos (tag: latest)"
- 21 Apr 29 13:09:31 localhost docker: time="2015-04-29T13:09:31+08:00" level="error" msg="HTTP Error: statusCode=404 No such image: 192.168.245.148:5042/centos (tag: latest)"
- 22 Apr 29 13:09:31 localhost docker: time="2015-04-29T13:09:31+08:00" level="info" msg="POST /v1.7/images/create?fromImage=192.168.245.148&tag=5042/centos"
- 23 Apr 29 13:09:31 localhost docker: time="2015-04-29T13:09:31+08:00" level="info" msg="+job pull(192.168.245.148, 5042/centos)"
- 24 Apr 29 13:09:31 localhost docker: time="2015-04-29T13:09:31+08:00" level="info" msg="+job resolve_repository(docker.io/192.168.245.148)"
- 25 Apr 29 13:09:31 localhost docker: time="2015-04-29T13:09:31+08:00" level="info" msg="-job resolve_repository(docker.io/192.168.245.148) = OK (0)"
- 26 Apr 29 13:09:31 localhost docker: time="2015-04-29T13:09:31+08:00" level="info" msg="+job trust_update_base()"
- 27 Apr 29 13:09:31 localhost nova-compute: 2015-04-29 13:09:31.570 1080 INFO novadocker.virt.docker.driver [-] Image name "192.168.245.148:5042/centos" does not exist, fetching it...
- 28 Apr 29 13:09:32 localhost avahi-daemon[740]: Withdrawing address record for 192.168.245.148 on ens33.
- 29 Apr 29 13:09:32 localhost avahi-daemon[740]: Leaving mDNS multicast group on interface ens33.IPv4 with address 192.168.245.148.
- 30 Apr 29 13:09:32 localhost avahi-daemon[740]: Interface ens33.IPv4 no longer relevant for mDNS.
- 31 Apr 29 13:09:32 localhost NetworkManager[787]: <error> [1430284172.493407] [platform/nm-linux-platform.c:1796] add_object(): Netlink error adding 0.0.0.0/0 via 192.168.245.2 dev ens33 metric 106 mss 0 src user: Unspecific failure
- 32 Apr 29 13:09:32 localhost NetworkManager[787]: <warn> default-route4: failed to add default route 0.0.0.0/0 via 192.168.245.2 dev ens33 metric 100 mss 0 src user with effective metric 106
- 33 Apr 29 13:09:32 localhost NetworkManager: inet default table main
- 34 Apr 29 13:09:32 localhost NetworkManager: priority 0x6a protocol static
- 35 Apr 29 13:09:32 localhost NetworkManager: nexthop via 192.168.245.2 dev 2
- 36 Apr 29 13:09:32 localhost NetworkManager[787]: <error> [1430284172.868563] [platform/nm-linux-platform.c:1796] add_object(): Netlink error adding 0.0.0.0/0 via 192.168.245.2 dev ens33 metric 107 mss 0 src user: Unspecific failure
- 37 Apr 29 13:09:32 localhost NetworkManager[787]: <warn> default-route4: failed to add default route 0.0.0.0/0 via 192.168.245.2 dev ens33 metric 100 mss 0 src user with effective metric 107
- 38 Apr 29 13:09:32 localhost NetworkManager: inet default table main
- 39 Apr 29 13:09:32 localhost NetworkManager: priority 0x6b protocol static
- 40 Apr 29 13:09:32 localhost NetworkManager: nexthop via 192.168.245.2 dev 2
- 41 Apr 29 13:09:33 localhost dnsmasq[3727]: read /usr/lib/python2.7/site-packages/networks/nova-br100.hosts - 0 addresses
- 42 Apr 29 13:09:33 localhost dnsmasq-dhcp[3727]: read /usr/lib/python2.7/site-packages/networks/nova-br100.conf
- 43 Apr 29 13:09:33 localhost dnsmasq-dhcp[3727]: read /usr/lib/python2.7/site-packages/networks/nova-br100.opts
- 44 Apr 29 13:09:34 localhost nova-compute: 2015-04-29 13:09:34.458 1080 INFO nova.scheduler.client.report [-] Compute_service record updated for ('compute1', 'compute1')
- 45 Apr 29 13:09:43 localhost nova-compute: 2015-04-29 13:09:43.162 1080 AUDIT nova.compute.resource_tracker [-] Auditing locally available compute resources
- 46 Apr 29 13:09:43 localhost nova-compute: 2015-04-29 13:09:43.277 1080 AUDIT nova.compute.resource_tracker [-] Total physical ram (MB): 2807, total allocated virtual ram (MB): 1024
- 47 Apr 29 13:09:43 localhost nova-compute: 2015-04-29 13:09:43.277 1080 AUDIT nova.compute.resource_tracker [-] Free disk (GB): 25
- 48 Apr 29 13:09:43 localhost nova-compute: 2015-04-29 13:09:43.277 1080 AUDIT nova.compute.resource_tracker [-] Total usable vcpus: 1, total allocated vcpus: 0
- 49 Apr 29 13:09:43 localhost nova-compute: 2015-04-29 13:09:43.278 1080 AUDIT nova.compute.resource_tracker [-] PCI stats: []
- 50 Apr 29 13:09:43 localhost nova-compute: 2015-04-29 13:09:43.308 1080 INFO nova.scheduler.client.report [-] Compute_service record updated for ('compute1', 'compute1')
- 51 Apr 29 13:09:43 localhost nova-compute: 2015-04-29 13:09:43.309 1080 INFO nova.compute.resource_tracker [-] Compute_service record updated for compute1:compute1
- 52 Apr 29 13:09:50 localhost docker: time="2015-04-29T13:09:50+08:00" level="info" msg="Trust graph fetch failed: Get https://dvjy3tqbc323p.cloudfront.net/trust/official.json: net/http: TLS handshake timeout"
- 53 Apr 29 13:09:50 localhost docker: time="2015-04-29T13:09:50+08:00" level="info" msg="-job trust_update_base() = OK (0)"
- 54 Apr 29 13:10:01 localhost systemd: Created slice user-0.slice.
- 55 Apr 29 13:10:01 localhost systemd: Starting Session 19 of user root.
- 56 Apr 29 13:10:01 localhost systemd: Started Session 19 of user root.
- 57 Apr 29 13:10:16 localhost docker: Get https://index.docker.io/v1/repositories/library/192.168.245.148/images: dial tcp 162.242.195.84:443: connection refused
- 58 Apr 29 13:10:16 localhost docker: time="2015-04-29T13:10:16+08:00" level="info" msg="-job pull(docker.io/192.168.245.148, 5042/centos) = ERR (1)"
- 59 Apr 29 13:10:16 localhost docker: time="2015-04-29T13:10:16+08:00" level="info" msg="POST /v1.7/containers/create?name=nova-3a71e9cd-3fff-47c8-b60c-1faf6da85b9d"
- 60 Apr 29 13:10:16 localhost docker: time="2015-04-29T13:10:16+08:00" level="info" msg="+job create(nova-3a71e9cd-3fff-47c8-b60c-1faf6da85b9d)"
- 61 Apr 29 13:10:16 localhost docker: No such image: 192.168.245.148:5042/centos (tag: latest)
- 62 Apr 29 13:10:16 localhost docker: time="2015-04-29T13:10:16+08:00" level="info" msg="-job create(nova-3a71e9cd-3fff-47c8-b60c-1faf6da85b9d) = ERR (1)"
- 63 Apr 29 13:10:16 localhost docker: time="2015-04-29T13:10:16+08:00" level="error" msg="Handler for POST /containers/create returned error: No such image: 192.168.245.148:5042/centos (tag: latest)"
- 64 Apr 29 13:10:16 localhost docker: time="2015-04-29T13:10:16+08:00" level="error" msg="HTTP Error: statusCode=404 No such image: 192.168.245.148:5042/centos (tag: latest)"
- 65 Apr 29 13:10:16 localhost docker: time="2015-04-29T13:10:16+08:00" level="info" msg="GET /v1.7/containers/ps?all=1"
- 66 Apr 29 13:10:16 localhost docker: time="2015-04-29T13:10:16+08:00" level="info" msg="+job containers()"
- 67 Apr 29 13:10:16 localhost docker: time="2015-04-29T13:10:16+08:00" level="info" msg="-job containers() = OK (0)"
- 68 Apr 29 13:10:16 localhost docker: time="2015-04-29T13:10:16+08:00" level="info" msg="GET /v1.7/containers/12176cd27604886980e8a1c1651ba140a98e63c5f161603b9113ca5d988e6ee4/json"
- 69 Apr 29 13:10:16 localhost docker: time="2015-04-29T13:10:16+08:00" level="info" msg="+job container_inspect(12176cd27604886980e8a1c1651ba140a98e63c5f161603b9113ca5d988e6ee4)"
- 70 Apr 29 13:10:16 localhost docker: time="2015-04-29T13:10:16+08:00" level="info" msg="-job container_inspect(12176cd27604886980e8a1c1651ba140a98e63c5f161603b9113ca5d988e6ee4) = OK (0)"
- 71 Apr 29 13:10:16 localhost docker: time="2015-04-29T13:10:16+08:00" level="info" msg="GET /v1.7/containers/855123ad5274f9ea2ad4b66d6dffacda0f8788b7e4b62e6386cef119497325a5/json"
- 72 Apr 29 13:10:16 localhost docker: time="2015-04-29T13:10:16+08:00" level="info" msg="+job container_inspect(855123ad5274f9ea2ad4b66d6dffacda0f8788b7e4b62e6386cef119497325a5)"
解决方法:修改文件"/usr/lib/python2.7/site-packages/novadocker/virt/docker/driver.py":
- 1 def _get_image_name(self, context, instance, image):
- 2 fmt = image['container_format']
- 3 if fmt != 'docker':
- 4 msg = _('Image container format not supported ({0})')
- 5 raise exception.InstanceDeployFailure(msg.format(fmt),
- 6 instance_id=instance['name'])
- 7 return image['name'].lower();