Revision 386b57af man/ganeti-os-interface.sgml

b/man/ganeti-os-interface.sgml
53 53
    <title>REFERENCE</title>
54 54

  
55 55
    <para>
56
      There are four required files: <filename>create</filename>,
57
      <filename>import</filename>, <filename>export</filename>
58
      (executables) and <filename>ganeti_api_version</filename> (text
59
      file).
56
      There are five required files: <filename>create</filename>,
57
      <filename>import</filename>, <filename>export</filename>,
58
      <filename>rename</filename> (executables) and
59
      <filename>ganeti_api_version</filename> (text file).
60 60
    </para>
61 61

  
62 62
    <refsect2>
......
81 81
      denote the block devices which will be visible in the instance
82 82
      as <emphasis>sda</emphasis> and <emphasis>sdb</emphasis>. The
83 83
      <emphasis>sda</emphasis> block device should be used for the
84
      root disk (and will be passed as the root device for linux
84
      root disk (and will be passed as the root device for Linux
85 85
      kernels). The <emphasis>sdb</emphasis> device should be setup
86 86
      for swap usage.</para>
87 87

  
......
132 132
    </refsect2>
133 133

  
134 134
    <refsect2>
135
      <title>rename</title>
136
      <cmdsynopsis>
137
        <command>rename</command>
138
        <arg choice="req">-o <replaceable>old_name</replaceable></arg>
139
        <arg choice="req">-n <replaceable>new_name</replaceable></arg>
140
        <arg choice="req">-b <replaceable>blockdev_sda</replaceable></arg>
141
        <arg choice="req">-s <replaceable>blockdev_sdb</replaceable></arg>
142
      </cmdsynopsis>
143

  
144
      <para>
145
        This command is used in order to perform a rename at the
146
        instance OS level, after the instance has been renamed in
147
        Ganeti. The command should do whatever steps are required to
148
        ensure that the instance is updated to use the new name, if
149
        the operating system supports it.
150
      </para>
151

  
152
      <para>
153
        Note that it is acceptable for the rename script to do nothing
154
        at all, however be warned that in this case, there will be a
155
        desynchronization between what <computeroutput>gnt-instance
156
        list</computeroutput> shows you and the actual hostname of the
157
        instance.
158
      </para>
159

  
160
      <para>
161
        A very simple rename script should at least change the
162
        hostname and IP address of the instance, leaving the
163
        administrator to update the other services.
164
        </screen>
165
      </para>
166
    </refsect2>
167

  
168
    <refsect2>
135 169
      <title>ganeti_api_version</title>
136 170
      <para>
137 171
        The <filename>ganeti_api_version</filename> file is a plain
138 172
        text file containing the version of the guest OS api that this
139 173
        OS definition complies with. The version documented by this
140
        man page is 4, so this file must contain 4 followed by a
141
        newline.
174
        man page is 5, so this file must contain the number 5 followed
175
        by a newline.
142 176
      </para>
143 177
    </refsect2>
144 178

  
......
154 188

  
155 189
    </refsect2>
156 190

  
191
    <refsect2>
192
      <title>Upgrading from old versions</title>
193
      <refsect3>
194
        <title>Version 4 to 5</title>
195
        <para>
196
          The <filename>rename</filename> script has been added. If
197
          you don't want to do any changes on the instances after a
198
          rename, you can migrate the OS definition to version 5 by
199
          creating the <filename>rename</filename> script simply as:
200
          <screen>
201
#!/bin/sh
202

  
203
exit 0
204
          </screen>
205
        </para>
206

  
207
        <para>Note that the script must be executable.</para>
208
      </refsect3>
209
    </refsect2>
210

  
157 211
    <!--
158 212
    <refsect2>
159 213

  
160 214
      <title>Export/import format</title>
161 215

  
162
      <para>It is up to the export and import scripts to define the format they use. It is only required for these two to work together. It is not recommended that </para>
216
      <para>
217
        It is up to the export and import scripts to define the format
218
        they use. It is only required for these two to work
219
        together. It is not recommended that
220
      </para>
163 221

  
164 222
    </refsect2>
165 223
    -->

Also available in: Unified diff