07.计算Nova→3.场景学习→2.Launch→2.nova-scheduler
Posted leisurezhao
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了07.计算Nova→3.场景学习→2.Launch→2.nova-scheduler相关的知识,希望对你有一定的参考价值。
为什么nova不像cinder一样是工作流的形式???
描述 | 详细 |
---|
- 日志显示初始有两个 host(在我们的实验环境中就是controller和compute),依次经过若干filter 的过滤,两个计算节点都通过了。
- 过滤器补充:
- DifferentHostFilter:allows the instance on a different host from a set of instances.选择与一组虚拟机不同位置的主机
- SameHostFilter:puts the instance on the same host as another instance in a set of instances选择与一组虚拟机相同位置的主机
- 过滤器位置\\opt\\stack\\nova\\nova\\scheduler\\filters</li>
| | Jun 16 13:12:50 controller nova-scheduler[25303]:
DEBUG nova.filters [None req-d9a23179-e16d-4016-9586-e68c3dfdf6a9 admin admin]
Starting with 2 host(s)
(pid=25303) get_filtered_objects /opt/stack/nova/nova/filters.py:70
|
| Jun 16 13:12:50 controller nova-scheduler[25303]:
DEBUG nova.scheduler.filters.retry_filter
[None req-d9a23179-e16d-4016-9586-e68c3dfdf6a9 admin admin]
Re-scheduling is disabled
(pid=25303) host_passes /opt/stack/nova/nova/scheduler/filters/retry_filter.py:38
|
| Jun 16 13:12:50 controller nova-scheduler[25303]:
DEBUG nova.scheduler.filters.retry_filter
[None req-d9a23179-e16d-4016-9586-e68c3dfdf6a9 admin admin]
Re-scheduling is disabled
(pid=25303) host_passes /opt/stack/nova/nova/scheduler/filters/retry_filter.py:38
|
| Jun 16 13:12:50 controller nova-scheduler[25303]:
DEBUG nova.filters [None req-d9a23179-e16d-4016-9586-e68c3dfdf6a9 admin admin]
Filter RetryFilter returned 2 host(s)
(pid=25303) get_filtered_objects /opt/stack/nova/nova/filters.py:104
|
| Jun 16 13:12:50 controller nova-scheduler[25303]:
DEBUG nova.filters [None req-d9a23179-e16d-4016-9586-e68c3dfdf6a9 admin admin]
Filter AvailabilityZoneFilter returned 2 host(s)
(pid=25303) get_filtered_objects /opt/stack/nova/nova/filters.py:104
|
| Jun 16 13:12:50 controller nova-scheduler[25303]:
DEBUG nova.filters [None req-d9a23179-e16d-4016-9586-e68c3dfdf6a9 admin admin]
Filter ComputeFilter returned 2 host(s)
(pid=25303) get_filtered_objects /opt/stack/nova/nova/filters.py:104
|
| Jun 16 13:12:50 controller nova-scheduler[25303]:
DEBUG nova.filters [None req-d9a23179-e16d-4016-9586-e68c3dfdf6a9 admin admin]
Filter ComputeCapabilitiesFilter returned 2 host(s)
(pid=25303) get_filtered_objects /opt/stack/nova/nova/filters.py:104
|
| Jun 16 13:12:50 controller nova-scheduler[25303]:
DEBUG nova.filters [None req-d9a23179-e16d-4016-9586-e68c3dfdf6a9 admin admin]
Filter ImagePropertiesFilter returned 2 host(s)
(pid=25303) get_filtered_objects /opt/stack/nova/nova/filters.py:104
|
| Jun 16 13:12:50 controller nova-scheduler[25303]:
DEBUG nova.filters [None req-d9a23179-e16d-4016-9586-e68c3dfdf6a9 admin admin]
Filter ServerGroupAntiAffinityFilter returned 2 host(s)
(pid=25303) get_filtered_objects /opt/stack/nova/nova/filters.py:104
|
| Jun 16 13:12:50 controller nova-scheduler[25303]:
DEBUG nova.filters [None req-d9a23179-e16d-4016-9586-e68c3dfdf6a9 admin admin]
Filter ServerGroupAffinityFilter returned 2 host(s)
(pid=25303) get_filtered_objects /opt/stack/nova/nova/filters.py:104
|
| Jun 16 13:12:50 controller nova-scheduler[25303]:
DEBUG nova.filters [None req-d9a23179-e16d-4016-9586-e68c3dfdf6a9 admin admin]
Filter SameHostFilter returned 2 host(s)
(pid=25303) get_filtered_objects /opt/stack/nova/nova/filters.py:104
|
| Jun 16 13:12:50 controller nova-scheduler[25303]:
DEBUG nova.filters [None req-d9a23179-e16d-4016-9586-e68c3dfdf6a9 admin admin]
Filter DifferentHostFilter returned 2 host(s)
(pid=25303) get_filtered_objects /opt/stack/nova/nova/filters.py:104
|
|
- 接下来就该 weight 了,可以看到controller和compute内存一致,因此比较磁盘得到结果:controller(1.95...)的权重小于compute(2),最终选择compute
- 要显示 DEBUG 日志,需要在 /etc/nova/nova.conf 中打开 debug 选项
| | Jun 16 13:12:50 controller nova-scheduler[25303]:
DEBUG nova.scheduler.filter_scheduler [None req-d9a23179-e16d-4016-9586-e68c3dfdf6a9 admin admin]
Filtered [
(compute, compute) ram: 7471MB disk: 41984MB io_ops: 0 instances: 0,
(controller, controller) ram: 7471MB disk: 39936MB io_ops: 0 instances: 0]
(pid=25303) _get_sorted_hosts /opt/stack/nova/nova/scheduler/filter_scheduler.py:404
|
| Jun 16 13:12:50 controller nova-scheduler[25303]:
DEBUG nova.scheduler.filter_scheduler [None req-d9a23179-e16d-4016-9586-e68c3dfdf6a9 admin admin]
Weighed [WeighedHost
[host: (compute, compute) ram: 7471MB disk: 41984MB io_ops: 0 instances: 0, weight: 2.0],
WeighedHost
[host: (controller, controller) ram: 7471MB disk: 39936MB io_ops: 0 instances: 0, weight: 1.9512195122]]
(pid=25303) _get_sorted_hosts /opt/stack/nova/nova/scheduler/filter_scheduler.py:423 |
|
以上是关于07.计算Nova→3.场景学习→2.Launch→2.nova-scheduler的主要内容,如果未能解决你的问题,请参考以下文章
云计算学习,OpenStack主要逻辑模块Nova的详细功能
OpenStack Nova 计算节点的维护模式
浅谈OpenStack T版服务组件--Nova计算服务(#^.^#)
opentack学习nova使用:
在Ubuntu上学习OpenStack之六:计算节点基础环境准备和安装Nova
OpenStack——Nova组件