/usr/share/doc/ganeti/html/design-multi-reloc.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 | <!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>Moving instances across node groups — 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="Multi-version tests" href="design-multi-version-tests.html" />
<link rel="prev" title="Instance move improvements" href="design-move-instance-improvements.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-multi-version-tests.html" title="Multi-version tests"
accesskey="N">next</a></li>
<li class="right" >
<a href="design-move-instance-improvements.html" title="Instance move improvements"
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="moving-instances-across-node-groups">
<h1>Moving instances across node groups<a class="headerlink" href="#moving-instances-across-node-groups" 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">2011-Mar-28</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.5.0</td>
</tr>
</tbody>
</table>
<p>This design document explains the changes needed in Ganeti to perform
instance moves across node groups. Reader familiarity with the following
existing documents is advised:</p>
<ul class="simple">
<li><a class="reference internal" href="iallocator.html"><span class="doc">Current IAllocator specification</span></a></li>
<li><a class="reference internal" href="design-shared-storage.html"><span class="doc">Shared storage model in 2.3+</span></a></li>
</ul>
<div class="section" id="motivation-and-and-design-proposal">
<h2>Motivation and and design proposal<a class="headerlink" href="#motivation-and-and-design-proposal" title="Permalink to this headline">¶</a></h2>
<p>At the moment, moving instances away from their primary or secondary
nodes with the <code class="docutils literal"><span class="pre">relocate</span></code> and <code class="docutils literal"><span class="pre">multi-evacuate</span></code> IAllocator calls
restricts target nodes to those on the same node group. This ensures a
mobility domain is never crossed, and allows normal operation of each
node group to be confined within itself.</p>
<p>It is desirable, however, to have a way of moving instances across node
groups so that, for example, it is possible to move a set of instances
to another group for policy reasons, or completely empty a given group
to perform maintenance operations.</p>
<p>To implement this, we propose the addition of new IAllocator calls to
compute inter-group instance moves and group-aware node evacuation,
taking into account mobility domains as appropriate. The interface
proposed below should be enough to cover the use cases mentioned above.</p>
<p>With the implementation of this design proposal, the previous
<code class="docutils literal"><span class="pre">multi-evacuate</span></code> mode will be deprecated.</p>
</div>
<div class="section" id="detailed-design">
<span id="multi-reloc-detailed-design"></span><h2>Detailed design<a class="headerlink" href="#detailed-design" title="Permalink to this headline">¶</a></h2>
<p>All requests honor the groups’ <code class="docutils literal"><span class="pre">alloc_policy</span></code> attribute.</p>
<div class="section" id="changing-instance-s-groups">
<h3>Changing instance’s groups<a class="headerlink" href="#changing-instance-s-groups" title="Permalink to this headline">¶</a></h3>
<p>Takes a list of instances and a list of node group UUIDs; the instances
will be moved away from their current group, to any of the groups in the
target list. All instances need to have their primary node in the same
group, which may not be a target group. If the target group list is
empty, the request is simply “change group” and the instances are placed
in any group but their original one.</p>
</div>
<div class="section" id="node-evacuation">
<h3>Node evacuation<a class="headerlink" href="#node-evacuation" title="Permalink to this headline">¶</a></h3>
<p>Evacuates instances off their primary nodes. The evacuation mode
can be given as <code class="docutils literal"><span class="pre">primary-only</span></code>, <code class="docutils literal"><span class="pre">secondary-only</span></code> or
<code class="docutils literal"><span class="pre">all</span></code>. The call is given a list of instances whose primary nodes need
to be in the same node group. The returned nodes need to be in the same
group as the original primary node.</p>
</div>
<div class="section" id="result">
<span id="multi-reloc-result"></span><h3>Result<a class="headerlink" href="#result" title="Permalink to this headline">¶</a></h3>
<p>In all storage models, an inter-group move can be modeled as a sequence
of <strong>replace secondary</strong>, <strong>migration</strong> and <strong>failover</strong> operations
(when shared storage is used, they will all be failover or migration
operations within the corresponding mobility domain).</p>
<p>The result of the operations described above must contain two lists of
instances and a list of jobs (each of which is a list of serialized
opcodes) to actually execute the operation. <a class="reference internal" href="design-chained-jobs.html"><span class="doc">Job dependencies</span></a> can be used to force jobs to run in a certain
order while still making use of parallelism.</p>
<p>The two lists of instances describe which instances could be
moved/migrated and which couldn’t for some reason (“unsuccessful”). The
union of the instances in the two lists must be equal to the set of
instances given in the original request. The successful list of
instances contains elements as follows:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="p">(</span><span class="n">instance</span> <span class="n">name</span><span class="p">,</span> <span class="n">target</span> <span class="n">group</span> <span class="n">name</span><span class="p">,</span> <span class="p">[</span><span class="n">chosen</span> <span class="n">node</span> <span class="n">names</span><span class="p">])</span>
</pre></div>
</div>
<p>The choice of names is simply for readability reasons (for example,
Ganeti could log the computed solution in the job information) and for
being able to check (manually) for consistency that the generated
opcodes match the intended target groups/nodes. Note that for the
node-evacuate operation, the group is not changed, but it should still
be returned as such (as it’s easier to have the same return type for
both operations).</p>
<p>The unsuccessful list of instances contains elements as follows:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="p">(</span><span class="n">instance</span> <span class="n">name</span><span class="p">,</span> <span class="n">explanation</span><span class="p">)</span>
</pre></div>
</div>
<p>where <code class="docutils literal"><span class="pre">explanation</span></code> is a string describing why the plugin was not able
to relocate the instance.</p>
<p>The client is given a list of job IDs (see the <a class="reference internal" href="design-lu-generated-jobs.html"><span class="doc">design for
LU-generated jobs</span></a>) which it can watch.
Failures should be reported to the user.</p>
<p>Example job list:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="p">[</span>
<span class="c1"># First job</span>
<span class="p">[</span>
<span class="p">{</span> <span class="s2">"OP_ID"</span><span class="p">:</span> <span class="s2">"OP_INSTANCE_MIGRATE"</span><span class="p">,</span>
<span class="s2">"instance_name"</span><span class="p">:</span> <span class="s2">"inst1.example.com"</span><span class="p">,</span>
<span class="p">},</span>
<span class="p">{</span> <span class="s2">"OP_ID"</span><span class="p">:</span> <span class="s2">"OP_INSTANCE_MIGRATE"</span><span class="p">,</span>
<span class="s2">"instance_name"</span><span class="p">:</span> <span class="s2">"inst2.example.com"</span><span class="p">,</span>
<span class="p">},</span>
<span class="p">],</span>
<span class="c1"># Second job</span>
<span class="p">[</span>
<span class="p">{</span> <span class="s2">"OP_ID"</span><span class="p">:</span> <span class="s2">"OP_INSTANCE_REPLACE_DISKS"</span><span class="p">,</span>
<span class="s2">"depends"</span><span class="p">:</span> <span class="p">[</span>
<span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">,</span> <span class="p">[</span><span class="s2">"success"</span><span class="p">]],</span>
<span class="p">],</span>
<span class="s2">"instance_name"</span><span class="p">:</span> <span class="s2">"inst2.example.com"</span><span class="p">,</span>
<span class="s2">"mode"</span><span class="p">:</span> <span class="s2">"replace_new_secondary"</span><span class="p">,</span>
<span class="s2">"remote_node"</span><span class="p">:</span> <span class="s2">"node4.example.com"</span><span class="p">,</span>
<span class="p">},</span>
<span class="p">],</span>
<span class="c1"># Third job</span>
<span class="p">[</span>
<span class="p">{</span> <span class="s2">"OP_ID"</span><span class="p">:</span> <span class="s2">"OP_INSTANCE_FAILOVER"</span><span class="p">,</span>
<span class="s2">"depends"</span><span class="p">:</span> <span class="p">[</span>
<span class="p">[</span><span class="o">-</span><span class="mi">2</span><span class="p">,</span> <span class="p">[]],</span>
<span class="p">],</span>
<span class="s2">"instance_name"</span><span class="p">:</span> <span class="s2">"inst8.example.com"</span><span class="p">,</span>
<span class="p">},</span>
<span class="p">],</span>
<span class="p">]</span>
</pre></div>
</div>
<p>Accepted opcodes:</p>
<ul class="simple">
<li><code class="docutils literal"><span class="pre">OP_INSTANCE_FAILOVER</span></code></li>
<li><code class="docutils literal"><span class="pre">OP_INSTANCE_MIGRATE</span></code></li>
<li><code class="docutils literal"><span class="pre">OP_INSTANCE_REPLACE_DISKS</span></code></li>
</ul>
</div>
</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="#">Moving instances across node groups</a><ul>
<li><a class="reference internal" href="#motivation-and-and-design-proposal">Motivation and and design proposal</a></li>
<li><a class="reference internal" href="#detailed-design">Detailed design</a><ul>
<li><a class="reference internal" href="#changing-instance-s-groups">Changing instance’s groups</a></li>
<li><a class="reference internal" href="#node-evacuation">Node evacuation</a></li>
<li><a class="reference internal" href="#result">Result</a></li>
</ul>
</li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="design-move-instance-improvements.html"
title="previous chapter">Instance move improvements</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="design-multi-version-tests.html"
title="next chapter">Multi-version tests</a></p>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/design-multi-reloc.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-multi-version-tests.html" title="Multi-version tests"
>next</a></li>
<li class="right" >
<a href="design-move-instance-improvements.html" title="Instance move improvements"
>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>
|