blob: 7c52a1d5013efd6ddccf14cc0621dacafe0bb6d1 [file] [log] [blame]
Alex41485522019-04-12 17:26:18 -05001<!DOCTYPE html>
2<html lang="en">
3<head>
4 <meta charset="UTF-8">
5 <title>Cloud Package versions check</title>
6 {% include 'common_styles.j2' %}
7 {% include 'common_scripts.j2' %}
8 <style>
9 td.repo {width: 3em; text-align: center; font-size: 0.7em; color: #113b11; font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;}
10 td.component, td.app, td.package_name {
11 font-size: 0.75em;
12 text-align: center;
13 color: #113b11;
14 font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
15 }
16
17 td.repo {column-width: 50px;}
18 td.component {column-width: 130px;}
19 td.app {column-width: 80px;}
20 td.package_name {column-width: 200px; padding-left: 10px; text-align: left;}
21 td.node_name {column-width: 210px;}
22 td.installed {column-width: 16%;}
23 td.status_container {column-width: 200px;}
24 td.candidate {column-width: 16%;}
25 td.release {column-width: 13%;}
26
27 .status_container {
28 display: inline-block;
29 }
30
31 .status {
32 display: block;
33 float: left;
34 width: 80px;
35 padding: 1px;
36 padding-left: 5px;
37 padding-right: 5px;
38 color: white;
39 background-color: #113b11;
40 text-align: center;
41 }
42 .action {
43 display: block;
44 float: left;
45 width: 120px;
46 padding: 1px;
47 padding-left: 5px;
48 padding-right: 5px;
49 color: gray;
50 background-color: #d4dad9;
51 text-align: center;
52 }
53
54 .status_container .ok {
55 color: white;
56 background-color: #113b11;
57 }
58 .status_container .error {
59 color: white;
60 background-color: darkred;
61 }
62 .status_container .upgraded {
63 color: azure;
64 background-color: green;
65 }
66 .status_container .downgraded {
67 color: white;
68 background-color: darkolivegreen;
69 }
70
71 .status_container .needs_repo {
72 color: black;
73 background-color: #50aacc;
74 }
75
76 .status_container .needs_up {
77 color: black;
78 background-color: #aaccaa;
79 }
80
81 .status_container .needs_down {
82 color: black;
83 background-color: #ffcc48;
84 }
85
86 .status_container .possible {
87 color: gray;
88 background-color: #d4dad9;
89 }
90
Alexfa3b0f22019-04-17 16:15:27 -050091 .status_container .text {
92 width: 500px;
93 font-size: 1em;
94 padding-left: 10px;
95 line-height: 20px;
96 }
97
Alex41485522019-04-12 17:26:18 -050098
99
100 .version {text-align: left; padding: 2px}
101 .v_epoch, .v_upstream, .v_debian, .colon, .dash {
102 color: darkslategray;
103 float: left;
104 display: block;
105 }
106
107 .ok {color: darkslategray;}
108 .error {color: white; background-color: darkred;}
109 .upgraded {color: whitesmoke; background-color: darkslategray;}
110 .downgraded {color: red;}
111
112 .smallgreytext {float: right; font-size: 0.5em; color: gray;}
113
114 /* Table specific */
115 .nodes tr:nth-child(even) {
116 background-color: #fff;
117 }
118 .nodes tr:nth-child(odd) {
119 background-color: #d4dad9;
120
121 }
122 </style>
123</head>
124<body onload="init()">
125
126<div class="header">
127 <div class="label">OpenStack release:</div>
128 <div class="text">{{ openstack_release }}</div>
129 <div class="label">MCP Version:</div>
130 <div class="text">{{ mcp_release }}</div>
131 <div class="label date">generated on: {{ gen_date }}</div>
132</div>
133
134<div class="bar">
135 <button class="bar-item" onclick="openBar(event, 'mirantis')">Mirantis</button>
136 <button class="bar-item" onclick="openBar(event, 'system')">System</button>
137 <button class="bar-item" onclick="openBar(event, 'other')">Other</button>
138 <button class="bar-item" onclick="openBar(event, 'unlisted')">Unlisted</button>
139 <button class="bar-item" onclick="openBar(event, 'legend')">Legend</button>
140</div>
141
142{% macro prettify_version(v) %}
143 <div class="version">
144 {% if v.epoch %}
145 <div class="v_epoch {{ v.epoch_status | make_status_class }}">{{ v.epoch }}</div>
146 <div class="colon">:</div>
147 {% endif %}
148 <div class="v_upstream {{ v.upstream_status | make_status_class }}">{{ v.upstream }}{{ v.upstream_rev }}</div>
149 {% if v.debian %}
150 <div class="dash">-</div>
151 <div class="v_debian {{ v.debian_status | make_status_class }}">{{ v.debian }}{{ v.debian_rev }}</div>
152 {% endif %}
153 {{ caller() }}
154 </div>
155{% endmacro %}
156
157{% macro render_package(pkg_name, dat, status_shown, action_shown, id_label) %}
158 <tr onclick="toggleClassByID('{{ id_label }}_{{ pkg_name }}_{{ status_shown }}_{{ action_shown }}')" id="{{ id_label }}_{{ pkg_name }}_{{ status_shown }}_{{ action_shown }}_button">
159 <td class="repo">{{ dat['desc']['repo'] }}</td>
160 <td class="component">{{ dat['desc']['component'] }}</td>
161 <td class="app">{{ dat['desc']['app'] }}</td>
162 <td class="package_name">{{ pkg_name }}</td>
163 <td class="status_container" colspan="3">
164 <div class="status {{ status_shown | make_status_class }}">{{ status_shown | make_status_label }}</div>
165 {% if action_shown | make_action_label %}
166 <div class="action {{ action_shown | make_action_class }}">{{ action_shown | make_action_label }}</div>
167 {% endif %}
168 </td>
169 </tr>
170 <tr class="collapsable" id="{{ id_label }}_{{ pkg_name }}_{{ status_shown }}_{{ action_shown }}"><td colspan="7">
171 <table class="nodes"><tbody>
172 {% for status in dat['results'].keys() | sort(reverse=true) %}
173 {% for action in dat['results'][status].keys() | sort(reverse=true) %}
174 {% set counter = 1 + loop.index0 %}
175 {% for node in dat['results'][status][action].keys() | sort %}
176 {% set n_counter = 1 + loop.index0 %}
177 {% set nd = dat['results'][status][action][node] %}
178 <tr>
179 <td class="repo">{{ n_counter }}</td>
180 <td class="node_name">{{ node }}</td>
181 <td class="status_container">
182 <div class="status {{ status | make_status_class }}">{{ status | make_status_label }}</div>
183 {% if action | make_action_label %}
184 <div class="action {{ action | make_action_class }}">{{ action | make_action_label }}</div>
185 {% endif %}
186 </td>
187 <td class="installed">
188 <div class="tooltip">
189 {% call prettify_version(nd['i']) %}
190 <pre class="tooltiptext">{{ nd['raw'] | linebreaks }}</pre>
191 {% endcall %}
192 </div>
193 </td>
194 <td class="candidate">{{ nd['c'].version }}</td>
195 <td class="release">{{ dat['r'].version }}</td>
196 </tr>
197 {% endfor %}
198 {% endfor %}
199 {% endfor %}
200 </tbody></table>
201 </td></tr>
202 {{ caller() }}
203{% endmacro %}
204
205{% macro package_table(pkg_dict, id_label) %}
206<div id="{{ id_label }}" class="barcontent">
207 <h5>{{ caller() }}</h5>
208 <table class="pkgversions">
209 <tbody>
210 <tr>
211 <td class="table_header" width="50px">repo</td>
212 <td class="table_header" width="130px">Component</td>
213 <td class="table_header" width="80px">App</td>
214 <td class="table_header" width="200px">Package name</td>
215 <td class="table_header">Installed</td>
216 <td class="table_header">Candidate</td>
217 <td class="table_header">Release</td>
218 </tr>
219 <!-- Print errors -->
220 <tr><td colspan="7">Errors ({{ errors[id_label] }})</td></tr>
221 {% for pkg_name in pkg_dict | get_sorted_keys %}
222 {% set dat = pkg_dict[pkg_name] %}
223 {% if status_err in dat['results'] %}
224 {% set action_to_show = dat['results'][status_err].keys() | get_max %}
225 {% call render_package(pkg_name, dat, status_err, action_to_show, id_label) %}
226 {% endcall %}
227 {% endif%}
228 {% endfor %}
229 {% if not errors[id_label] %}
230 <tr><td class="note" colspan="7">no errors found </td></tr>
231 {% endif %}
232
233 <!-- Print downgrades -->
234 <tr><td colspan="7">Downgrades ({{ downgrades[id_label] }})</td></tr>
235 {% for pkg_name in pkg_dict | get_sorted_keys %}
236 {% set dat = pkg_dict[pkg_name] %}
237 {% if status_down in dat['results'] %}
238 {% set action_to_show = dat['results'][status_down].keys() | get_max %}
239 {% call render_package(pkg_name, dat, status_down, action_to_show, id_label) %}
240 {% endcall %}
241 {% endif %}
242 {% endfor %}
243 {% if not downgrades[id_label] %}
244 <tr><td class="note" colspan="7">no downgrades found</td></tr>
245 {% endif %}
246
247 <!-- Print all other -->
248 <tr><td colspan="7">All others</td></tr>
249 {% for pkg_name in pkg_dict | get_sorted_keys %}
250 {% set dat = pkg_dict[pkg_name] %}
251 {% set status_to_show = dat['results'].keys() | get_max %}
252 {% set action_to_show = dat['results'][status_to_show].keys() | get_max %}
253 {% if status_err != status_to_show and status_down != status_to_show %}
254 {% call render_package(pkg_name, dat, status_to_show, action_to_show, id_label) %}
255 {% endcall %}
256 {% endif %}
257 {% endfor %}
258 </tbody>
259 </table>
260</div>
261{%- endmacro %}
262
263<!-- Mirantis packages which version is critical for functionality -->
264{% call package_table(critical, "mirantis") %}
265 Packages maintained and updated by Mirantis
266{% endcall %}
267
268<!-- System labeled packages-->
269{% call package_table(system, "system") %}
270 System packages which versions are critical to proper cloud function
271{%- endcall %}
272
273<!-- Other packages -->
274{% call package_table(other, "other") %}
275 Packages with no description or not critical
276{%- endcall %}
277
278{% call package_table(unlisted, "unlisted") %}
279 Packages that are not listed in version map. I.e. unexpected on the environment
280{%- endcall %}
281
282<!-- Legend -->
283<div id="legend" class="barcontent">
Alexfa3b0f22019-04-17 16:15:27 -0500284 <table width="100%"><tbody>
285 <tr>
286 <td width="50%"><h5>Version status desctiptions</h5></td>
287 <td width="50%"><h5>Action descriptions</h5></td>
288 </tr>
289
290 <tr>
291 <td width="50%">
292 <div class="status_container">
293 <div class="status {{ cs.ok | make_status_class }}">{{ cs.ok | make_status_label }}</div>
294 <div class="text">Installed and Candidate epoch:upstream version mach</div>
295 </div>
296 </td>
297 <td width="50%">
298 <div class="status_container">
299 <div class="action {{ ca.na | make_action_class }}">{{ ca.na | make_action_label }} (no action)</div>
300 <div class="text">No action suggested</div>
301 </div>
302 </td>
303 </tr>
304 <tr>
305 <td width="50%">
306 <div class="status_container">
307 <div class="status {{ cs.up | make_status_class }}">{{ cs.up | make_status_label }}</div>
308 <div class="text">Installed version is newer that the one found in Repo (i.e. candidate) or Release notes recordset</div>
309 </div>
310 </td>
311 <td width="50%">
312 <div class="status_container">
313 <div class="action {{ ca.up | make_action_class }}">{{ ca.up | make_action_label }}</div>
314 <div class="text">There is an upgrade possible for the package. But it is not strictly required action</div>
315 </div>
316 </td>
317 </tr>
318 <tr>
319 <td width="50%">
320 <div class="status_container">
321 <div class="status {{ cs.down | make_status_class }}">{{ cs.down | make_status_label }}</div>
322 <div class="text">Installed version is older that the one found in Repo (i.e. candidate) or Release notes recordset</div>
323 </div>
324 </td>
325 <td width="50%">
326 <div class="status_container">
327 <div class="action {{ ca.need_up | make_action_class }}">{{ ca.need_up | make_action_label }}</div>
328 <div class="text">Package should be upgraded to match version either in repo or in Release notes</div>
329 </div>
330 </td>
331 </tr>
332 <tr>
333 <td width="50%">
334 <div class="status_container">
335 <div class="status {{ cs.err | make_status_class }}">{{ cs.err | make_status_label }}</div>
336 <div class="text">Installed version conflicts with a combination of Candidate and Release notes versions</div>
337 </div>
338 </td>
339 <td width="50%">
340 <div class="status_container">
341 <div class="action {{ ca.need_down | make_action_class }}">{{ ca.need_down | make_action_label }}</div>
342 <div class="text">Package should be downgraded to match version either in repo or in Release notes</div>
343 </div>
344 </td>
345 </tr>
346 <tr>
347 <td width="50%">
348 </td>
349 <td width="50%">
350 <div class="status_container">
351 <div class="action {{ ca.repo | make_action_class }}">{{ ca.repo | make_action_label }}</div>
352 <div class="text">Repo that is configured on the target node contains invalid version and should be updated</div>
353 </div>
354 </td>
355 </tr>
356 </tbody></table>
357 <hr>
358 <h5>Versions status and Action combinations</h5>
359 <div class="status_container">
360 <div class="status {{ cs.ok | make_status_class }}">{{ cs.ok | make_status_label }}</div>
361 <div class="action {{ ca.na | make_action_class }}">{{ ca.na | make_action_label }} (no action)</div>
362 <div class="text">All versions are inline with each other</div>
363 </div>
364 <div class="status_container">
365 <div class="status {{ cs.up | make_status_class }}">{{ cs.up | make_status_label }}</div>
366 <div class="action {{ ca.na | make_action_class }}">{{ ca.na | make_action_label }} (no action)</div>
367 <div class="text">Installed version is newer that Cadidate, Release version - unknown or not tracked</div>
368 </div>
369 <div class="status_container">
370 <div class="status {{ cs.ok | make_status_class }}">{{ cs.ok | make_status_label }}</div>
371 <div class="action {{ ca.up | make_action_class }}">{{ ca.up | make_action_label }}</div>
372 <div class="text">Installed version is equal to Release, but there is newer in the repo</div>
373 </div>
374 <div class="status_container">
375 <div class="status {{ cs.up | make_status_class }}">{{ cs.up | make_status_label }}</div>
376 <div class="action {{ ca.up | make_action_class }}">{{ ca.up | make_action_label }}</div>
377 <div class="text">Installed version is newer than Release, and there is even newer in the repo</div>
378 </div>
379 <div class="status_container">
380 <div class="status {{ cs.err | make_status_class }}">{{ cs.err | make_status_label }}</div>
381 <div class="action {{ ca.need_up | make_action_class }}">{{ ca.need_up | make_action_label }}</div>
382 <div class="text">Installed version is older than Candidate and Release versions and must be upgraded</div>
383 </div>
384 <div class="status_container">
385 <div class="status {{ cs.err | make_status_class }}">{{ cs.err | make_status_label }}</div>
386 <div class="action {{ ca.need_down | make_action_class }}">{{ ca.need_down | make_action_label }}</div>
387 <div class="text">Unknown version installed, Release and Candidate versions are older</div>
388 </div>
389 <div class="status_container">
390 <div class="status {{ cs.err | make_status_class }}">{{ cs.err | make_status_label }}</div>
391 <div class="action {{ ca.repo | make_action_class }}">{{ ca.repo | make_action_label }}</div>
392 <div class="text">Installed and Candidate versions is older than release and repo must be updated</div>
393 </div>
394
395 <div class="status_container">
396 <div class="status {{ cs.up | make_status_class }}">{{ cs.up | make_status_label }}</div>
397 <div class="action {{ ca.repo | make_action_class }}">{{ ca.repo | make_action_label }}</div>
398 <div class="text">Candidate version in repo is older vs Release and both older vs Installed</div>
399 </div>
400 <div class="status_container">
401 <div class="status {{ cs.ok | make_status_class }}">{{ cs.ok | make_status_label }}</div>
402 <div class="action {{ ca.repo | make_action_class }}">{{ ca.repo | make_action_label }}</div>
403 <div class="text">Candidate version in Repo is older vs release, but release version installed</div>
404 </div>
405
406 <div class="status_container">
407 <div class="status {{ cs.down | make_status_class }}">{{ cs.down | make_status_label }}</div>
408 <div class="action {{ ca.repo | make_action_class }}">{{ ca.repo | make_action_label }}</div>
409 <div class="text">Both Candidate in repo and Installed older vs release</div>
410 </div>
411 <div class="status_container">
412
413 <div class="text"></div>
414 </div>
415
Alex41485522019-04-12 17:26:18 -0500416</div>
417</body>
418</html>