• 博客园logo
  • 会员
  • 周边
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
LeisureZhao
博客园    首页    新随笔    联系   管理    订阅  订阅

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

返回总目录

为什么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\
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}}
posted @ 2019-07-24 16:09  LeisureZhao  阅读(177)  评论(0)    收藏  举报
刷新页面返回顶部
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3