Commit Graph

73 Commits

Author SHA1 Message Date
Zuul fce0cb4c25 Merge "Remove 'locked' from server object" 2017-11-23 06:30:50 +00:00
Xinran eeabfedc54 Add admin_password support
Mogan should support to inject an admin password into a bare metal server.

DocImpact
APIImpact

Change-Id: Id3487b7aea699353aedd49a51d9a5a2e250943b9
Implements: bp admin-password-support
2017-10-31 16:50:08 +08:00
Zhenguo Niu 448556bab0 Remove 'locked' from server object
locked_by can be used to check the lock status, there's no
need to keep locked field.

Change-Id: I3761ab710cf67d56163a39add4c51ee48f940a36
Closes-Bug: #1727944
2017-10-28 09:44:04 +08:00
liusheng 8b8fc495b0 Support quota rollback when creating/importing keypair failed
Change-Id: I83a7410f7509913aa574fe7fe9fc08e4688b32f6
Closes-Bug: #1717912
2017-09-18 20:02:03 +08:00
liusheng 6dae54303f Set project_id when importing an existing keypair
This change set the project_id when importing a existing keypair and add
quota check. Actually, we should introduce user based quota for keypair
quota check and get rid of project_id, that should be done in future.

Change-Id: Idd7f2ce62de9372add50a3542e829602e3ce7612
Closes-Bug: #1717870
2017-09-18 16:37:49 +08:00
Tao Li 26508fd131 Manage existing BMs: Part-2
Add the adopt baremetal node API.

Change-Id: I1897129930bface6a6c4a179e02d6107ff3811af
Implements: bp manage-existing-bms
2017-09-11 16:57:35 +08:00
Zhenguo Niu 028b28594f Add root disk partitions support
This adds root disk partitons support to allow users to specify
root, ephemeral, and swap size.

Implements: bp root-disk-partitions

Change-Id: I9562f39501c23579ba561f0cd4cbb8ef60674a6b
2017-09-06 17:30:25 +08:00
Zhenguo Niu 7d78b09a01 Add preserve_ephemeral support for rebuilding
Currently we don't support preserving ephemeral partition when
requesting to rebuild, we need to expose the ability to users.

Change-Id: Ia10ab6a8d6dd6beba8837e7d0414dc6984dd2426
Closes-Bug: #1714852
2017-09-06 09:12:40 +08:00
Jenkins 5cd5e24a31 Merge "Return key name with server API" 2017-09-01 02:44:15 +00:00
Xinran 3b026239f9 Return key name with server API
Change-Id: Ia8d7c917afc3bae04997161f8bb55c30cd196d60
Closes-Bug: #1712234
2017-08-31 09:55:16 +00:00
Jenkins e03982d000 Merge "support specifying port_id when attaching interface" 2017-08-30 09:58:03 +00:00
Jenkins 4d440df5bc Merge "Add socat console support" 2017-08-30 09:57:57 +00:00
Xinran 817748c6b0 support specifying port_id when attaching interface
Change-Id: I5d3f18a32c357096f5a6090abed1d8d480a93c6f
2017-08-30 15:01:06 +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
Zhenguo Niu dead07444c Add socat console support
This adds another serial console type socat support.

Change-Id: Ic443d050790aee2ea2e27daf165310f8e292fda7
Implements: bp socat-console
2017-08-29 17:07:23 +08:00
liusheng 6302f74832 Add support for scheduler_hints
Partially Implements: bp support-schedule-hints
Change-Id: I7c482ca0ac1031f0017c6bc832892111ecfb20dc
2017-08-26 18:04:57 +08:00
wanghao d577c88d4a Manage existing BMs: Part-1
This patch introduce a new API:
'GET: /manageable_servers' to list the adoptable nodes
from drivers to operators.

As a reference, now we implement api in the Ironic driver.

APIImpact

Implements: bp manage-existing-bms

Change-Id: I56340ce534c3b8d4e855a4c753ecf90a07147d29
2017-08-25 19:42:58 +08:00
wanghao 07cac1ac91 Add some missing logs in Mogan
Now Mogan will release in Pike, there are some
logs missing in some operations,
those should be added for reliability.

Change-Id: I90df3a3a5bda67ea6dae8400d37d7b90d744c429
Closes-Bug: #1710107
2017-08-25 14:03:54 +08:00
Jenkins b3c8d17270 Merge "Remove the duplicate flavor disable check" 2017-08-22 06:56:13 +00:00
Zhenguo Niu 98fd7160e7 Remove the duplicate flavor disable check
We moved the admin role check to db api side, so common users will get
a NotFound error, if they try to get a disabled flavor. Also we check
whether the flavor disabled on api side, if so, we will raise a
FlavorDisabled error to admin users.

Change-Id: I4b4595bab266a7041b860e582c64a0198e50c322
2017-08-21 01:41:28 +00:00
Xinran 108348ad41 Specify image when do rebuilding
Implements: bp specify-image-during-rebuilding
APIImpact

Change-Id: I83104f4209eb4f67699ea9a721509f704d232af9
2017-08-18 15:55:34 +08:00
Jenkins 7e7f89a9f5 Merge "Add checks for aggregate availability_zone" 2017-08-11 11:32:14 +00:00
Jenkins 905962ed32 Merge "Replace default_availability_zone with default_schedule_zone" 2017-08-11 07:19:43 +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
Zhenguo Niu 0775ebb013 Replace default_availability_zone with default_schedule_zone
We don't have default availabiliby zone for node, so it's appropriate
to use default_schedule_zone for scheduling if users don't specify
which az they want the server in.

Change-Id: Ieec7ec3144bb1f1595378eb0bde23f03b25b3498
Closes-Bug: #1709514
2017-08-10 07:21: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
Jenkins 94ea8f2f01 Merge "Add aggregate nodes API" 2017-08-01 09:13:52 +00:00
Jenkins d48fdbf50e Merge "Add node list support" 2017-08-01 09:13:47 +00:00
Jenkins a3010af334 Merge "Support quota for keypairs in Mogan(part-three)" 2017-08-01 08:52:36 +00: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
wanghao a7d6d054c1 Support quota for keypairs in Mogan(part-three)
Introduce the quota management in keypair creation and deletion.

Change-Id: I8241b0bfb38a9c41b564df07a7799e4bc5438c0d
Implements: blueprint quota-support
2017-07-31 10:37:34 +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
Zhenguo Niu 9627106519 Retrieve availability zone from aggregate
This make availability zone list based on aggregate metadata.

Partially Implements: bp node-aggregate

Change-Id: I74d705e2b09c08afadbeacee1f0efa5655ffbcd6
2017-07-28 12:53:39 +08:00
liusheng d194741e10 Clean the compute_node and compute_port objects and db interfaces
This change clean the compute_node and compute_port versioned object
implementation and them db interfaces, after we totally switch to use
placement, we don't need to store any node info in Mogan's db.

Partially Implements: bp track-resources-using-placement

Change-Id: I515674d17a85a77a9380a60ef918dc6dbda8ed83
2017-07-17 14:37:09 +08:00
Jenkins 97d9024420 Merge "Refactor the scheduler to use placement service" 2017-07-14 08:46:13 +00: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
Xinran WANG bfecc061aa Detach interface for server
Partially Implements: bp attach-detach-interface

DocImpact
APIImpact

Co-Authored-By: Zhenguo Niu <Niu.ZGlinux@gmail.com>
Co-Authored-By: liusheng <liusheng2048@gmail.com>
Change-Id: Ib474e542a4d9c32bb15f91d0993e0f6dd990ca8a
2017-07-13 10:57:38 +00:00
Zhenguo Niu b4ae79c2be Adds `disabled` field for flavors.
The `disabled` field is intended to be used when phasing out
flavors. In this case, a delete wouldn't work because the flavor
needs to still be available for live servers using that flavor,
but we don't want to allow *new* servers created from that flavor.

Partially Implements: bp new-flavor

Change-Id: I12713bfe13f506a0d9bb79f733b00bd637ef227b
2017-06-19 10:09:43 +08:00
Zhenguo Niu ed5993efce Change to use server metadata instead of extra
Use server metadata to be user friendly.

Change-Id: Ib396fba305d6138c2436a40559c267de5bb4e7f9
Closes-Bug: #1696899
2017-06-14 17:45:49 +08:00
Jenkins 061415706f Merge "Set default availability zone to server" 2017-06-05 07:45:07 +00: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
Zhenguo Niu 195182539b Set default availability zone to server
This removes default_schedule_zone, change to just use default
availability zone.

Change-Id: I6c8529ca4f341488cb4cd8ad692bfe5010f7dc09
Closes-Bug: #1693957
2017-06-01 15:17:19 +08:00
Zhenguo Niu c81e8b8faa Following up patch of fea6689e74
Change-Id: Ia373415e352721c8df1e80eb5aa56ad94177b9ad
2017-05-22 14:14:56 +08:00
Zhong Luyao fea6689e74 Attach interface for server
Partially Implements: bp attach-detach-interface

Change-Id: I3c852428676c19ebaeee1954c1a78e77a61eb014
2017-05-18 09:11:48 +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 a7224e4ba9 Add support for injecting keypairs
Change-Id: I6aa4f8ca970ca70e7e2279e2436e94939e065e1f
2017-04-22 11:21:06 +08:00
liusheng ac0130bf0f Add keypair support
This change add keypair feature support.

Change-Id: I0ec5d625a2c5a8cc17f56fe3e2462127abb94000
2017-04-19 21:48:51 +08:00
Zhenguo Niu ef81b84b73 Following up patch of 80d8397bd4
This decodes the injected files.

Change-Id: I9d23cc084b8af0af621b04dd5516ad220bb69c2c
2017-04-17 12:52:55 +08:00
Zhenguo Niu 80d8397bd4 Add injected files support
This addes the ability to inject files on instance launch. We follow
nova's way to use 'personality' to specify the files.

Change-Id: Ic74632b0922d2c7e2dd9b2907304e45ade7376c4
2017-04-14 15:45:38 +08:00
Zhenguo Niu c610213199 Add user_data support
We should allow users to specify user data when creating an
instance.

Change-Id: I8fcd9aa4ca091ba3435292b519a999653a6d5b19
2017-04-12 10:26:19 +08:00