码迷,mamicode.com
首页 > 其他好文 > 详细

07.计算Nova→3.场景学习→2.Launch→2.nova-scheduler

时间:2019-07-24 16:38:14      阅读:90      评论:0      收藏:0      [点我收藏+]

标签:ret   通过   sse   one   logs   主机   pre   tom   因此   

为什么nova不像cinder一样是工作流的形式???



描述详细
  1. 日志显示初始有两个 host(在我们的实验环境中就是controller和compute),依次经过若干filter 的过滤,两个计算节点都通过了。
    1. 过滤器补充:
      1. DifferentHostFilter:allows the instance on a different host from a set of instances.选择与一组虚拟机不同位置的主机
      2. SameHostFilter:puts the instance on the same host as another instance in a set of instances选择与一组虚拟机相同位置的主机
    2. 过滤器位置\opt\stack\nova\nova\scheduler\filters</li>
1
2
3
4
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
1
2
3
4
5
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
1
2
3
4
5
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
1
2
3
4
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
1
2
3
4
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
1
2
3
4
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
1
2
3
4
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
1
2
3
4
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}}
1
2
3
4
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}}
1
2
3
4
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}}
1
2
3
4
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}}
1
2
3
4
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}}

  1. 接下来就该 weight 了,可以看到controller和compute内存一致,因此比较磁盘得到结果:controller(1.95...)的权重小于compute(2),最终选择compute
    1. 要显示 DEBUG 日志,需要在 /etc/nova/nova.conf 中打开 debug 选项
      1
      2
      [DEFAULT]
      debug = True
1
2
3
4
5
6
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}}
1
2
3
4
5
6
7
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

标签:ret   通过   sse   one   logs   主机   pre   tom   因此   

原文地址:https://www.cnblogs.com/LeisureZhao/p/11238731.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!