Browse Source

Merge "Add server group support"

Jenkins 1 year ago
parent
commit
b7d49032f4
1 changed files with 193 additions and 0 deletions
  1. 193
    0
      specs/pike/approved/server-group-api-extension.rst

+ 193
- 0
specs/pike/approved/server-group-api-extension.rst View File

@@ -0,0 +1,193 @@
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
+Server Group
9
+============
10
+
11
+https://blueprints.launchpad.net/mogan/+spec/server-group-api-extension
12
+
13
+This spec proposes adding server group support to mogan. It's quite like
14
+nova's server groups, but nova only support *host* based affinity or
15
+anti-affinity, which is not fit for bare metals.
16
+
17
+
18
+Problem description
19
+===================
20
+
21
+Currently, it is not possible to schedule some servers to the same or
22
+different location or group like what nova server group does for virtual
23
+machines.
24
+
25
+Use Cases
26
+---------
27
+
28
+* As a tenant, I would like to schedule servers on the same group of bare metal
29
+  nodes.
30
+
31
+* As a tenant, I would like to schedule servers on the different group of bare
32
+  metal nodes.
33
+
34
+Proposed change
35
+===============
36
+
37
+We proposes to add a special aggregate metadata key *affinity_zone*. You may
38
+define it as failure domains(e.g., by power circuit, rack, room, etc), or
39
+whatever you want to make affinity and anity-affinity happen in such groups.
40
+All bare metals nodes are in a same affinity zone by default.
41
+
42
+* A new mogan.objects.ServerGroup object would be added to the object model.
43
+
44
+* Add a set of APIs to allow tenants manage the server groups, including
45
+  create, delete, show and list APIs.
46
+
47
+* Allow users to specify server group when claiming servers.
48
+
49
+* Add logic to scheduler to check the server group plicy and members affinity
50
+  relationship to filter nodes.
51
+
52
+Alternatives
53
+------------
54
+
55
+None
56
+
57
+Data model impact
58
+-----------------
59
+
60
+The proposed change will be adding the following fields to the server group
61
+object with their data type and default value for migrations.
62
+
63
++-----------------------+--------------+-----------------+
64
+| Field Name            | Field Type   | Default Value   |
65
++=======================+==============+=================+
66
+| id                    | Integer      | None            |
67
++-----------------------+--------------+-----------------+
68
+| uuid                  | UUID         | None            |
69
++-----------------------+--------------+-----------------+
70
+| user_id               | UUID         | None            |
71
++-----------------------+--------------+-----------------+
72
+| project_id            | UUID         | None            |
73
++-----------------------+--------------+-----------------+
74
+| name                  | String       | None            |
75
++-----------------------+--------------+-----------------+
76
+| policies              | ListOfString | None            |
77
++-----------------------+--------------+-----------------+
78
+| members               | ListOfString | None            |
79
++-----------------------+--------------+-----------------+
80
+
81
+REST API impact
82
+---------------
83
+
84
+REST API will be changed as part of this change.
85
+
86
+- To create a new server group, a user will::
87
+
88
+    POST /v1/server_groups
89
+
90
+  With a body containing the JSON description of the server group.
91
+
92
+  JSON Schema::
93
+
94
+    {
95
+        "type": "object",
96
+        "properties": {
97
+            'name': {'type': 'string', 'minLength': 1, 'maxLength': 255},
98
+            'policies': {
99
+                'type': 'array',
100
+                'items': [{
101
+                    'type': 'string',
102
+                    'enum': ['anti-affinity', 'affinity']}],
103
+                'uniqueItems': True,
104
+                'additionalItems': False,
105
+            },
106
+        },
107
+        'required': ['name', 'policies'],
108
+        'additionalProperties': False,
109
+    }
110
+
111
+- To list server groups, a user will::
112
+
113
+    GET /v1/server_groups
114
+
115
+- To show server group details, a user will::
116
+
117
+    GET /v1/server_groups/{servergroup_id}
118
+
119
+- To delete a server group, a user will::
120
+
121
+    DELETE /v1/server_groups/{servergroup_id}
122
+
123
+Security impact
124
+---------------
125
+
126
+None
127
+
128
+Notifications impact
129
+--------------------
130
+
131
+None
132
+
133
+Other end user impact
134
+---------------------
135
+
136
+None
137
+
138
+Performance Impact
139
+------------------
140
+
141
+None
142
+
143
+Other deployer impact
144
+---------------------
145
+
146
+None
147
+
148
+Developer impact
149
+----------------
150
+
151
+None
152
+
153
+Implementation
154
+==============
155
+
156
+Assignee(s)
157
+-----------
158
+
159
+Primary assignee:
160
+  liusheng
161
+
162
+Other contributors:
163
+  zhenguo
164
+
165
+Work Items
166
+----------
167
+
168
+* Add server group object with the proposed fields.
169
+* Add REST API to support server group management.
170
+* Change scheduler to consider the specified server group.
171
+* Allow users to specify server group when claiming servers.
172
+* Change CLI to support server group management.
173
+* Add UT and docs.
174
+
175
+Dependencies
176
+============
177
+
178
+None
179
+
180
+Testing
181
+=======
182
+
183
+Unit Testing will be added.
184
+
185
+Documentation Impact
186
+====================
187
+
188
+Docs about server groups will be added.
189
+
190
+References
191
+==========
192
+
193
+None

Loading…
Cancel
Save