This file is indexed.

/usr/share/doc/ganeti/html/design-reservations.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
<!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>Instance Reservations &#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="DRBD Sync Rate Throttling" href="design-sync-rate-throttling.html" />
    <link rel="prev" title="Design for adding ifdown script to KVM" href="design-ifdown.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-sync-rate-throttling.html" title="DRBD Sync Rate Throttling"
             accesskey="N">next</a></li>
        <li class="right" >
          <a href="design-ifdown.html" title="Design for adding ifdown script to KVM"
             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>
          <li class="nav-item nav-item-1"><a href="design-draft.html" accesskey="U">Design document drafts</a> &#187;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="instance-reservations">
<h1><a class="toc-backref" href="#id1">Instance Reservations</a><a class="headerlink" href="#instance-reservations" 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">2014-Jul-22</td>
</tr>
<tr class="field-even field"><th class="field-name">Status:</th><td class="field-body">Partially Implemented</td>
</tr>
<tr class="field-odd field"><th class="field-name">Ganeti-Version:</th><td class="field-body">2.12.0, 2.14.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="#instance-reservations" id="id1">Instance Reservations</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="#rapi-extension" id="id4">RAPI extension</a></li>
<li><a class="reference internal" href="#representation-in-the-configuration" id="id5">Representation in the Configuration</a><ul>
<li><a class="reference internal" href="#rationale" id="id6">Rationale</a></li>
<li><a class="reference internal" href="#haskell-representation" id="id7">Haskell Representation</a></li>
</ul>
</li>
<li><a class="reference internal" href="#adaptions-of-htools" id="id8">Adaptions of htools</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<p>This is a design document detailing the addition of a concept
of reservations for forthcoming instances to Ganeti.</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>Currently, for a new instance, all information about the instance,
including a resolvable full name, needs to be present before an
instance creation can be attempted. Moreover, the only way to find
out if a cluster can host an instance is to try creating it. This
can lead to problems in situations where the host name can only
be determined, and hence DNS entries created, once the cluster for
the instance is chosen. If lot of instances are created in parallel,
by the time the DNS entries propagated, the cluster capacity might
already be exceeded.</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>The proposed solution to overcome this shortcoming is to support
<em>forthcoming instances</em>. Those forthcoming instances only exist as entries in
in the configuration, hence creation and removal is cheap. Forthcoming instances
can have an arbitrary subset of the attributes of a real instance with
only the UUID being mandatory. In a similar way, their disks are also
considered forthcoming. If a forthcoming instance specifies resources
(memory, disk sizes, number of CPUs), these resources are accounted
for as if they were real. In particular, a forthcoming can always be
turned into a real one without running out of resources.</p>
<div class="section" id="rapi-extension">
<h3><a class="toc-backref" href="#id4">RAPI extension</a><a class="headerlink" href="#rapi-extension" title="Permalink to this headline"></a></h3>
<p>To accomdate the handling of forthcoming instances, the <a class="reference internal" href="rapi.html"><span class="doc">Ganeti remote API</span></a>
will be extended as follows.</p>
<p>The following functionality will be added to existing resources.</p>
<ul class="simple">
<li>/2/instances/<ul>
<li>POST. This request will have an additional, optional, <code class="docutils literal"><span class="pre">forthcoming</span></code>
flag with default <code class="docutils literal"><span class="pre">False</span></code>. If the <code class="docutils literal"><span class="pre">forthcoming</span></code> flag is set, all
parameters are optional, including the instance name. Even if
<code class="docutils literal"><span class="pre">forthcoming</span></code> is set, the result of this request will still be the job id
to be used later for polling. A job to create a forthcoming instance,
however, will return the UUID of the instance instead of the hosts
allocated for it.</li>
</ul>
</li>
<li>/2/instances/[instance_name]/modify<ul>
<li>PUT. This request will be able to handle forthcoming instances
in the same way as existing ones.</li>
</ul>
</li>
</ul>
<p>The following resources will be added.</p>
<ul class="simple">
<li>/2/instances/[instance_uuid]/modify<ul>
<li>PUT. This will behave the same as the <code class="docutils literal"><span class="pre">modify</span></code> indexed by instance
name and is added to allow modification of an instance that does
not yet have a name.</li>
</ul>
</li>
<li>/2/instances/[instance_uuid]/rename<ul>
<li>PUT. This will behave the same as the <code class="docutils literal"><span class="pre">rename</span></code> indexed by
instance name. This will allow to assign a name to a forthcoming
instance.</li>
</ul>
</li>
<li>/2/instances/[instance_name]/create<ul>
<li>POST. Create the forthcoming instance. It is a prerequisite that
all mandatory parameters of the instance are specified by now.
It will return the id of the creation job, for later polling.</li>
</ul>
</li>
</ul>
</div>
<div class="section" id="representation-in-the-configuration">
<h3><a class="toc-backref" href="#id5">Representation in the Configuration</a><a class="headerlink" href="#representation-in-the-configuration" title="Permalink to this headline"></a></h3>
<p>As for most part of the system, forthcoming instances and their disks are to
be treated as if they were real. Therefore, the wire representation will be
by adding an additional, optional, <code class="docutils literal"><span class="pre">forthcoming</span></code> flag to the <code class="docutils literal"><span class="pre">instances</span></code>
and <code class="docutils literal"><span class="pre">disks</span></code> objects. Additionally, the internal consistency condition will
be relaxed to have all non-uuid fields optional if an instance or disk is
forthcoming.</p>
<div class="section" id="rationale">
<h4><a class="toc-backref" href="#id6">Rationale</a><a class="headerlink" href="#rationale" title="Permalink to this headline"></a></h4>
<p>The alternative to the chosen approach would be to add a new top-level object
<code class="docutils literal"><span class="pre">forthcoming_instances</span></code> to the configuration. Both approaches bear the risk
of introducing subtle bugs. Adding a new top-level object bears the risk of
missing in some places to take into account the resources consumed by the
forthcoming instances. Adding a new attribute and relaxing the consistency
conditions bears the risk that some parts of the Python code cannot handle the
fact that some fields are now optional if the instance is forthcoming.
The design choice is to prefer the latter kind of errors, as they will always
show up immediately when a faulty part of the code is touched and will always
precisely indicate the part of the code base that needs to be changed.</p>
</div>
<div class="section" id="haskell-representation">
<h4><a class="toc-backref" href="#id7">Haskell Representation</a><a class="headerlink" href="#haskell-representation" title="Permalink to this headline"></a></h4>
<p>The semantical condition on the instance fields renders the type into
a Pascal-style variant record (one element of an enumeration type,
and the remaining fields depend on the value of that field). Of course, in
the Haskell part of our code base, this will be represented in the standard way
having two constructors for the type; additionally there will be accessors
for all the fields of the JSON representation (yielding <code class="docutils literal"><span class="pre">Maybe</span></code> values,
as they can be optional if we’re in the <code class="docutils literal"><span class="pre">Forthcoming</span></code> constructor).</p>
</div>
</div>
<div class="section" id="adaptions-of-htools">
<h3><a class="toc-backref" href="#id8">Adaptions of htools</a><a class="headerlink" href="#adaptions-of-htools" title="Permalink to this headline"></a></h3>
<p>Forthcoming instances are handled by htools essentially the same way as
real instances with more possible moves, as a forthcoming instance may
change primary and secondary node simultaneously. The restriction of not
changing node group without explicit user request to do so remains.
Wherever possible, moves of forthcoming instances are preferred over
moving real instances, as forthcoming instances can be moved for
free. Implementation wise, the existing <code class="docutils literal"><span class="pre">Instance</span></code> data structure is
used, and a new bit <code class="docutils literal"><span class="pre">forthcoming</span></code> is added; for forthcoming
instances, the <code class="docutils literal"><span class="pre">name</span></code> field will carry the UUID.</p>
</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="#">Instance Reservations</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="#rapi-extension">RAPI extension</a></li>
<li><a class="reference internal" href="#representation-in-the-configuration">Representation in the Configuration</a><ul>
<li><a class="reference internal" href="#rationale">Rationale</a></li>
<li><a class="reference internal" href="#haskell-representation">Haskell Representation</a></li>
</ul>
</li>
<li><a class="reference internal" href="#adaptions-of-htools">Adaptions of htools</a></li>
</ul>
</li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="design-ifdown.html"
                        title="previous chapter">Design for adding ifdown script to KVM</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="design-sync-rate-throttling.html"
                        title="next chapter">DRBD Sync Rate Throttling</a></p>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="_sources/design-reservations.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-sync-rate-throttling.html" title="DRBD Sync Rate Throttling"
             >next</a></li>
        <li class="right" >
          <a href="design-ifdown.html" title="Design for adding ifdown script to KVM"
             >previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="index.html">Ganeti 2.16.0~rc2 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="design-draft.html" >Design document drafts</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>