调度器:添加按聚合过滤¶
https://blueprints.launchpad.net/nova/+spec/per-aggregate-disk-allocation-ratio https://blueprints.launchpad.net/nova/+spec/per-aggregate-max-instances-per-host https://blueprints.launchpad.net/nova/+spec/per-aggregate-max-io-ops-per-host
此 bp 的目标是为 DiskFilter、NumInstancesFilter 和 IoOpsFilter 过滤器添加按聚合设置选项的能力。
问题描述¶
操作员希望为一部分计算主机定义不同的过滤选项(disk_allocation_ratio、max_instances_per_host、max_io_ops_per_host)。
提议的变更¶
创建新的过滤器,扩展 DiskFilter、NumInstancesFilter 和 IoOpsAggregateFilter,以提供从聚合读取元数据的能力。如果没有找到有效值,则回退到 nova.conf 中设置的全局默认配置。
备选方案¶
无
数据模型影响¶
无
REST API 影响¶
无
安全影响¶
无
通知影响¶
无
其他最终用户影响¶
无
性能影响¶
与此 bp 无关,但有报告称在大型集群中使用聚合和调度器会对性能产生影响,相关 bug 为 1300775。
其他部署者影响¶
操作员需要更新调度器的 nova.conf 以激活过滤器,还需要使用配置选项 disk_allocation_ratio、max_instances_per_host、max_io_ops_per_host 设置聚合的元数据。
$ # This one provides for hosts in the aggregate 'agr1' the possibility to
$ # host 60 instances.
$ nova aggregate-set-metadata agr1 set metadata max_instances_per_host=60
$ # This one provides for hosts in the aggregate 'agr2' the possibility to
$ # oversubscribe disk allocation and configures the scheduler to ignore
$ # hosts that have currently more than 3 heavy operations.
$ nova aggregate-set-metadata agr2 set\
$ metadata max_io_ops_per_host=3
$ disk_allocation_ratio=3
操作员还需要重新加载调度器服务以激活此新过滤器。
开发人员影响¶
无
实现¶
负责人¶
- 主要负责人
sahid-ferdjaoui
- 其他贡献者
<None>
工作项¶
新的过滤器 AggregateNumInstancesFilter
新的过滤器 AggregateDiskFilter
新的过滤器 AggregateIoOpsFilter
依赖项¶
已打开一个 bug 来实现按聚合的逻辑。 https://bugs.launchpad.net/nova/+bug/1301340
测试¶
我们需要在 test_host_filters.py 中添加单元测试,并且可能需要考虑在 tempest 中添加功能测试。
文档影响¶
我们需要在文档中引用这些新过滤器,还需要更新 ‘doc/source/devref/filter_scheduler.rst’。
参考资料¶
这些蓝图已被接受用于 icehouse,但由于一项开始添加助手的工作,该助手提供从聚合获取元数据的实用方法,从而删除过滤器之间的重复代码(bug 1301340)。 蓝图已被推迟。