Browse Source

Merge "Manage existing nodes in Mogan"

Jenkins 1 year ago
parent
commit
1e36a74701
1 changed files with 205 additions and 0 deletions
  1. 205
    0
      specs/pike/approved/manage-existing-bms.rst

+ 205
- 0
specs/pike/approved/manage-existing-bms.rst View File

@@ -0,0 +1,205 @@
1
+..
2
+ This work is licensed under a Creative Commons Attribution 3.0 Unported
3
+ License.
4
+
5
+ http://creativecommons.org/licenses/by/3.0/legalcode
6
+
7
+===================
8
+Manage Existing BMs
9
+===================
10
+
11
+https://blueprints.launchpad.net/mogan/+spec/manage-existing-bms
12
+
13
+This spec is intended to allow mogan to manage nodes that migrated to ironic
14
+by operators.
15
+
16
+Problem description
17
+===================
18
+
19
+At present the mogan API can only allow create new servers from nodes
20
+in available state, there's no way to manage nodes in active which migrated
21
+to ironic by operators.
22
+
23
+For an operator of multiple infrastructures, it's reasonable to permit an
24
+operator to migrate running baremtal nodes from one "system" to another
25
+"system".
26
+
27
+Use Cases
28
+---------
29
+
30
+* As an operator of hybrid infrastructures, I want to migrate running nodes
31
+  to OpenStack cloud.
32
+
33
+* As an operator of multiple distinct OpenStack infrastructures, I want to
34
+  migrate running nodes from one OpenStack to another.
35
+
36
+
37
+Proposed change
38
+===============
39
+
40
+*  Introduce a new admin only API, which supports to query nodes that could
41
+   be managed by mogan. This API will pass down the request to drivers, which
42
+   needs to add a new driver interface `list_adoptable_nodes`, there will be
43
+   driver specified criterias of which nodes are manageable. For ironic, it
44
+   should be nodes in active state but without instance_uuid associated, and
45
+   the resource class field should be well set.
46
+
47
+*  Introduce a new API for managing running baremtal nodes listed by the above
48
+   API. This needs to add a new workflow which will skip schduling comparing
49
+   with server create workflow.
50
+
51
+*  We will collect the image, network information from the adoptable nodes, and
52
+   will check if the resource existing in glance and neutron. For images, it
53
+   will be None if we can't find it, but for neutron port, it should be a must
54
+   when determine wheter the node can be managed.
55
+
56
+
57
+Alternatives
58
+------------
59
+
60
+None
61
+
62
+Data model impact
63
+-----------------
64
+
65
+None
66
+
67
+
68
+REST API impact
69
+---------------
70
+
71
+#. Add a new custom action named 'manage' in ServerController, of course
72
+   it is a admin only API::
73
+
74
+    _custom_actions = {
75
+         'manage': ['POST']
76
+    }
77
+
78
+#. The management API schema is like this::
79
+
80
+    manage_server = {
81
+     "type": "object",
82
+     "properties": {
83
+         'name': {'type': 'string', 'minLength': 1, 'maxLength': 255},
84
+         'description': {'type': 'string', 'minLength': 1, 'maxLength': 255},
85
+         'availability_zone': {'type': 'string', 'minLength': 1,
86
+                               'maxLength': 255},
87
+         'node_uuid': {'type': 'string', 'format': 'uuid'},
88
+         'flavor_uuid': {'type': 'string', 'format': 'uuid'},
89
+         'networks': {
90
+             'type': 'array', 'minItems': 1,
91
+             'items': {
92
+                 'type': 'object',
93
+                 'properties': {
94
+                     'port_type': {'type': 'string', 'minLength': 1,
95
+                                   'maxLength': 255},
96
+                     'port_id': {'type': 'string', 'format': 'uuid'},
97
+                 },
98
+                 'required': ['port_id'],
99
+                 'additionalProperties': False,
100
+             },
101
+         },
102
+     },
103
+     'required': ['name', 'node_uuid', 'flavor_uuid', 'networks'],
104
+     'additionalProperties': False,
105
+    }
106
+
107
+#. Add a new API that will list adoptable nodes which will include all needed
108
+   informations when calling manage API. It may look like this::
109
+
110
+   {
111
+    "adoptable_nodes": [
112
+        {
113
+            "name": "test_server",
114
+            "ports": [
115
+                {
116
+                    "uuid": "6d85703a-565d-469a-96ce-30b6de53079d",
117
+                    "vif_port_id": "12345678-1234-1234-1234-123456789012",
118
+                    "href": "http://127.0.0.1:6385/v1/nodes/6d85703a-565d-469a-96ce-30b6de53079d/ports",
119
+                    "rel": "self"
120
+                },
121
+                {
122
+                    "uuid": "6d85703a-565d-469a-96ce-30b6de53079d",
123
+                    "vif_port_id": "12345678-1234-1234-1234-123456789013",
124
+                    "href": "http://127.0.0.1:6385/nodes/6d85703a-565d-469a-96ce-30b6de53079d/ports",
125
+                    "rel": "bookmark"
126
+                }
127
+                     ],
128
+            "power_state": "power on",
129
+            "provision_state": "active",
130
+            "created_at": "2016-10-17T04:12:44+00:00",
131
+            "uuid": "f978ef48-d4af-4dad-beec-e6174309bc71",
132
+            "properties": {},
133
+            "instance_info": {},
134
+            "resource_class": 'gold',
135
+        }
136
+    ]
137
+   }
138
+
139
+
140
+Security impact
141
+---------------
142
+
143
+None
144
+
145
+Notifications impact
146
+--------------------
147
+
148
+Notification about the adopt action will be added.
149
+
150
+Other end user impact
151
+---------------------
152
+
153
+None
154
+
155
+Performance Impact
156
+------------------
157
+
158
+None
159
+
160
+Other deployer impact
161
+---------------------
162
+
163
+None
164
+
165
+Developer impact
166
+----------------
167
+
168
+Other drivers will raise NotImplement exception if not add such interface.
169
+
170
+
171
+Implementation
172
+==============
173
+
174
+Assignee(s)
175
+-----------
176
+
177
+Primary assignee:
178
+  wanghao <sxmatch1986@gmail.com>
179
+
180
+Work Items
181
+----------
182
+
183
+* Add new APIs.
184
+* Add a new taskflow for server managing.
185
+
186
+Dependencies
187
+============
188
+
189
+None
190
+
191
+Testing
192
+=======
193
+
194
+Unit Testing will be added.
195
+
196
+Documentation Impact
197
+====================
198
+
199
+Docs about adopt/manage servers will be added, including the preparation work
200
+for operator.
201
+
202
+References
203
+==========
204
+
205
+None

Loading…
Cancel
Save