Commit Graph

37 Commits (master)

Author SHA1 Message Date
Xinran eeabfedc54 Add admin_password support
Mogan should support to inject an admin password into a bare metal server.


Change-Id: Id3487b7aea699353aedd49a51d9a5a2e250943b9
Implements: bp admin-password-support
2017-10-31 16:50:08 +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 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
Jenkins 905962ed32 Merge "Replace default_availability_zone with default_schedule_zone" 2017-08-11 07:19:43 +00: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
liusheng 4738ce6120 Fix the config sample generation
* add missed cache and auth_token oslo config entrypoints.
* make placement and shellinabox config options can be recognized.

Change-Id: Ic277ebfe02616db3aca7623d404cf64494d82993
Closes-Bug: #1709275
2017-08-09 16:04:23 +08:00
Jenkins a3010af334 Merge "Support quota for keypairs in Mogan(part-three)" 2017-08-01 08:52:36 +00: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
liusheng 4a5cae0377 Remove legacy auth loading
remove support for specifying client auth in keystone_authtoken config section.
This was deprecated about a year ago and now can safely be removed.

This change reference to the ironic patch[1]


Change-Id: I9d22dd41e603e618230e656e91496462bde1c0e0
2017-07-29 16:22:16 +08:00
Jenkins ec7d5d0d69 Merge "Clean the compute_node and compute_port objects and db interfaces" 2017-07-18 05:42:11 +00: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
liusheng f56ad6aa2e Remove the private database config option
In both Mogan and oslo_db, there are many places directly use the 'InnoDB'
as mysql engine, we don't need to define a specific config option in

Change-Id: I70be7dd6767cf5f4d3122fa7255a64ab5911c9e4
2017-07-14 09:52:48 +08: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 <>

Change-Id: I1cb91a10cfc8139687ad44167f33f45fd3c08e5c
Partially Implements: bp track-resources-using-placement
2017-07-07 01:54:19 +00: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 164ca9844e Add check for availability zone when set resources
We should avoid set compute node availability zone to str(None),
When it's None, just leave it to NULL.

Also, this change the default availability zone to mogan.

Change-Id: I25fdeeb1e2544c07089977fd3463572c0c96b510
2017-05-09 10:03:04 +08: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 963ebcbb19 Remove deprecated ironic options
Ironic configuration options that where used for a deprecated
Identity v2 API have been removed.

Change-Id: I9f6e5a60b14eee157c2c5e69672b2cd8a25d102c
2017-04-20 16:43:03 +08:00
Zhenguo Niu 8497848ac2 Add configdrive support - metadata
This adds some simple metadata information, following up
patches will add more capabilities

Co-Authored-By: Shaohe Feng <>

Change-Id: Idaa3ab813b5355ce44e97fa069cd7b664f8b4761
2017-04-10 09:42:21 +08:00
liusheng b3763ddd95 The host and port console options were missed to be registered
Change-Id: Ia434b1a39ee36cf42e2f32786bcec4494d833c9a
2017-04-07 10:52:58 +08:00
liusheng 9eba5f599a Add service entry for shellinabox console proxy
Change-Id: I358bb501e772a10281e35825b7f048abd9b73797
Partially-Implements: bp console-support
2017-04-01 11:44:58 +08:00
liusheng 915312e25c Add consoleauth manager
Change-Id: Ifddab90b5e61407a8a12b560738b39fcb5c9780e
Partially-Implements: bp console-support
2017-03-30 14:30:01 +08:00
Jenkins 6768ac2ea0 Merge "Add function to get the console info from ironic" 2017-03-30 03:51:23 +00:00
liusheng 51c68dd250 Add function to get the console info from ironic
This change added a function in mogan-engine to get the console info
from ironic.

Change-Id: I2b181ddfe2edcf0c7b84a1188d5042ad59886ee6
Partially-Implements: bp console-support
2017-03-29 16:25:41 +08:00
wanghao efa63af620 Support quota in mogan(part two)
This patch introduces the quota operation in
creating and deleting instances process.

Change-Id: If6573fafc5acb805cf727acdc8f0f9872fc1a717
Implements: blueprint quota-support
2017-03-29 14:46:30 +08:00
jeremy.zhang f5ac8316c5 Use HostAddressOpt for opts that accept IP and hostnames
Some configuration options were accepting both IP addresses
and hostnames. Since there was no specific OSLO opt type to
support this, we were using ``StrOpt``. The change [1] that
added support for ``HostAddressOpt`` type was merged in Ocata
and became available for use with oslo version 3.22.

This patch changes the opt type of configuration options to use
this more relevant opt type - HostAddressOpt.

[1] I77bdb64b7e6e56ce761d76696bc4448a9bd325eb

Change-Id: Ib44dd37fb3e7d3478ba158c77d22f3c1006bd8c3
2017-03-25 15:10:57 +08:00
Zhenguo Niu b4e8c418a2 Split scheduler out of engine service
Change-Id: Ib57f295b0362e4fc17a3ff5bfb539830f6ac1875
2017-03-21 15:20:05 +08:00
Zhenguo Niu 2d26f7d39e Save node resources to DB
This tries to save available nodes resources to DB, but we still
use node cache for scheduling, will add following up patches to
finish to whole refactor.

Note: This also change to use node_type from ironic node instead
of instance_type.

Change-Id: Ic43180a8c85e36ef8e04edb2b99044b1d715cbd1
2017-03-15 17:45:50 +08:00
WosunOoO 8a0046c784 Add engine driver framework base driver.
Add BaseEngineDriver class, copy current ironic operations to
IronicDriver, modify mananger and base manger to separate driver
interface and manger.

Co-Authored-By: Zhenguo Niu <>

Change-Id: I1f503f925f24975a20ec5892b4aa107ae194fbca
Implements: blueprint engine-driver-framework
2017-03-08 22:34:27 +08:00
Zhenguo Niu 508b86f9b1 Add sync maintenance state periodic task
When ironic nodes go to maintenance state, we should move instance
to maintenance state as well.

Change-Id: Iced6535157668fb5cda9a0459272c13d3e8b3af5
2017-03-07 16:37:27 +08:00
Zhenguo Niu 2a0aae8468 Move quota opts to separated file
Currently we define quota opts in conf/, move it out to a
separated file to be more clear.

Change-Id: I23feb9b54b288b872446680c2abf9b8e27f31b87
2017-03-03 18:07:09 +08:00
wanghao b713fe2324 Quota support in Mogan(part 1)
Support quota features in Mogan.
This patch will introduce the basic concepts
of quota, including Quota, QuotaUsage, Reservation,

Change-Id: I654b3f60880d4ab817b1b457e47882be5adca831
Implements: bp quota-support
2017-03-02 14:59:47 +08:00
Tao Li 62a0f6d86a Support multi-instance creating (part 1)
Support to create multi-instance in one request of mogan.
This commit finish the main flows and leave some network check
for another commit.

Implements: bp support-multiple-creation

Change-Id: I24fcc94c8acfb8b351579a5a96eb129c7a59efbe
2017-02-15 09:32:01 +08:00
Zhenguo Niu 719efacd9d Add default_availability_zone config option
The option determines the availability zone to be used when it is
not specified in the baremetal node. default_schedule_zone is used
for scheduling when it is not specified in the instance creation
request, if it is not set, any node can pass the scheuling az filter.

We use 'nova' as the default value to avoid issues in cross projects

Change-Id: Ib8aee86ffc6c552891555fb553438ae65fc01b7a
2017-02-08 17:14:43 +08:00
Zhenguo Niu 9e7797e78f Weigh nodes by their ports quantity
The default is to preferably choose nodes with less ports.
If you prefer choosing more ports nodes, you can set the
'port_weight_multiplier' option to a positive number and
the weighing has the opposite effect of the default.

Change-Id: Ic936301a83658ebba5fb9a689505acb5a090aa71
2017-02-03 14:51:19 +08:00
Zhenguo Niu 0a0ffe2c4e Add ports scheduler filter
This filter will check whether the node ports satisfy the
specified networks requirements including ports quantity
and types.

Change-Id: I793a3a78d6c59ae4eb57dc6bdd49af4eef545820
2017-01-20 16:00:32 +08:00
Zhenguo Niu 0dfb378480 Save power_state to instance and sync with ironic
1. add power_state to instance
2. add a periodic task to sync power state

Change-Id: Id51927bf8d72884d67a73c6370458222dc061210
2017-01-19 00:25:17 +08:00
sxmatch 4fd1aab5b3 Rename nimble to mogan(part three)
This part includes codes folder renaming.

Co-Authored-By: Zhenguo Niu <>

Change-Id: I919f17a769baee44ce19f65bab900f9d6bd8b982
2017-01-04 22:53:39 +08:00