[openstack]nova aggregate概念理解

来源:互联网 发布:重庆沙坪坝软件学院 编辑:程序博客网 时间:2024/05/16 06:23

声明:

本博客欢迎转发,但请保留原作者信息!内容系本人学习、研究和总结,如有雷同,实属荣幸!

原文地址:http://blog.csdn.net/gtt116/article/details/17996265

概述

aggregate进一步切分了availability zone的概念。AZ对用户是可见的,aggregate仅仅对管理员可见,用户并不可用。

aggregate的概念来自Xen的resource pool,后来抽象成aggregate的概念。管理员可以给aggregate设置metadata,一个host可以属于多个aggregate,基于aggregate的metadata可以高级调度功能。

grizzly及之后版本基于aggregate可以了两个功能:availability zone和特殊调度。


Availability zone

在grizzly版本之后,AZ都是基于aggregate实现的。原本数据库中的表service的availability_zone字段已删除。并且配置项`node_availability_zone`也无效。新增一个配置项`default_availability_zone=nova`,表示如果host不属于任何aggregate,或者aggregate没有设置availability-zone,那么host的AZ为nova。

grizzly中的aggregate和AZ以及Host的关系如图所示。
此图意为:系统有3个aggregate,并且设置了3个AZ。特别地host5既属于aggregateB也属于aggregateC,所以host5既属于az2,也属于az3。


特殊调度

此外每一个aggregate还可以配置不同的metadata(AZ也是一个metadata) 如上图中所示,aggregateA被标记了ssd:true,表示这些host支持SSD,如果在flavor的extra-specs中配置了ssd:true,那么调度时,仅有这个aggregate的宿主机会通过过滤器。换言之,此flavor创建的虚拟机只能落在此aggregate上。

命令行接口

nova aggregate-list# Print a list of all aggregates.nova aggregate-create <name> <availability-zone># Create a new aggregate named <name> in availability zone <availability-zone>. Returns the ID of the newly created aggregate.nova aggregate-delete <id># Delete an aggregate with id <id>.nova aggregate-details <id># Show details of the aggregate with id <id>.nova aggregate-add-host <id> <host># Add host with name <host> to aggregate with id <id>.nova aggregate-remove-host <id> <host># Remove the host with name <host> from the aggregate with id <id>.nova aggregate-set-metadata <id> <key=value> [<key=value> ...]# Add or update metadata (key-value pairs) associated with the aggregate with id <id>.nova aggregate-update <id> <name> [<availability_zone>]# Update the aggregate's name and optionally availability zone.nova host-list# List all hosts by service.nova host-update --maintenance [enable | disable]#Put/resume host into/from maintenance.

参考:http://docs.openstack.org/trunk/openstack-compute/admin/content/host-aggregates.html
0 0
原创粉丝点击