This file is indexed.

/usr/share/doc/ganeti/html/design-upgrade.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
<!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>Automatized Upgrade Procedure for Ganeti &#8212; 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="Design for virtual clusters support" href="design-virtual-clusters.html" />
    <link rel="prev" title="Systemd integration" href="design-systemd.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-virtual-clusters.html" title="Design for virtual clusters support"
             accesskey="N">next</a></li>
        <li class="right" >
          <a href="design-systemd.html" title="Systemd integration"
             accesskey="P">previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="index.html">Ganeti 2.16.0~rc2 documentation</a> &#187;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="automatized-upgrade-procedure-for-ganeti">
<h1><a class="toc-backref" href="#id1">Automatized Upgrade Procedure for Ganeti</a><a class="headerlink" href="#automatized-upgrade-procedure-for-ganeti" 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">2013-Aug-20</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.10.0</td>
</tr>
</tbody>
</table>
<div class="contents topic" id="contents">
<p class="topic-title first">Contents</p>
<ul class="simple">
<li><a class="reference internal" href="#automatized-upgrade-procedure-for-ganeti" id="id1">Automatized Upgrade Procedure for Ganeti</a><ul>
<li><a class="reference internal" href="#current-state-and-shortcomings" id="id2">Current state and shortcomings</a></li>
<li><a class="reference internal" href="#proposed-changes" id="id3">Proposed changes</a><ul>
<li><a class="reference internal" href="#path-changes-to-allow-multiple-versions-installed" id="id4">Path changes to allow multiple versions installed</a></li>
<li><a class="reference internal" href="#gnt-cluster-upgrade" id="id5">gnt-cluster upgrade</a></li>
</ul>
</li>
<li><a class="reference internal" href="#considerations-on-unintended-reboots-of-the-master-node" id="id6">Considerations on unintended reboots of the master node</a></li>
<li><a class="reference internal" href="#caveats" id="id7">Caveats</a></li>
<li><a class="reference internal" href="#requirement-of-job-queue-update" id="id8">Requirement of job queue update</a></li>
</ul>
</li>
</ul>
</div>
<p>This is a design document detailing the proposed changes to the
upgrade process, in order to allow it to be more automatic.</p>
<div class="section" id="current-state-and-shortcomings">
<h2><a class="toc-backref" href="#id2">Current state and shortcomings</a><a class="headerlink" href="#current-state-and-shortcomings" title="Permalink to this headline"></a></h2>
<p>Ganeti requires to run the same version of Ganeti to be run on all
nodes of a cluster and this requirement is unlikely to go away in the
foreseeable future. Also, the configuration may change between minor
versions (and in the past has proven to do so). This requires a quite
involved manual upgrade process of draining the queue, stopping
ganeti, changing the binaries, upgrading the configuration, starting
ganeti, distributing the configuration, and undraining the queue.</p>
</div>
<div class="section" id="proposed-changes">
<h2><a class="toc-backref" href="#id3">Proposed changes</a><a class="headerlink" href="#proposed-changes" title="Permalink to this headline"></a></h2>
<p>While we will not remove the requirement of the same Ganeti
version running on all nodes, the transition from one version
to the other will be made more automatic. It will be possible
to install new binaries ahead of time, and the actual switch
between versions will be a single command.</p>
<p>While changing the file layout anyway, we install the python
code, which is architecture independent, under <code class="docutils literal"><span class="pre">${prefix}/share</span></code>,
in a way that properly separates the Ganeti libraries of the
various versions.</p>
<div class="section" id="path-changes-to-allow-multiple-versions-installed">
<h3><a class="toc-backref" href="#id4">Path changes to allow multiple versions installed</a><a class="headerlink" href="#path-changes-to-allow-multiple-versions-installed" title="Permalink to this headline"></a></h3>
<p>Currently, Ganeti installs to <code class="docutils literal"><span class="pre">${PREFIX}/bin</span></code>, <code class="docutils literal"><span class="pre">${PREFIX}/sbin</span></code>,
and so on, as well as to <code class="docutils literal"><span class="pre">${pythondir}/ganeti</span></code>.</p>
<p>These paths will be changed in the following way.</p>
<ul class="simple">
<li>The python package will be installed to
<code class="docutils literal"><span class="pre">${PREFIX}/share/ganeti/${VERSION}/ganeti</span></code>.
Here ${VERSION} is, depending on configure options, either the full qualified
version number, consisting of major, minor, revision, and suffix, or it is
just a major.minor pair. All python executables will be installed under
<code class="docutils literal"><span class="pre">${PREFIX}/share/ganeti/${VERSION}</span></code> so that they see their respective
Ganeti library. <code class="docutils literal"><span class="pre">${PREFIX}/share/ganeti/default</span></code> is a symbolic link to
<code class="docutils literal"><span class="pre">${sysconfdir}/ganeti/share</span></code> which, in turn, is a symbolic link to
<code class="docutils literal"><span class="pre">${PREFIX}/share/ganeti/${VERSION}</span></code>. For all python executables (like
<code class="docutils literal"><span class="pre">gnt-cluster</span></code>, <code class="docutils literal"><span class="pre">gnt-node</span></code>, etc) symbolic links going through
<code class="docutils literal"><span class="pre">${PREFIX}/share/ganeti/default</span></code> are added under <code class="docutils literal"><span class="pre">${PREFIX}/sbin</span></code>.</li>
<li>All other files will be installed to the corresponding path under
<code class="docutils literal"><span class="pre">${libdir}/ganeti/${VERSION}</span></code> instead of under <code class="docutils literal"><span class="pre">${PREFIX}</span></code>
directly, where <code class="docutils literal"><span class="pre">${libdir}</span></code> defaults to <code class="docutils literal"><span class="pre">${PREFIX}/lib</span></code>.
<code class="docutils literal"><span class="pre">${libdir}/ganeti/default</span></code> will be a symlink to <code class="docutils literal"><span class="pre">${sysconfdir}/ganeti/lib</span></code>
which, in turn, is a symlink to <code class="docutils literal"><span class="pre">${libdir}/ganeti/${VERSION}</span></code>.
Symbolic links to the files installed under <code class="docutils literal"><span class="pre">${libdir}/ganeti/${VERSION}</span></code>
will be added under <code class="docutils literal"><span class="pre">${PREFIX}/bin</span></code>, <code class="docutils literal"><span class="pre">${PREFIX}/sbin</span></code>, and so on. These
symbolic links will go through <code class="docutils literal"><span class="pre">${libdir}/ganeti/default</span></code> so that the
version can easily be changed by updating the symbolic link in
<code class="docutils literal"><span class="pre">${sysconfdir}</span></code>.</li>
</ul>
<p>The set of links for ganeti binaries might change between the versions.
However, as the file structure under <code class="docutils literal"><span class="pre">${libdir}/ganeti/${VERSION}</span></code> reflects
that of <code class="docutils literal"><span class="pre">/</span></code>, two links of different versions will never conflict. Similarly,
the symbolic links for the python executables will never conflict, as they
always point to a file with the same basename directly under
<code class="docutils literal"><span class="pre">${PREFIX}/share/ganeti/default</span></code>. Therefore, each version will make sure that
enough symbolic links are present in <code class="docutils literal"><span class="pre">${PREFIX}/bin</span></code>, <code class="docutils literal"><span class="pre">${PREFIX}/sbin</span></code> and
so on, even though some might be dangling, if a different version of ganeti is
currently active.</p>
<p>The extra indirection through <code class="docutils literal"><span class="pre">${sysconfdir}</span></code> allows installations that choose
to have <code class="docutils literal"><span class="pre">${sysconfdir}</span></code> and <code class="docutils literal"><span class="pre">${localstatedir}</span></code> outside <code class="docutils literal"><span class="pre">${PREFIX}</span></code> to
mount <code class="docutils literal"><span class="pre">${PREFIX}</span></code> read-only. The latter is important for systems that choose
<code class="docutils literal"><span class="pre">/usr</span></code> as <code class="docutils literal"><span class="pre">${PREFIX}</span></code> and are following the Filesystem Hierarchy Standard.
For example, choosing <code class="docutils literal"><span class="pre">/usr</span></code> as <code class="docutils literal"><span class="pre">${PREFIX}</span></code> and <code class="docutils literal"><span class="pre">/etc</span></code> as <code class="docutils literal"><span class="pre">${sysconfdir}</span></code>,
the layout for version 2.10 will look as follows.</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="o">/</span>
<span class="o">|</span>
<span class="o">+--</span> <span class="n">etc</span>
<span class="o">|</span>   <span class="o">|</span>
<span class="o">|</span>   <span class="o">+--</span> <span class="n">ganeti</span>
<span class="o">|</span>         <span class="o">|</span>
<span class="o">|</span>         <span class="o">+--</span> <span class="n">lib</span> <span class="o">-&gt;</span> <span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib</span><span class="o">/</span><span class="n">ganeti</span><span class="o">/</span><span class="mf">2.10</span>
<span class="o">|</span>         <span class="o">|</span>
<span class="o">|</span>         <span class="o">+--</span> <span class="n">share</span>  <span class="o">-&gt;</span> <span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">share</span><span class="o">/</span><span class="n">ganeti</span><span class="o">/</span><span class="mf">2.10</span>
<span class="o">+--</span> <span class="n">usr</span>
     <span class="o">|</span>
     <span class="o">+--</span> <span class="nb">bin</span>
     <span class="o">|</span>   <span class="o">|</span>
     <span class="o">|</span>   <span class="o">+--</span> <span class="n">harep</span> <span class="o">-&gt;</span> <span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib</span><span class="o">/</span><span class="n">ganeti</span><span class="o">/</span><span class="n">default</span><span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="nb">bin</span><span class="o">/</span><span class="n">harep</span>
     <span class="o">|</span>   <span class="o">|</span>
     <span class="o">|</span>   <span class="o">...</span>
     <span class="o">|</span>
     <span class="o">+--</span> <span class="n">sbin</span>
     <span class="o">|</span>   <span class="o">|</span>
     <span class="o">|</span>   <span class="o">+--</span> <span class="n">gnt</span><span class="o">-</span><span class="n">cluster</span> <span class="o">-&gt;</span> <span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">share</span><span class="o">/</span><span class="n">ganeti</span><span class="o">/</span><span class="n">default</span><span class="o">/</span><span class="n">gnt</span><span class="o">-</span><span class="n">cluster</span>
     <span class="o">|</span>   <span class="o">|</span>
     <span class="o">|</span>   <span class="o">...</span>
     <span class="o">|</span>
     <span class="o">+--</span> <span class="o">...</span>
     <span class="o">|</span>
     <span class="o">+--</span> <span class="n">lib</span>
     <span class="o">|</span>   <span class="o">|</span>
     <span class="o">|</span>   <span class="o">+--</span> <span class="n">ganeti</span>
     <span class="o">|</span>       <span class="o">|</span>
     <span class="o">|</span>       <span class="o">+--</span> <span class="n">default</span> <span class="o">-&gt;</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">ganeti</span><span class="o">/</span><span class="n">lib</span>
     <span class="o">|</span>       <span class="o">|</span>
     <span class="o">|</span>       <span class="o">+--</span> <span class="mf">2.10</span>
     <span class="o">|</span>           <span class="o">|</span>
     <span class="o">|</span>           <span class="o">+--</span> <span class="n">usr</span>
     <span class="o">|</span>               <span class="o">|</span>
     <span class="o">|</span>               <span class="o">+--</span> <span class="nb">bin</span>
     <span class="o">|</span>               <span class="o">|</span>    <span class="o">|</span>
     <span class="o">|</span>               <span class="o">|</span>    <span class="o">+--</span> <span class="n">htools</span>
     <span class="o">|</span>               <span class="o">|</span>    <span class="o">|</span>
     <span class="o">|</span>               <span class="o">|</span>    <span class="o">+--</span> <span class="n">harep</span> <span class="o">-&gt;</span> <span class="n">htools</span>
     <span class="o">|</span>               <span class="o">|</span>    <span class="o">|</span>
     <span class="o">|</span>               <span class="o">|</span>    <span class="o">...</span>
     <span class="o">|</span>               <span class="o">...</span>
     <span class="o">|</span>
     <span class="o">+--</span> <span class="n">share</span>
          <span class="o">|</span>
          <span class="o">+--</span> <span class="n">ganeti</span>
              <span class="o">|</span>
              <span class="o">+--</span> <span class="n">default</span> <span class="o">-&gt;</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">ganeti</span><span class="o">/</span><span class="n">share</span>
              <span class="o">|</span>
              <span class="o">+--</span> <span class="mf">2.10</span>
                  <span class="o">|</span>
                  <span class="o">+</span> <span class="o">--</span> <span class="n">gnt</span><span class="o">-</span><span class="n">cluster</span>
                  <span class="o">|</span>
                  <span class="o">+</span> <span class="o">--</span> <span class="n">gnt</span><span class="o">-</span><span class="n">node</span>
                  <span class="o">|</span>
                  <span class="o">+</span> <span class="o">--</span> <span class="o">...</span>
                  <span class="o">|</span>
                  <span class="o">+</span> <span class="o">--</span> <span class="n">ganeti</span>
                       <span class="o">|</span>
                       <span class="o">+--</span> <span class="n">backend</span><span class="o">.</span><span class="n">py</span>
                       <span class="o">|</span>
                       <span class="o">+--</span> <span class="o">...</span>
                       <span class="o">|</span>
                       <span class="o">+--</span> <span class="n">cmdlib</span>
                       <span class="o">|</span>   <span class="o">|</span>
                       <span class="o">|</span>   <span class="o">...</span>
                       <span class="o">...</span>
</pre></div>
</div>
</div>
<div class="section" id="gnt-cluster-upgrade">
<h3><a class="toc-backref" href="#id5">gnt-cluster upgrade</a><a class="headerlink" href="#gnt-cluster-upgrade" title="Permalink to this headline"></a></h3>
<p>The actual upgrade process will be done by a new command <code class="docutils literal"><span class="pre">upgrade</span></code> to
<code class="docutils literal"><span class="pre">gnt-cluster</span></code>. If called with the option <code class="docutils literal"><span class="pre">--to</span></code> which take precisely
one argument, the version to
upgrade (or downgrade) to, given as full string with major, minor, revision,
and suffix. To be compatible with current configuration upgrade and downgrade
procedures, the new version must be of the same major version and
either an equal or higher minor version, or precisely the previous
minor version.</p>
<p>When executed, <code class="docutils literal"><span class="pre">gnt-cluster</span> <span class="pre">upgrade</span> <span class="pre">--to=&lt;version&gt;</span></code> will perform the
following actions.</p>
<ul class="simple">
<li>It verifies that the version to change to is installed on all nodes
of the cluster that are not marked as offline. If this is not the
case it aborts with an error. This initial testing is an
optimization to allow for early feedback.</li>
<li>An intent-to-upgrade file is created that contains the current
version of ganeti, the version to change to, and the process ID of
the <code class="docutils literal"><span class="pre">gnt-cluster</span> <span class="pre">upgrade</span></code> process. The latter is not used automatically,
but allows manual detection if the upgrade process died
unintentionally. The intend-to-upgrade file is persisted to disk
before continuing.</li>
<li>The Ganeti job queue is drained, and the executable waits till there
are no more jobs in the queue. Once <a class="reference internal" href="design-optables.html"><span class="doc">Filtering of jobs for the Ganeti job queue</span></a> is
implemented, for upgrades, and only for upgrades, all jobs are paused
instead (in the sense that the currently running opcode continues,
but the next opcode is not started) and it is continued once all
jobs are fully paused.</li>
<li>All ganeti daemons on the master node are stopped.</li>
<li>It is verified again that all nodes at this moment not marked as
offline have the new version installed. If this is not the case,
then all changes so far (stopping ganeti daemons and draining the
queue) are undone and failure is reported. This second verification
is necessary, as the set of online nodes might have changed during
the draining period.</li>
<li>All ganeti daemons on all remaining (non-offline) nodes are stopped.</li>
<li>A backup of all Ganeti-related status information is created for
manual rollbacks. While the normal way of rolling back after an
upgrade should be calling <code class="docutils literal"><span class="pre">gnt-cluster</span> <span class="pre">upgrade</span></code> from the newer version
with the older version as argument, a full backup provides an
additional safety net, especially for jump-upgrades (skipping
intermediate minor versions).</li>
<li>If the action is a downgrade to the previous minor version, the
configuration is downgraded now, using <code class="docutils literal"><span class="pre">cfgupgrade</span> <span class="pre">--downgrade</span></code>.</li>
<li>If the action is downgrade, any version-specific additional downgrade
actions are carried out.</li>
<li>The <code class="docutils literal"><span class="pre">${sysconfdir}/ganeti/lib</span></code> and <code class="docutils literal"><span class="pre">${sysconfdir}/ganeti/share</span></code>
symbolic links are updated.</li>
<li>If the action is an upgrade to a higher minor version, the configuration
is upgraded now, using <code class="docutils literal"><span class="pre">cfgupgrade</span></code>.</li>
<li><code class="docutils literal"><span class="pre">ensure-dirs</span> <span class="pre">--full-run</span></code> is run on all nodes.</li>
<li>All daemons are started on all nodes.</li>
<li><code class="docutils literal"><span class="pre">gnt-cluster</span> <span class="pre">redist-conf</span></code> is run on the master node.</li>
<li>All daemons are restarted on all nodes.</li>
<li>The Ganeti job queue is undrained.</li>
<li>The intent-to-upgrade file is removed.</li>
<li><code class="docutils literal"><span class="pre">post-upgrade</span></code> is run with the original version as argument.</li>
<li><code class="docutils literal"><span class="pre">gnt-cluster</span> <span class="pre">verify</span></code> is run and the result reported.</li>
</ul>
</div>
</div>
<div class="section" id="considerations-on-unintended-reboots-of-the-master-node">
<h2><a class="toc-backref" href="#id6">Considerations on unintended reboots of the master node</a><a class="headerlink" href="#considerations-on-unintended-reboots-of-the-master-node" title="Permalink to this headline"></a></h2>
<p>During the upgrade procedure, the only ganeti process still running is
the one instance of <code class="docutils literal"><span class="pre">gnt-cluster</span> <span class="pre">upgrade</span></code>. This process is also responsible
for eventually removing the queue drain. Therefore, we have to provide
means to resume this process, if it dies unintentionally. The process
itself will handle SIGTERM gracefully by either undoing all changes
done so far, or by ignoring the signal all together and continuing to
the end; the choice between these behaviors depends on whether change
of the configuration has already started (in which case it goes
through to the end), or not (in which case the actions done so far are
rolled back).</p>
<p>To achieve this, <code class="docutils literal"><span class="pre">gnt-cluster</span> <span class="pre">upgrade</span></code> will support a <code class="docutils literal"><span class="pre">--resume</span></code>
option. It is recommended
to have <code class="docutils literal"><span class="pre">gnt-cluster</span> <span class="pre">upgrade</span> <span class="pre">--resume</span></code> as an at-reboot task in the crontab.
The <code class="docutils literal"><span class="pre">gnt-cluster</span> <span class="pre">upgrade</span> <span class="pre">--resume</span></code> command first verifies that
it is running on the master node, using the same requirement as for
starting the master daemon, i.e., confirmed by a majority of all
nodes. If it is not the master node, it will remove any possibly
existing intend-to-upgrade file and exit. If it is running on the
master node, it will check for the existence of an intend-to-upgrade
file. If no such file is found, it will simply exit. If found, it will
resume at the appropriate stage.</p>
<ul class="simple">
<li>If the configuration file still is at the initial version,
<code class="docutils literal"><span class="pre">gnt-cluster</span> <span class="pre">upgrade</span></code> is resumed at the step immediately following the
writing of the intend-to-upgrade file. It should be noted that
all steps before changing the configuration are idempotent, so
redoing them does not do any harm.</li>
<li>If the configuration is already at the new version, all daemons on
all nodes are stopped (as they might have been started again due
to a reboot) and then it is resumed at the step immediately
following the configuration change. All actions following the
configuration change can be repeated without bringing the cluster
into a worse state.</li>
</ul>
</div>
<div class="section" id="caveats">
<h2><a class="toc-backref" href="#id7">Caveats</a><a class="headerlink" href="#caveats" title="Permalink to this headline"></a></h2>
<p>Since <code class="docutils literal"><span class="pre">gnt-cluster</span> <span class="pre">upgrade</span></code> drains the queue and undrains it later, so any
information about a previous drain gets lost. This problem will
disappear, once <a class="reference internal" href="design-optables.html"><span class="doc">Filtering of jobs for the Ganeti job queue</span></a> is implemented, as then the
undrain will then be restricted to filters by gnt-upgrade.</p>
</div>
<div class="section" id="requirement-of-job-queue-update">
<h2><a class="toc-backref" href="#id8">Requirement of job queue update</a><a class="headerlink" href="#requirement-of-job-queue-update" title="Permalink to this headline"></a></h2>
<p>Since for upgrades we only pause jobs and do not fully drain the
queue, we need to be able to transform the job queue into a queue for
the new version. The preferred way to obtain this is to keep the
serialization format backwards compatible, i.e., only adding new
opcodes and new optional fields.</p>
<p>However, even with soft drain, no job is running at the moment <cite>cfgupgrade</cite>
is running. So, if we change the queue representation, including the
representation of individual opcodes in any way, <cite>cfgupgrade</cite> will also
modify the queue accordingly. In a jobs-as-processes world, pausing a job
will be implemented in such a way that the corresponding process stops after
finishing the current opcode, and a new process is created if and when the
job is unpaused again.</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="#">Automatized Upgrade Procedure for Ganeti</a><ul>
<li><a class="reference internal" href="#current-state-and-shortcomings">Current state and shortcomings</a></li>
<li><a class="reference internal" href="#proposed-changes">Proposed changes</a><ul>
<li><a class="reference internal" href="#path-changes-to-allow-multiple-versions-installed">Path changes to allow multiple versions installed</a></li>
<li><a class="reference internal" href="#gnt-cluster-upgrade">gnt-cluster upgrade</a></li>
</ul>
</li>
<li><a class="reference internal" href="#considerations-on-unintended-reboots-of-the-master-node">Considerations on unintended reboots of the master node</a></li>
<li><a class="reference internal" href="#caveats">Caveats</a></li>
<li><a class="reference internal" href="#requirement-of-job-queue-update">Requirement of job queue update</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="design-systemd.html"
                        title="previous chapter">Systemd integration</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="design-virtual-clusters.html"
                        title="next chapter">Design for virtual clusters support</a></p>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="_sources/design-upgrade.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-virtual-clusters.html" title="Design for virtual clusters support"
             >next</a></li>
        <li class="right" >
          <a href="design-systemd.html" title="Systemd integration"
             >previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="index.html">Ganeti 2.16.0~rc2 documentation</a> &#187;</li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
        &#169; 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>