Revision 949bdabe

b/doc/examples/ganeti.initd.in
64 64
start_action() {
65 65
    # called as start_action daemon pidfile
66 66
    local daemon="$1"; shift
67
    local pidfile="$2"; shift
67
    local pidfile="$1"; shift
68 68
    log_action_begin_msg "$daemon"
69 69
    start-stop-daemon --start --quiet --exec "$daemon" --pidfile "$pidfile" \
70 70
        -- "$@"
b/lib/cmdlib.py
2335 2335
        ((node.offline and not self.op.offline == False) or
2336 2336
         (node.drained and not self.op.drained == False))):
2337 2337
      raise errors.OpPrereqError("Node '%s' is offline or drained, can't set"
2338
                                 " to master_candidate")
2338
                                 " to master_candidate" % node.name)
2339 2339

  
2340 2340
    return
2341 2341

  
b/man/gnt-backup.sgml
331 331
<screen>
332 332
# gnt-backup list --nodes node1 --nodes node2
333 333
</screen>
334
      </para>
334 335
    </refsect2>
335 336

  
336 337
    <refsect2>
b/man/gnt-debug.sgml
107 107
        for more details about this framework, see the HTML or PDF
108 108
        documentation.
109 109
      </para>
110
    </refsect2>
110 111

  
111 112
    <refsect2>
112 113
      <title>DELAY</title>
b/man/gnt-instance.sgml
1225 1225
        </cmdsynopsis>
1226 1226

  
1227 1227
        <para>
1228
          Reinstalls the operating system on the given instance. The instance
1229
          must be stopped when running this command. If the
1230
          <option>--os-type</option> is specified, the operating system is
1231
          changed.
1228
          Reinstalls the operating system on the given instance. The
1229
          instance must be stopped when running this command. If the
1230
          <option>--os-type</option> is specified, the operating
1231
          system is changed.
1232
        </para>
1233

  
1234
        <para>
1235
          Since reinstall is potentially dangerous command, the user
1236
          will be required to confirm this action, unless the
1237
          <option>-f</option> flag is passed.
1232 1238
        </para>
1233 1239

  
1234 1240
        <para>
......
1547 1553
          <command>replace-disks</command>
1548 1554
          <arg>--submit</arg>
1549 1555
          <arg choice="req">-p</arg>
1556
          <arg>--disks <replaceable>idx</replaceable></arg>
1550 1557
          <arg choice="req"><replaceable>instance</replaceable></arg>
1551 1558
        </cmdsynopsis>
1552 1559

  
......
1554 1561
          <command>replace-disks</command>
1555 1562
          <arg>--submit</arg>
1556 1563
          <arg choice="req">-s</arg>
1564
          <arg>--disks <replaceable>idx</replaceable></arg>
1557 1565
          <arg choice="req"><replaceable>instance</replaceable></arg>
1558 1566
        </cmdsynopsis>
1559 1567

  
......
1569 1577
        </cmdsynopsis>
1570 1578

  
1571 1579
        <para>
1572
          This command is a generalized form for adding and replacing
1573
          disks. It is currently only valid for the mirrored (DRBD)
1574
          disk template.
1580
          This command is a generalized form for replacing disks. It
1581
          is currently only valid for the mirrored (DRBD) disk
1582
          template.
1575 1583
        </para>
1576 1584

  
1577 1585
        <para>
1578 1586
          The first form (when passing the <option>-p</option> option)
1579 1587
          will replace the disks on the primary, while the second form
1580 1588
          (when passing the <option>-s</option> option will replace
1581
          the disks on the secondary node.
1589
          the disks on the secondary node. For these two cases (as the
1590
          node doesn't change), it is possible to only run the replace
1591
          for a subset of the disks, using the option
1592
          <option>--disks</option> which takes a list of
1593
          comma-delimited disk indices (zero-based),
1594
          e.g. <userinput>0,2</userinput> to replace only the first
1595
          and third disks.
1582 1596
        </para>
1583 1597

  
1584 1598
        <para>
b/man/gnt-node.sgml
503 503
    </refsect2>
504 504

  
505 505
    <refsect2>
506
      <title>MODIFY</title>
507
      <cmdsynopsis>
508
        <command>modify</command>
509
        <arg>-f</arg>
510
        <arg>--submit</arg>
511
        <arg>--master-candidate=<option>yes|no</option></arg>
512
        <arg>--drained=<option>yes|no</option></arg>
513
        <arg>--offline=<option>yes|no</option></arg>
514
        <arg choice="req"><replaceable>node</replaceable></arg>
515
      </cmdsynopsis>
516

  
517
      <para>
518
        This command changes the role of the node. Each options takes
519
        either a literal <literal>yes</literal> or
520
        <literal>no</literal>, and only one option should be given as
521
        <literal>yes</literal>. The meaning of the roles are described
522
        in the manpage <citerefentry>
523
        <refentrytitle>ganeti</refentrytitle> <manvolnum>7</manvolnum>
524
        </citerefentry>.
525
      </para>
526

  
527
      <para>
528
        In case a node is demoted from the master candidate role, but
529
        there are not enough new nodes for this case, the operation
530
        will be refused. To override this check, pass the
531
        <option>--force</option> option.
532
      </para>
533

  
534
      <para>
535
        Example (setting a node offline, which will demote it from
536
        master candidate role if is in that role):
537
        <screen>
538
# gnt-node modify --offline=yes node1.example.com
539
        </screen>
540
      </para>
541

  
542
      <para>Example (setting the node back to online and master candidate):
543
        <screen>
544
# gnt-node modify --offline=no --master-candidate=yes node1.example.com
545
        </screen>
546
      </para>
547

  
548
    </refsect2>
549

  
550
    <refsect2>
506 551
      <title>REMOVE</title>
507 552

  
508 553
      <cmdsynopsis>
b/scripts/gnt-instance
543 543
      number = number + 1
544 544

  
545 545
    choices.append(('x', 'exit', 'Exit gnt-instance reinstall'))
546
    selected = AskUser("Enter OS template name or number (or x to abort):",
546
    selected = AskUser("Enter OS template number (or x to abort):",
547 547
                       choices)
548 548

  
549 549
    if selected == 'exit':
......
1416 1416
                                 help=("Replace the disk(s) on the secondary"
1417 1417
                                       " node (only for the drbd template)")),
1418 1418
                     make_option("--disks", dest="disks", default=None,
1419
                                 help=("Comma-separated list of disks"
1420
                                       " to replace (e.g. sda) (optional,"
1421
                                       " defaults to all disks")),
1419
                                 help="Comma-separated list of disks"
1420
                                 " indices to replace (e.g. 0,2) (optional,"
1421
                                 " defaults to all disks)"),
1422 1422
                     make_option("-I", "--iallocator", metavar="<NAME>",
1423 1423
                                 help="Select new secondary for the instance"
1424 1424
                                 " automatically using the"
b/scripts/gnt-node
541 541
              SUBMIT_OPT,
542 542
              make_option("-C", "--master-candidate", dest="master_candidate",
543 543
                          choices=('yes', 'no'), default=None,
544
                          metavar="yes|no",
544 545
                          help="Set the master_candidate flag on the node"),
545
              make_option("-O", "--offline", dest="offline",
546

  
547
              make_option("-O", "--offline", dest="offline", metavar="yes|no",
546 548
                          choices=('yes', 'no'), default=None,
547 549
                          help="Set the offline flag on the node"),
548
              make_option("-D", "--drained", dest="drained",
550
              make_option("-D", "--drained", dest="drained", metavar="yes|no",
549 551
                          choices=('yes', 'no'), default=None,
550 552
                          help="Set the drained flag on the node"),
551 553
              ],

Also available in: Unified diff