UPDATE 09/27/2016
Ugly workaround ( create bash script ) as admin
In shell loop ( X supposed to work as counter)
$ nova boot --image <uuid> --flavor m$X.large --key_name oskey092716 \
--availability-zone nova:server$X
thus favor mx.large will boot nova instance on Compute Node serverx (X=1,2,3,... or whatever you need )
I understand that it is worst case scenario if host-aggregates syntax won't help
END UPDATE
UPDATE 09/26/2016
Link 1 addresses questions
CPU Pinning in OpenStack
Reserving dedicated cores on the compute host(s) for host processes, avoiding host process and guest virtual machine instances from fighting for the same CPU cores;
Reserving dedicated cores on the compute host(s) for the virtual machine instances themselves;
Enabling the required scheduler filters;
Creating a host aggregate to add all hosts configured for CPU pinning to;
Creating a performance focused flavor to target this host aggregate; and
Launching an instance with CPU pinning!
Continue follow link 1 in your case I would try :-
$ nova aggregate-create storage
$ nova aggregate-set-metadata 1 storage=true
$ nova aggregate-create normal
$ nova aggregate-set-metadata 2 storage=false
$ nova flavor-key ID_OF_YOUR_STORAGE_OPTIMIZED set aggregate_instance_extra_specs:storage=true
$ nova aggregate-add-host 1 compute1.nova
======================================================================
Try this logic :-
[root@overcloud-controller-0 ~]# nova aggregate-create storage
+----+---------+-------------------+-------+----------+
| Id | Name | Availability Zone | Hosts | Metadata |
+----+---------+-------------------+-------+----------+
| 1 | storage | - | | |
+----+---------+-------------------+-------+----------+
[root@overcloud-controller-0 ~]# nova aggregate-set-metadata 1 storage=true
Metadata has been successfully updated for aggregate 1.
+----+---------+-------------------+-------+----------------+
| Id | Name | Availability Zone | Hosts | Metadata |
+----+---------+-------------------+-------+----------------+
| 1 | storage | - | | 'storage=true' |
+----+---------+-------------------+-------+----------------+
[root@overcloud-controller-0 ~]# nova aggregate-create normal
+----+--------+-------------------+-------+----------+
| Id | Name | Availability Zone | Hosts | Metadata |
+----+--------+-------------------+-------+----------+
| 2 | normal | - | | |
+----+--------+-------------------+-------+----------+
[root@overcloud-controller-0 ~]# nova aggregate-set-metadata 2 storage=false
Metadata has been successfully updated for aggregate 2.
+----+--------+-------------------+-------+-----------------+
| Id | Name | Availability Zone | Hosts | Metadata |
+----+--------+-------------------+-------+-----------------+
| 2 | normal | - | | 'storage=false' |
+----+--------+-------------------+-------+-----------------+
[root@overcloud-controller-0 ~]# nova flavor-key 3 set aggregate_instance_extra_specs:storage=true
[root@overcloud-controller-0 ~]# nova hypervisor-list
+----+-------------------------------------+-------+---------+
| ID | Hypervisor hostname | State | Status |
+----+-------------------------------------+-------+---------+
| 1 | overcloud-novacompute-0.localdomain | up | enabled |
| 2 | overcloud-novacompute-1.localdomain | up | enabled |
+----+-------------------------------------+-------+---------+
[root@overcloud-controller-0 ~]# nova aggregate-add-host 1 overcloud-novacompute-1.localdomain
Host overcloud-novacompute-1.localdomain has been successfully added for aggregate 1
+----+---------+-------------------+---------------------------------------+----------------+
| Id | Name | Availability Zone | Hosts | Metadata |
+----+---------+-------------------+---------------------------------------+----------------+
| 1 | storage | - | 'overcloud-novacompute-1.localdomain' | 'storage=true' |
+----+---------+-------------------+---------------------------------------+----------------+
[root@overcloud-controller-0 ~]# nova flavor-list
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
| ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public |
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
| 2 | m1.small | 1000 | 20 | 0 | | 1 | 1.0 | True |
| 3 | m1.medium | 2000 | 20 | 0 | | 1 | 1.0 | True |
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
[root@overcloud-controller-0 ~]# nova boot --flavor 3 --key-name oskey092616 \
--image 14359d87-0ae1-440d-ad6e-5a22f7f98d72 \
--nic net-id=2c7d77a1-7761-4a75-b3ae-57e234f83040 CentOS72Devs01
END UPDATE
I worked on this a while ago. However instructions from
http://redhatstackblog.redhat.com/201...
worked for me.