Browse Source

Merge "Track resources using Placement"

changes/67/489167/1
Jenkins 1 year ago
parent
commit
953ab6888e
1 changed files with 162 additions and 0 deletions
  1. 162
    0
      specs/pike/approved/track-resources-using-placement.rst

+ 162
- 0
specs/pike/approved/track-resources-using-placement.rst View File

@@ -0,0 +1,162 @@
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
+Track baremetal resources using Placement service
9
+=================================================
10
+
11
+https://blueprints.launchpad.net/mogan/+spec/track-resources-using-placement
12
+
13
+This spec proposes using placement service for baremetal resources tracking.
14
+The placement service is intended to enable more effective accounting of
15
+resources and better scheduling of various entities in the cloud.
16
+
17
+
18
+Problem description
19
+===================
20
+
21
+We'd like to be able to schedule not only based on baremetal node resources,
22
+but also other resources in the cloud like shared storage. So we need to move
23
+to this more generic modeling of quantitative and qualitative resources.
24
+
25
+Use Cases
26
+---------
27
+
28
+Cloud operators want to be able to add new classes of resources to the system
29
+with a generic model and do so without any downtime caused by database schema
30
+migrations.
31
+
32
+
33
+Proposed change
34
+===============
35
+
36
+* We will define new resource classes for each node accodring to what is in
37
+  the ironic node's `resource_class` attribute.
38
+
39
+* Generate the resource provider for each baremetal node to track the
40
+  resources, set provider's inventory to a single record of custom resource
41
+  class. The resource tracking model is as the following::
42
+
43
+    resource classes:               CUSTOM_GOLD                    CUSTOM_SILVER
44
+                                    /         \                          |
45
+    resource providers: baremetal_node1     baremetal_node2       baremetal_node2
46
+                               |                   |                     |
47
+    inventories:       {'CUSTOM_GOLD': 1}   {'CUSTOM_GOLD': 1}  {'CUSTOM_SILVER': 1}
48
+
49
+* As we consume baremetal nodes atomically not piecemeal, so the inventory data
50
+  for such resource provider should be as::
51
+
52
+    Inventory: {
53
+        "resource_provider_id": 1,
54
+        "resource_class_id": 10001,
55
+        "total": 1,
56
+        "reserved": 0,
57
+        "min_unit": 1,
58
+        "max_unit": 1,
59
+        "step_size": 1,
60
+        "allocation_ratio": 1.0
61
+    }
62
+
63
+* For **qualitative** aspects of the baremetal resources, the placement traits
64
+  is targeted to support this, we can use custom traits to define what the
65
+  resource provider's characteristics is.
66
+
67
+* Modify resource tracker to periodically report node resources to placement
68
+  service, which will also remove the orphan nodes.
69
+
70
+* Needs to change filter_scheduler to call placement REST API to get filtered
71
+  nodes like below::
72
+
73
+    GET /resource_providers?resources=CUSTOM_GOLD:1
74
+
75
+
76
+Alternatives
77
+------------
78
+
79
+None
80
+
81
+Data model impact
82
+-----------------
83
+
84
+This will remove ComputeNodes and ComputePorts objects.
85
+
86
+REST API impact
87
+---------------
88
+
89
+None
90
+
91
+Security impact
92
+---------------
93
+
94
+None
95
+
96
+Notifications impact
97
+--------------------
98
+
99
+None
100
+
101
+Other end user impact
102
+---------------------
103
+
104
+None
105
+
106
+Performance Impact
107
+------------------
108
+
109
+None
110
+
111
+Other deployer impact
112
+---------------------
113
+
114
+This will break all mogan deployments as we migrate resources tracking to
115
+another service, but as we don't have any release yet, so we suppose there's
116
+no mogan deployment.
117
+
118
+Developer impact
119
+----------------
120
+
121
+None
122
+
123
+Implementation
124
+==============
125
+
126
+Assignee(s)
127
+-----------
128
+
129
+Primary assignee:
130
+    liusheng
131
+
132
+Other contributors:
133
+    zhenguo
134
+
135
+Work Items
136
+----------
137
+
138
+* Add placement client and config options.
139
+* Update resource tracker to report resources to placement.
140
+* Adjust scheuler filters for such refactoring.
141
+* remove the compute_nodes and compute_ports resources objects.
142
+* Add UT and docs.
143
+
144
+Dependencies
145
+============
146
+
147
+None
148
+
149
+Testing
150
+=======
151
+
152
+Unit Testing will be added.
153
+
154
+Documentation Impact
155
+====================
156
+
157
+Docs about new flavor will be added.
158
+
159
+References
160
+==========
161
+
162
+None

Loading…
Cancel
Save