Specify compute hosts with SSDs
2015-12-04 19:52
302 查看
scheduler_driver = nova.scheduler.filter_scheduler.FilterScheduler scheduler_available_filters = nova.scheduler.filters.all_filters scheduler_default_filters =AggregateInstanceExtraSpecsFilter
首先在nova.conf中配置以上调度
availability zone中创建
在nova
fast-iohost aggregate[/code]
$ nova aggregate-createfast-io nova +----+---------+-------------------+-------+----------+ | Id | Name | Availability Zone | Hosts | Metadata | +----+---------+-------------------+-------+----------+ | 1 |fast-io | nova | | | +----+---------+-------------------+-------+----------+
添加
ssd=truekey-value pair to the aggregate
$ nova aggregate-set-metadata 1 ssd=true +----+---------+-------------------+-------+-------------------+ | Id | Name | Availability Zone | Hosts | Metadata | +----+---------+-------------------+-------+-------------------+ | 1 |fast-io | nova | [] | {u'ssd': u'true'} | +----+---------+-------------------+-------+-------------------+
把node1/2添加到aggregate
$ nova aggregate-add-host 1 node1 +----+---------+-------------------+-----------+-------------------+ | Id | Name | Availability Zone | Hosts | Metadata | +----+---------+-------------------+------------+-------------------+ | 1 |fast-io | nova | [u'node1'] | {u'ssd': u'true'} | +----+---------+-------------------+------------+-------------------+ $ nova aggregate-add-host 1 node2 +----+---------+-------------------+---------------------+-------------------+ | Id | Name | Availability Zone | Hosts | Metadata | +----+---------+-------------------+----------------------+-------------------+ | 1 |fast-io | nova | [u'node1', u'node2'] | {u'ssd': u'true'} | +----+---------+-------------------+----------------------+-------------------+
创建ssd.largeflavor, ID of 6, 8 GB of RAM, 80 GB root disk, and four vCPUs.
$ nova flavor-create ssd.large 6 8192 80 4 +----+-----------+-----------+------+-----------+------+-------+-------------+-----------+ | ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public | +----+-----------+-----------+------+-----------+------+-------+-------------+-----------+ | 6 | ssd.large | 8192 | 80 | 0 | | 4 | 1.0 | True | +----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
设置aggregate_instance_extra_specs filter的key-value pairs:
$ nova flavor-key [code]ssd.largeset
aggregate_instance_extra_specs:ssd=true
该filter的实现在:nova/scheduler/filters/aggregate_instance_extra_specs.py
$ nova flavor-show ssd.large +----------------------------+--------------------------------------------------+ | Property | Value | +----------------------------+--------------------------------------------------+ | OS-FLV-DISABLED:disabled | False | | OS-FLV-EXT-DATA:ephemeral | 0 | | disk | 80 | | extra_specs | {u'aggregate_instance_extra_specs:ssd': u'true'} | | id | 6 | | name | ssd.large | | os-flavor-access:is_public | True | | ram | 8192 | | rxtx_factor | 1.0 | | swap | | | vcpus | 4 | +----------------------------+--------------------------------------------------+
现在使用
ssd.largeflavor来创建instance时,scheduler 只会考虑带有
ssd=truekey-value pair的host,也就是node1/2.
http://docs.openstack.org/liberty/config-reference/content/section_compute-scheduler.html
相关文章推荐
- Minimum Inversion Number(线段树求逆序数)
- SVN的问题
- hdoj f(n) 2582 (GCD打表&找规律)好题
- hud3108--Ant Trip
- Android打包程序
- Shell命令sshpass非交互SSH密码验证
- 把事情往苦逼里做
- Oracle12c学习(二)---Linux下SQL Developer 安装
- Android LocalSocket与Socket 区别
- 关于UI适配的文档
- PHP图片等比缩放,并添加Logo水印特定代码和盯
- UVA 11624 两次bfs搞搞
- 黑马程序员之System、Runtime、Math、Date、Calendar类
- UITextView 光标定位
- 【PA2014】【BZOJ3727】Zadanie
- $locationChangeStart ,$locationChangeSuccess,$routeChangeStart,$routeChangeSuccess如何使用
- ugui和ngui手写虚拟摇杆功能比较
- 注册时,邮箱自动发送验证
- 各种内部排序算法复杂度的比较和排序方法的选择
- Android ThreadLocal工作原理