/usr/share/doc/ganeti/html/design-oob.html is in ganeti-doc 2.16.0~rc2-1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Ganeti Node OOB Management Framework — Ganeti 2.16.0~rc2 documentation</title>
<link rel="stylesheet" href="_static/style.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '2.16.0~rc2',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Support for Open vSwitch" href="design-openvswitch.html" />
<link rel="prev" title="Improvements of Node Security" href="design-node-security.html" />
</head>
<body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="design-openvswitch.html" title="Support for Open vSwitch"
accesskey="N">next</a></li>
<li class="right" >
<a href="design-node-security.html" title="Improvements of Node Security"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">Ganeti 2.16.0~rc2 documentation</a> »</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="ganeti-node-oob-management-framework">
<h1>Ganeti Node OOB Management Framework<a class="headerlink" href="#ganeti-node-oob-management-framework" title="Permalink to this headline">¶</a></h1>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Created:</th><td class="field-body">2010-Nov-04</td>
</tr>
<tr class="field-even field"><th class="field-name">Status:</th><td class="field-body">Implemented</td>
</tr>
<tr class="field-odd field"><th class="field-name">Ganeti-Version:</th><td class="field-body">2.4.0</td>
</tr>
</tbody>
</table>
<div class="section" id="objective">
<h2>Objective<a class="headerlink" href="#objective" title="Permalink to this headline">¶</a></h2>
<p>Extend Ganeti with Out of Band (<a class="reference internal" href="glossary.html#term-oob"><span class="xref std std-term">OOB</span></a>) Cluster Node Management
Capabilities.</p>
</div>
<div class="section" id="background">
<h2>Background<a class="headerlink" href="#background" title="Permalink to this headline">¶</a></h2>
<p>Ganeti currently has no support for Out of Band management of the nodes
in a cluster. It relies on the OS running on the nodes and has therefore
limited possibilities when the OS is not responding. The command
<code class="docutils literal"><span class="pre">gnt-node</span> <span class="pre">powercycle</span></code> can be issued to attempt a reboot of a node that
crashed but there are no means to power a node off and power it back
on. Supporting this is very handy in the following situations:</p>
<blockquote>
<div><ul class="simple">
<li><strong>Emergency Power Off</strong>: During emergencies, time is critical and
manual tasks just add latency which can be avoided through
automation. If a server room overheats, halting the OS on the nodes
is not enough. The nodes need to be powered off cleanly to prevent
damage to equipment.</li>
<li><strong>Repairs</strong>: In most cases, repairing a node means that the node has
to be powered off.</li>
<li><strong>Crashes</strong>: Software bugs may crash a node. Having an OS
independent way to power-cycle a node helps to recover the node
without human intervention.</li>
</ul>
</div></blockquote>
</div>
<div class="section" id="overview">
<h2>Overview<a class="headerlink" href="#overview" title="Permalink to this headline">¶</a></h2>
<p>Ganeti will be extended with OOB capabilities through adding a new
<strong>Cluster Parameter</strong> (<code class="docutils literal"><span class="pre">--oob-program</span></code>), a new <strong>Node Property</strong>
(<code class="docutils literal"><span class="pre">--oob-program</span></code>), a new <strong>Node State (powered)</strong> and support in
<code class="docutils literal"><span class="pre">gnt-node</span></code> for invoking an <strong>External Helper Command</strong> which executes
the actual OOB command (<code class="docutils literal"><span class="pre">gnt-node</span> <span class="pre"><command></span> <span class="pre">nodename</span> <span class="pre">...</span></code>). The
supported commands are: <code class="docutils literal"><span class="pre">power</span> <span class="pre">on</span></code>, <code class="docutils literal"><span class="pre">power</span> <span class="pre">off</span></code>, <code class="docutils literal"><span class="pre">power</span> <span class="pre">cycle</span></code>,
<code class="docutils literal"><span class="pre">power</span> <span class="pre">status</span></code> and <code class="docutils literal"><span class="pre">health</span></code>.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">The new <strong>Node State (powered)</strong> is a <strong>State of Record</strong>
(<a class="reference internal" href="glossary.html#term-sor"><span class="xref std std-term">SoR</span></a>), not a <strong>State of World</strong> (<a class="reference internal" href="glossary.html#term-sow"><span class="xref std std-term">SoW</span></a>). The maximum
execution time of the <strong>External Helper Command</strong> will be limited to
60s to prevent the cluster from getting locked for an undefined amount
of time.</p>
</div>
</div>
<div class="section" id="detailed-design">
<h2>Detailed Design<a class="headerlink" href="#detailed-design" title="Permalink to this headline">¶</a></h2>
<div class="section" id="new-gnt-cluster-parameter">
<h3>New <code class="docutils literal"><span class="pre">gnt-cluster</span></code> Parameter<a class="headerlink" href="#new-gnt-cluster-parameter" title="Permalink to this headline">¶</a></h3>
<div class="line-block">
<div class="line">Program: <code class="docutils literal"><span class="pre">gnt-cluster</span></code></div>
<div class="line">Command: <code class="docutils literal"><span class="pre">modify|init</span></code></div>
<div class="line">Parameters: <code class="docutils literal"><span class="pre">--oob-program</span></code></div>
<div class="line">Options: <code class="docutils literal"><span class="pre">--oob-program</span></code>: executable OOB program (absolute path)</div>
</div>
</div>
<div class="section" id="new-gnt-cluster-epo-command">
<h3>New <code class="docutils literal"><span class="pre">gnt-cluster</span> <span class="pre">epo</span></code> Command<a class="headerlink" href="#new-gnt-cluster-epo-command" title="Permalink to this headline">¶</a></h3>
<div class="line-block">
<div class="line">Program: <code class="docutils literal"><span class="pre">gnt-cluster</span></code></div>
<div class="line">Command: <code class="docutils literal"><span class="pre">epo</span></code></div>
<div class="line">Parameter: <code class="docutils literal"><span class="pre">--on</span></code> <code class="docutils literal"><span class="pre">--force</span></code> <code class="docutils literal"><span class="pre">--groups</span></code> <code class="docutils literal"><span class="pre">--all</span></code></div>
<div class="line">Options: <code class="docutils literal"><span class="pre">--on</span></code>: By default epo turns off, with <code class="docutils literal"><span class="pre">--on</span></code> it tries to get the</div>
<div class="line-block">
<div class="line-block">
<div class="line">cluster back online</div>
</div>
<div class="line"><code class="docutils literal"><span class="pre">--force</span></code>: To force the operation without asking for confirmation</div>
<div class="line"><code class="docutils literal"><span class="pre">--groups</span></code>: To operate on groups instead of nodes</div>
<div class="line"><code class="docutils literal"><span class="pre">--all</span></code>: To operate on the whole cluster</div>
</div>
</div>
<p>This is a convenience command to allow easy emergency power off of a
whole cluster or part of it. It takes care of all steps needed to get
the cluster into a sane state to turn off the nodes.</p>
<p>With <code class="docutils literal"><span class="pre">--on</span></code> it does the reverse and tries to bring the rest of the
cluster back to life.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">The master node is not able to shut itself cleanly down. Therefore,
this command will not do all the work on single node clusters. On
multi node clusters the command tries to find another master or if
that is not possible prepares everything to the point where the user
has to shutdown the master node itself alone this applies also to the
single node cluster configuration.</p>
</div>
</div>
<div class="section" id="new-gnt-node-property">
<h3>New <code class="docutils literal"><span class="pre">gnt-node</span></code> Property<a class="headerlink" href="#new-gnt-node-property" title="Permalink to this headline">¶</a></h3>
<div class="line-block">
<div class="line">Program: <code class="docutils literal"><span class="pre">gnt-node</span></code></div>
<div class="line">Command: <code class="docutils literal"><span class="pre">modify|add</span></code></div>
<div class="line">Parameters: <code class="docutils literal"><span class="pre">--oob-program</span></code></div>
<div class="line">Options: <code class="docutils literal"><span class="pre">--oob-program</span></code>: executable OOB program (absolute path)</div>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">If <code class="docutils literal"><span class="pre">--oob-program</span></code> is set to <code class="docutils literal"><span class="pre">!</span></code> then the node has no OOB
capabilities. Otherwise, we will inherit the node group respectively
the cluster wide value. I.e. the nodes have to opt out from OOB
capabilities.</p>
</div>
</div>
<div class="section" id="addition-to-gnt-cluster-verify">
<h3>Addition to <code class="docutils literal"><span class="pre">gnt-cluster</span> <span class="pre">verify</span></code><a class="headerlink" href="#addition-to-gnt-cluster-verify" title="Permalink to this headline">¶</a></h3>
<div class="line-block">
<div class="line">Program: <code class="docutils literal"><span class="pre">gnt-cluster</span></code></div>
<div class="line">Command: <code class="docutils literal"><span class="pre">verify</span></code></div>
<div class="line">Parameter: None</div>
<div class="line">Option: None</div>
<div class="line">Additional Checks:</div>
</div>
<blockquote>
<div><ol class="arabic simple">
<li>existence and execution flag of OOB program on all Master
Candidates if the cluster parameter <code class="docutils literal"><span class="pre">--oob-program</span></code> is set or at
least one node has the property <code class="docutils literal"><span class="pre">--oob-program</span></code> set. The OOB
helper is just invoked on the master</li>
<li>check if node state powered matches actual power state of the
machine for those nodes where <code class="docutils literal"><span class="pre">--oob-program</span></code> is set</li>
</ol>
</div></blockquote>
</div>
<div class="section" id="new-node-state">
<h3>New Node State<a class="headerlink" href="#new-node-state" title="Permalink to this headline">¶</a></h3>
<p>Ganeti supports the following two boolean states related to the nodes:</p>
<dl class="docutils">
<dt><strong>drained</strong></dt>
<dd>The cluster still communicates with drained nodes but excludes them
from allocation operations</dd>
<dt><strong>offline</strong></dt>
<dd>if offline, the cluster does not communicate with offline nodes;
useful for nodes that are not reachable in order to avoid delays</dd>
</dl>
<p>And will extend this list with the following boolean state:</p>
<dl class="docutils">
<dt><strong>powered</strong></dt>
<dd>if not powered, the cluster does not communicate with not powered
nodes if the node property <code class="docutils literal"><span class="pre">--oob-program</span></code> is not set, the state
powered is not displayed</dd>
</dl>
<p>Additionally modify the meaning of the offline state as follows:</p>
<dl class="docutils">
<dt><strong>offline</strong></dt>
<dd>if offline, the cluster does not communicate with offline nodes
(<strong>with the exception of OOB commands for nodes where</strong>
<code class="docutils literal"><span class="pre">--oob-program</span></code> <strong>is set</strong>); useful for nodes that are not reachable
in order to avoid delays</dd>
</dl>
<p>The corresponding command extensions are:</p>
<div class="line-block">
<div class="line">Program: <code class="docutils literal"><span class="pre">gnt-node</span></code></div>
<div class="line">Command: <code class="docutils literal"><span class="pre">info</span></code></div>
<div class="line">Parameter: [ <code class="docutils literal"><span class="pre">nodename</span></code> … ]</div>
<div class="line">Option: None</div>
</div>
<p>Additional Output (<a class="reference internal" href="glossary.html#term-sor"><span class="xref std std-term">SoR</span></a>, ommited if node property
<code class="docutils literal"><span class="pre">--oob-program</span></code> is not set):
powered: <code class="docutils literal"><span class="pre">[True|False]</span></code></p>
<div class="line-block">
<div class="line">Program: <code class="docutils literal"><span class="pre">gnt-node</span></code></div>
<div class="line">Command: <code class="docutils literal"><span class="pre">modify</span></code></div>
<div class="line">Parameter: nodename</div>
<div class="line">Option: [ <code class="docutils literal"><span class="pre">--powered=yes|no</span></code> ]</div>
<div class="line">Reasoning: sometimes you will need to sync the <a class="reference internal" href="glossary.html#term-sor"><span class="xref std std-term">SoR</span></a> with the <a class="reference internal" href="glossary.html#term-sow"><span class="xref std std-term">SoW</span></a> manually</div>
<div class="line">Caveat: <code class="docutils literal"><span class="pre">--powered</span></code> can only be modified if <code class="docutils literal"><span class="pre">--oob-program</span></code> is set for</div>
<div class="line-block">
<div class="line">the node in question</div>
</div>
</div>
</div>
<div class="section" id="new-gnt-node-commands-power-on-off-cycle-status">
<h3>New <code class="docutils literal"><span class="pre">gnt-node</span></code> commands: <code class="docutils literal"><span class="pre">power</span> <span class="pre">[on|off|cycle|status]</span></code><a class="headerlink" href="#new-gnt-node-commands-power-on-off-cycle-status" title="Permalink to this headline">¶</a></h3>
<div class="line-block">
<div class="line">Program: <code class="docutils literal"><span class="pre">gnt-node</span></code></div>
<div class="line">Command: <code class="docutils literal"><span class="pre">power</span> <span class="pre">[on|off|cycle|status]</span></code></div>
<div class="line">Parameters: [ <code class="docutils literal"><span class="pre">nodename</span></code> … ]</div>
<div class="line">Options: None</div>
<div class="line">Caveats:</div>
</div>
<blockquote>
<div><ul class="simple">
<li>If no nodenames are passed to <code class="docutils literal"><span class="pre">power</span> <span class="pre">[on|off|cycle]</span></code>, the user
will be prompted with <code class="docutils literal"><span class="pre">"Do</span> <span class="pre">you</span> <span class="pre">really</span> <span class="pre">want</span> <span class="pre">to</span> <span class="pre">power</span> <span class="pre">[on|off|cycle]</span>
<span class="pre">the</span> <span class="pre">following</span> <span class="pre">nodes:</span> <span class="pre"><display</span> <span class="pre">list</span> <span class="pre">of</span> <span class="pre">OOB</span> <span class="pre">capable</span> <span class="pre">nodes</span> <span class="pre">in</span> <span class="pre">the</span>
<span class="pre">cluster)?</span> <span class="pre">(y/n)"</span></code></li>
<li>For <code class="docutils literal"><span class="pre">power-status</span></code>, nodename is optional, if omitted, we list the
power-status of all OOB capable nodes in the cluster (<a class="reference internal" href="glossary.html#term-sow"><span class="xref std std-term">SoW</span></a>)</li>
<li>User should be warned and needs to confirm with yes if s/he tries to
<code class="docutils literal"><span class="pre">power</span> <span class="pre">[off|cycle]</span></code> a node with running instances.</li>
</ul>
</div></blockquote>
<div class="section" id="error-handling">
<h4>Error Handling<a class="headerlink" href="#error-handling" title="Permalink to this headline">¶</a></h4>
<table border="1" class="docutils">
<colgroup>
<col width="39%" />
<col width="61%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Exception</th>
<th class="head">Error Message</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>OOB program return code != 0</td>
<td>OOB program execution failed ($ERROR_MSG)</td>
</tr>
<tr class="row-odd"><td>OOB program execution time
exceeds 60s</td>
<td>OOB program execution timeout exceeded, OOB
program execution aborted</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="node-state-changes">
<h4>Node State Changes<a class="headerlink" href="#node-state-changes" title="Permalink to this headline">¶</a></h4>
<table border="1" class="docutils">
<colgroup>
<col width="22%" />
<col width="21%" />
<col width="22%" />
<col width="36%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">State before
execution</th>
<th class="head">Command</th>
<th class="head">State after
execution</th>
<th class="head">Comment</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>powered: False</td>
<td><code class="docutils literal"><span class="pre">power</span> <span class="pre">off</span></code></td>
<td>powered: False</td>
<td>FYI: IPMI will complain
if you try to power off
a machine that is already
powered off</td>
</tr>
<tr class="row-odd"><td>powered: False</td>
<td><code class="docutils literal"><span class="pre">power</span> <span class="pre">cycle</span></code></td>
<td>powered: False</td>
<td>FYI: IPMI will complain
if you try to cycle a
machine that is already
powered off</td>
</tr>
<tr class="row-even"><td>powered: False</td>
<td><code class="docutils literal"><span class="pre">power</span> <span class="pre">on</span></code></td>
<td>powered: True</td>
<td> </td>
</tr>
<tr class="row-odd"><td>powered: True</td>
<td><code class="docutils literal"><span class="pre">power</span> <span class="pre">off</span></code></td>
<td>powered: False</td>
<td> </td>
</tr>
<tr class="row-even"><td>powered: True</td>
<td><code class="docutils literal"><span class="pre">power</span> <span class="pre">cycle</span></code></td>
<td>powered: True</td>
<td> </td>
</tr>
<tr class="row-odd"><td>powered: True</td>
<td><code class="docutils literal"><span class="pre">power</span> <span class="pre">on</span></code></td>
<td>powered: True</td>
<td>FYI: IPMI will complain
if you try to power on
a machine that is already
powered on</td>
</tr>
</tbody>
</table>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<ul class="last simple">
<li>If the command fails, the Node State remains unchanged.</li>
<li>We will not prevent the user from trying to power off a node that is
already powered off since the powered state represents the
<a class="reference internal" href="glossary.html#term-sor"><span class="xref std std-term">SoR</span></a> only and not the <a class="reference internal" href="glossary.html#term-sow"><span class="xref std std-term">SoW</span></a>. This can however create
problems when the cluster administrator wants to bring the
<a class="reference internal" href="glossary.html#term-sor"><span class="xref std std-term">SoR</span></a> in sync with the :term:SoW` without actually having to
mess with the node(s). For this case, we allow direct modification
of the powered state through the gnt-node modify
<code class="docutils literal"><span class="pre">--powered=[yes|no]</span></code> command as long as the node has OOB
capabilities (i.e. <code class="docutils literal"><span class="pre">--oob-program</span></code> is set).</li>
<li>All node power state changes will be logged</li>
</ul>
</div>
</div>
</div>
<div class="section" id="node-power-status-listing-sow">
<h3>Node Power Status Listing (<a class="reference internal" href="glossary.html#term-sow"><span class="xref std std-term">SoW</span></a>)<a class="headerlink" href="#node-power-status-listing-sow" title="Permalink to this headline">¶</a></h3>
<div class="line-block">
<div class="line">Program: <code class="docutils literal"><span class="pre">gnt-node</span></code></div>
<div class="line">Command: <code class="docutils literal"><span class="pre">power-status</span></code></div>
<div class="line">Parameters: [ <code class="docutils literal"><span class="pre">nodename</span></code> … ]</div>
</div>
<p>Example output (represents <a class="reference internal" href="glossary.html#term-sow"><span class="xref std std-term">SoW</span></a>):</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">gnt</span><span class="o">-</span><span class="n">node</span> <span class="n">oob</span> <span class="n">power</span><span class="o">-</span><span class="n">status</span>
<span class="n">Node</span> <span class="n">Power</span> <span class="n">Status</span>
<span class="n">node1</span><span class="o">.</span><span class="n">example</span><span class="o">.</span><span class="n">com</span> <span class="n">on</span>
<span class="n">node2</span><span class="o">.</span><span class="n">example</span><span class="o">.</span><span class="n">com</span> <span class="n">off</span>
<span class="n">node3</span><span class="o">.</span><span class="n">example</span><span class="o">.</span><span class="n">com</span> <span class="n">on</span>
<span class="n">node4</span><span class="o">.</span><span class="n">example</span><span class="o">.</span><span class="n">com</span> <span class="n">unknown</span>
</pre></div>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<ul class="last simple">
<li>We use <code class="docutils literal"><span class="pre">unknown</span></code> in case the Helper Program could not determine
the power state.</li>
<li>If no nodenames are provided, we will list the power state of all
nodes which are not opted out from OOB management.</li>
<li>Only nodes which are not opted out from OOB management will be
listed. Invoking the command on a node that does not meet this
condition will result in an error message “Node X does not support
OOB commands”.</li>
</ul>
</div>
</div>
<div class="section" id="node-power-status-listing-sor">
<h3>Node Power Status Listing (<a class="reference internal" href="glossary.html#term-sor"><span class="xref std std-term">SoR</span></a>)<a class="headerlink" href="#node-power-status-listing-sor" title="Permalink to this headline">¶</a></h3>
<div class="line-block">
<div class="line">Program: <code class="docutils literal"><span class="pre">gnt-node</span></code></div>
<div class="line">Command: <code class="docutils literal"><span class="pre">info</span></code></div>
<div class="line">Parameter: [ <code class="docutils literal"><span class="pre">nodename</span></code> … ]</div>
<div class="line">Option: None</div>
</div>
<p>Example output (represents <a class="reference internal" href="glossary.html#term-sor"><span class="xref std std-term">SoR</span></a>):</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">gnt</span><span class="o">-</span><span class="n">node</span> <span class="n">info</span> <span class="n">node1</span><span class="o">.</span><span class="n">example</span><span class="o">.</span><span class="n">com</span>
<span class="n">Node</span> <span class="n">name</span><span class="p">:</span> <span class="n">node1</span><span class="o">.</span><span class="n">example</span><span class="o">.</span><span class="n">com</span>
<span class="n">primary</span> <span class="n">ip</span><span class="p">:</span> <span class="mf">192.168</span><span class="o">.</span><span class="mf">1.1</span>
<span class="n">secondary</span> <span class="n">ip</span><span class="p">:</span> <span class="mf">192.168</span><span class="o">.</span><span class="mf">2.1</span>
<span class="n">master</span> <span class="n">candidate</span><span class="p">:</span> <span class="kc">True</span>
<span class="n">drained</span><span class="p">:</span> <span class="kc">False</span>
<span class="n">offline</span><span class="p">:</span> <span class="kc">False</span>
<span class="n">powered</span><span class="p">:</span> <span class="kc">True</span>
<span class="n">primary</span> <span class="k">for</span> <span class="n">instances</span><span class="p">:</span>
<span class="o">-</span> <span class="n">inst1</span><span class="o">.</span><span class="n">example</span><span class="o">.</span><span class="n">com</span>
<span class="o">-</span> <span class="n">inst2</span><span class="o">.</span><span class="n">example</span><span class="o">.</span><span class="n">com</span>
<span class="o">-</span> <span class="n">inst3</span><span class="o">.</span><span class="n">example</span><span class="o">.</span><span class="n">com</span>
<span class="n">secondary</span> <span class="k">for</span> <span class="n">instances</span><span class="p">:</span>
<span class="o">-</span> <span class="n">inst4</span><span class="o">.</span><span class="n">example</span><span class="o">.</span><span class="n">com</span>
<span class="o">-</span> <span class="n">inst5</span><span class="o">.</span><span class="n">example</span><span class="o">.</span><span class="n">com</span>
<span class="o">-</span> <span class="n">inst6</span><span class="o">.</span><span class="n">example</span><span class="o">.</span><span class="n">com</span>
<span class="o">-</span> <span class="n">inst7</span><span class="o">.</span><span class="n">example</span><span class="o">.</span><span class="n">com</span>
</pre></div>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Only nodes which are not opted out from OOB management will report the
powered state.</p>
</div>
</div>
<div class="section" id="new-gnt-node-oob-subcommand-health">
<h3>New <code class="docutils literal"><span class="pre">gnt-node</span></code> oob subcommand: <code class="docutils literal"><span class="pre">health</span></code><a class="headerlink" href="#new-gnt-node-oob-subcommand-health" title="Permalink to this headline">¶</a></h3>
<div class="line-block">
<div class="line">Program: <code class="docutils literal"><span class="pre">gnt-node</span></code></div>
<div class="line">Command: <code class="docutils literal"><span class="pre">health</span></code></div>
<div class="line">Parameters: [ <code class="docutils literal"><span class="pre">nodename</span></code> … ]</div>
<div class="line">Options: None</div>
<div class="line">Example: <code class="docutils literal"><span class="pre">/usr/bin/oob</span> <span class="pre">health</span> <span class="pre">node5.example.com</span></code></div>
</div>
<p>Caveats:</p>
<blockquote>
<div><ul class="simple">
<li>If no nodename(s) are provided, we will report the health of all
nodes in the cluster which have <code class="docutils literal"><span class="pre">--oob-program</span></code> set.</li>
<li>Only nodes which are not opted out from OOB management will report
their health. Invoking the command on a node that does not meet this
condition will result in an error message “Node does not support OOB
commands”.</li>
</ul>
</div></blockquote>
<p>For error handling see <a class="reference internal" href="#error-handling">Error Handling</a></p>
</div>
<div class="section" id="oob-program-helper-program-parameters-return-codes-and-data-format">
<h3>OOB Program (Helper Program) Parameters, Return Codes and Data Format<a class="headerlink" href="#oob-program-helper-program-parameters-return-codes-and-data-format" title="Permalink to this headline">¶</a></h3>
<div class="line-block">
<div class="line">Program: executable OOB program (absolute path)</div>
<div class="line">Parameters: command nodename</div>
<div class="line">Command: [power-{on|off|cycle|status}|health]</div>
<div class="line">Options: None</div>
<div class="line">Example: <code class="docutils literal"><span class="pre">/usr/bin/oob</span> <span class="pre">power-on</span> <span class="pre">node1.example.com</span></code></div>
<div class="line">Caveat: maximum runtime is limited to 60s</div>
</div>
<div class="section" id="return-codes">
<h4>Return Codes<a class="headerlink" href="#return-codes" title="Permalink to this headline">¶</a></h4>
<table border="1" class="docutils">
<colgroup>
<col width="34%" />
<col width="66%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Return code</th>
<th class="head">Meaning</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>0</td>
<td>Command succeeded</td>
</tr>
<tr class="row-odd"><td>1</td>
<td>Command failed</td>
</tr>
<tr class="row-even"><td>others</td>
<td>Unsupported/undefined</td>
</tr>
</tbody>
</table>
<p>Error messages are passed from the helper program to Ganeti through
<em class="manpage">stderr(3)</em> (return code == 1). On <em class="manpage">stdout(3)</em>, the
helper program will send data back to Ganeti (return code == 0). The
format of the data is JSON.</p>
<table border="1" class="docutils">
<colgroup>
<col width="36%" />
<col width="64%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Command</th>
<th class="head">Expected output</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><code class="docutils literal"><span class="pre">power-on</span></code></td>
<td>None</td>
</tr>
<tr class="row-odd"><td><code class="docutils literal"><span class="pre">power-off</span></code></td>
<td>None</td>
</tr>
<tr class="row-even"><td><code class="docutils literal"><span class="pre">power-cycle</span></code></td>
<td>None</td>
</tr>
<tr class="row-odd"><td><code class="docutils literal"><span class="pre">power-status</span></code></td>
<td><code class="docutils literal"><span class="pre">{</span> <span class="pre">"powered":</span> <span class="pre">true|false</span> <span class="pre">}</span></code></td>
</tr>
<tr class="row-even"><td><code class="docutils literal"><span class="pre">health</span></code></td>
<td><div class="first last highlight-default"><div class="highlight"><pre><span></span><span class="p">[[</span><span class="n">item</span><span class="p">,</span> <span class="n">status</span><span class="p">],</span>
<span class="p">[</span><span class="n">item</span><span class="p">,</span> <span class="n">status</span><span class="p">],</span>
<span class="o">...</span><span class="p">]</span>
</pre></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="data-format">
<h4>Data Format<a class="headerlink" href="#data-format" title="Permalink to this headline">¶</a></h4>
<p>For the health output, the fields are:</p>
<table border="1" class="docutils">
<colgroup>
<col width="11%" />
<col width="89%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Field</th>
<th class="head">Meaning</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>item</td>
<td><p class="first">String identifier of the item we are querying the health of,
examples:</p>
<blockquote class="last">
<div><ul class="simple">
<li>Ambient Temp</li>
<li>PS Redundancy</li>
<li>FAN 1 RPM</li>
</ul>
</div></blockquote>
</td>
</tr>
<tr class="row-odd"><td>status</td>
<td><p class="first">String; Can take one of the following four values:</p>
<blockquote class="last">
<div><ul class="simple">
<li>OK</li>
<li>WARNING</li>
<li>CRITICAL</li>
<li>UNKNOWN</li>
</ul>
</div></blockquote>
</td>
</tr>
</tbody>
</table>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<ul class="last simple">
<li>The item output list is defined by the Helper Program. It is up to
the author of the Helper Program to decide which items should be
monitored and what each corresponding return status is.</li>
<li>Ganeti will currently not take any actions based on the item
status. It will however create log entries for items with status
WARNING or CRITICAL for each run of the <code class="docutils literal"><span class="pre">gnt-node</span> <span class="pre">oob</span> <span class="pre">health</span>
<span class="pre">nodename</span></code> command. Automatic actions (regular monitoring of the
item status) is considered a new service and will be treated in a
separate design document.</li>
</ul>
</div>
</div>
</div>
</div>
<div class="section" id="logging">
<h2>Logging<a class="headerlink" href="#logging" title="Permalink to this headline">¶</a></h2>
<p>The <code class="docutils literal"><span class="pre">gnt-node</span> <span class="pre">power-[on|off]</span></code> (power state changes) commands will
create log entries following current Ganeti logging practices. In
addition, health items with status WARNING or CRITICAL will be logged
for each run of <code class="docutils literal"><span class="pre">gnt-node</span> <span class="pre">health</span></code>.</p>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h3><a href="index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Ganeti Node OOB Management Framework</a><ul>
<li><a class="reference internal" href="#objective">Objective</a></li>
<li><a class="reference internal" href="#background">Background</a></li>
<li><a class="reference internal" href="#overview">Overview</a></li>
<li><a class="reference internal" href="#detailed-design">Detailed Design</a><ul>
<li><a class="reference internal" href="#new-gnt-cluster-parameter">New <code class="docutils literal"><span class="pre">gnt-cluster</span></code> Parameter</a></li>
<li><a class="reference internal" href="#new-gnt-cluster-epo-command">New <code class="docutils literal"><span class="pre">gnt-cluster</span> <span class="pre">epo</span></code> Command</a></li>
<li><a class="reference internal" href="#new-gnt-node-property">New <code class="docutils literal"><span class="pre">gnt-node</span></code> Property</a></li>
<li><a class="reference internal" href="#addition-to-gnt-cluster-verify">Addition to <code class="docutils literal"><span class="pre">gnt-cluster</span> <span class="pre">verify</span></code></a></li>
<li><a class="reference internal" href="#new-node-state">New Node State</a></li>
<li><a class="reference internal" href="#new-gnt-node-commands-power-on-off-cycle-status">New <code class="docutils literal"><span class="pre">gnt-node</span></code> commands: <code class="docutils literal"><span class="pre">power</span> <span class="pre">[on|off|cycle|status]</span></code></a><ul>
<li><a class="reference internal" href="#error-handling">Error Handling</a></li>
<li><a class="reference internal" href="#node-state-changes">Node State Changes</a></li>
</ul>
</li>
<li><a class="reference internal" href="#node-power-status-listing-sow">Node Power Status Listing (<code class="docutils literal"><span class="pre">SoW</span></code>)</a></li>
<li><a class="reference internal" href="#node-power-status-listing-sor">Node Power Status Listing (<code class="docutils literal"><span class="pre">SoR</span></code>)</a></li>
<li><a class="reference internal" href="#new-gnt-node-oob-subcommand-health">New <code class="docutils literal"><span class="pre">gnt-node</span></code> oob subcommand: <code class="docutils literal"><span class="pre">health</span></code></a></li>
<li><a class="reference internal" href="#oob-program-helper-program-parameters-return-codes-and-data-format">OOB Program (Helper Program) Parameters, Return Codes and Data Format</a><ul>
<li><a class="reference internal" href="#return-codes">Return Codes</a></li>
<li><a class="reference internal" href="#data-format">Data Format</a></li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#logging">Logging</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="design-node-security.html"
title="previous chapter">Improvements of Node Security</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="design-openvswitch.html"
title="next chapter">Support for Open vSwitch</a></p>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/design-oob.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<div><input type="text" name="q" /></div>
<div><input type="submit" value="Go" /></div>
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="design-openvswitch.html" title="Support for Open vSwitch"
>next</a></li>
<li class="right" >
<a href="design-node-security.html" title="Improvements of Node Security"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">Ganeti 2.16.0~rc2 documentation</a> »</li>
</ul>
</div>
<div class="footer" role="contentinfo">
© Copyright 2018, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Google Inc..
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.6.7.
</div>
</body>
</html>
|