Commit Graph

25 Commits (master)

Author SHA1 Message Date
Zhenguo Niu 511be25834 Show respect to original authors
We copied some codes/frameworks from Nova, but frogot to add
the original file informations, this tries to add them back.

Change-Id: I310d94fc334b6e72dc5eafa316f1b4842066ccbe
2017-09-20 11:16:19 +08:00
Zhenguo Niu 4d8cdb3992 Avoid passing empty aggregates to Placement
This adds a check before constructing member_of parameters to
avoid passing empty aggregates list to placement.

Also this changes to only get aggregates with affinity_zone
during server group scheduling.

Change-Id: Ic282d5afcad5fa78fdb029e874c78ac10cd73153
2017-09-18 19:21:31 +08:00
Zhenguo Niu 93da16d88f Revert "Return node(name or uuid) with server instead of node_uuid"
This reverts commit 5124ae1d44.

Change-Id: I0ff6f7e22afbe8833bbc6044b8b7f5c768c9b940
2017-09-07 17:29:56 +08:00
Zhenguo Niu 5124ae1d44 Return node(name or uuid) with server instead of node_uuid
Currently we support to list compute nodes and aggregate nodes
with names, but server show will return the node uuid always,
which make the admins have to go ironic to get the relationship
between name and uuid, so this changes to return node name.

Change-Id: Ia0e5122aa29c4de2e870c5b71c420de49530ba92
Closes-Bug: #1715036
2017-09-05 14:53:54 +08:00
liusheng 639aeceafb Use server group in scheduler
This change will allow the scheduler to select nodes with specified server
group in schedule_hints.

Partially Implements: bp support-schedule-hints
Change-Id: Idecd5e5f470eee12de0088b2332874b43f9dae52
2017-08-30 14:17:16 +08:00
Jenkins 7e7f89a9f5 Merge "Add checks for aggregate availability_zone" 2017-08-11 11:32:14 +00:00
Zhenguo Niu 7ec20fdd31 Add aggregates filters when do scheduling
We should extract resources aggregates information from flavor,
and pass it to placement with resources filters.

Partially Implements: bp node-aggregate

Change-Id: I96eeb7ab6636fa241e7d82bbddad8d70791c1f43
2017-08-11 07:24:26 +00:00
Zhenguo Niu 3c15f2554a Add checks for aggregate availability_zone
* Do not allow empty availablity zone
* A node can not be in different availablity zone

Change-Id: I82096c60f9d871e5f3ddcbc905dfe62f70b19b79
2017-08-11 09:10:08 +08:00
Jenkins 676d2ab9a4 Merge "Improve resources updating process" 2017-08-10 13:43:58 +00:00
Zhenguo Niu 6fc66c7bee Remove rp aggregate when the aggregate get removed
This tries to remove aggregate from resource provider in placement
when removing the aggregate.

Partially Implements: bp node-aggregate

Change-Id: Ia80a92ea8e19650b7b53d4d771e848079039aa28
2017-08-10 13:03:39 +08:00
liusheng e6bd87df32 Improve resources updating process
This change ensure allocations of a rp being deleted firstly before the rp
deleted. And this change also avoid updating the inventory of a rp if the
rp(node) has already been consumed.

Change-Id: I507176834f8247d112c8e6d969656d1a4dded6d7
2017-08-09 16:02:44 +08:00
Zhenguo Niu a637bfd38a Add aggregate nodes API
* list nodes for the specified aggregates
* add node to an aggregate
* remove node from an aggregate

Change-Id: I78ce523c7ba26860e02dcde84bcb84a6cc0c60ee
2017-07-31 11:03:28 +08:00
Zhenguo Niu 8a8dc20660 Add node list support
This adds support for listing node names from resource providers,
which will only available for admins.

Partially Implements: bp node-aggregate

Change-Id: I414bf176302fc076288e6a6fbfd88a7090541622
2017-07-28 12:53:39 +08:00
liusheng 9de2e37188 Refactor the scheduler to use placement service
This change change the scheduler to use placement api to filter query
nodes with specified resource class of flavor, and clean the filters
and weighers in scheduler.

Change-Id: I89ad443f553510da6daf289b83f3c30d9d546ace
Partially Implements: bp track-resources-using-placement
2017-07-13 11:51:45 +00:00
liusheng ee3c64d77f Reporting nodes resource to placement service
This change importing placement service, report nodes resources to
placement and use it as unique nodes resource provider service for
Mogan's scheduler.

Co-Authored-By: Zhenguo Niu <Niu.ZGlinux@gmail.com>

Change-Id: I1cb91a10cfc8139687ad44167f33f45fd3c08e5c
Partially Implements: bp track-resources-using-placement
2017-07-07 01:54:19 +00:00
ZhongLuyao f9affb75f2 Update ironic.driver.plug_vif implementation
port.update is replaced by node.vif_attach

Co-Authored-By: Xinran <xin-ran.wang@intel.com>

Closes-Bug: #1694942
Change-Id: Ie0f9043a93da2b3b8dfbc660f7575c3235f751b9
2017-07-03 03:51:47 +00:00
Zhenguo Niu deb70c7a63 Change to use node resource_class
Currently, we use node_type property to link with the flavors, but
ironic node's resource_class field just want to do such thing, so
we can just change to use it instead of adding a new node property.

Change-Id: I535606ce05299037a7bd5aacdcd7869ca5f855c4
Closes-Bug: #1695819
2017-06-05 17:04:00 +08:00
Tao Li 3c5548343a Improve the multi-instance creation
Select all available nodes before staring to create servers. If not
enough nodes for request instances, then abort the this process.

Closes-Bug: #1691699

Change-Id: I041927ed056859f30829b5fdcd0f7b486832424a
2017-06-01 17:21:15 +08:00
liusheng c05f0e2df3 Allow record the summary info of node in scheduling
This change add a __repr__ method which can help to record a summary info
of node when scheduling than objects. It can help to trace the process
of scheduling for debuging.

Closes-Bug: #1691711
Change-Id: I3460ef2e5a129be7f08671d162ecf26cb2b7bbbb
2017-05-18 09:25:33 +00:00
liusheng 7d0f8ab360 Rename instance to server and instance type to flavor
Change-Id: I35a7fb0b4f3fa9e09f2fc2c739c0a9b39a8576ab
2017-04-28 14:23:22 +08:00
Zhenguo Niu 5199d96aa2 Move retry information setting from scheduler to engine
As we already splitted scheduler out from engine service, the retry
information can't be saved anymore, so move the logic to engine to
make it work again.

Change-Id: If0ddc339ea705889fc52a84ed190df136abca650
2017-03-25 16:20:44 +08:00
Zhenguo Niu e173d1f432 Use DB ports instead of fetching from driver
We have saved node ports information to DB, so change to use it
instead of issuing an extra API request.

Change-Id: I5b9183a1afdcb1e9444a88dfa50e1c31bf54e805
2017-03-25 11:50:12 +08:00
wanghao 32d9bf7a11 Remove log translations
Log messages are no longer being translated. This removes all use of
the _LE, _LI, and _LW translation markers to simplify logging and to
avoid confusion with new contributions.

See:
http://lists.openstack.org/pipermail/openstack-i18n/2016-November/002574.html
http://lists.openstack.org/pipermail/openstack-dev/2017-March/113365.html

Co-Authored-By: lcsong <lcsong@fiberhome.com>

Change-Id: Ic95b5c1c451ce6aced0f44165d2191be1eab3e40
Closes-Bug: 1674560
2017-03-24 14:21:47 +08:00
Zhenguo Niu 7a341d8e04 Move schedule task out of create instance flow
For multi instance creation scenario, we need to schedule for all
requested instances first then run the flow separately, so better
to move this task out, and leave the OnFailureReschedule task to
the flow.

Change-Id: If576003cd6a2db0dd90e2ee5cdf0b0cb00f6da63
2017-03-24 10:48:40 +08:00
Zhenguo Niu b4e8c418a2 Split scheduler out of engine service
Change-Id: Ib57f295b0362e4fc17a3ff5bfb539830f6ac1875
2017-03-21 15:20:05 +08:00