Revision 11dc66f3

b/lib/client/gnt_instance.py
1228 1228
    buf.write("    - memory: %sMiB\n" %
1229 1229
              compat.TryToRoman(instance["be_actual"][constants.BE_MAXMEM],
1230 1230
                                convert=opts.roman_integers))
1231
    buf.write("    - %s: %s\n" %
1232
              (constants.BE_ALWAYS_FAILOVER,
1233
               instance["be_actual"][constants.BE_ALWAYS_FAILOVER]))
1231 1234
    buf.write("    - NICs:\n")
1232 1235
    for idx, (ip, mac, mode, link) in enumerate(instance["nics"]):
1233 1236
      buf.write("      - nic/%d: MAC: %s, IP: %s, mode: %s, link: %s\n" %
b/lib/cmdlib.py
7547 7547
      self.lu.LogInfo("Not checking memory on the secondary node as"
7548 7548
                      " instance will not be started")
7549 7549

  
7550
    # check if failover must be forced instead of migration
7551
    if (not self.cleanup and not self.failover and
7552
        i_be[constants.BE_ALWAYS_FAILOVER]):
7553
      if self.fallback:
7554
        self.lu.LogInfo("Instance configured to always failover; fallback"
7555
                        " to failover")
7556
        self.failover = True
7557
      else:
7558
        raise errors.OpPrereqError("This instance has been configured to"
7559
                                   " always failover, please allow failover",
7560
                                   errors.ECODE_STATE)
7561

  
7550 7562
    # check bridge existance
7551 7563
    _CheckInstanceBridgesExist(self.lu, instance, node=target_node)
7552 7564

  
b/lib/constants.py
904 904
BE_MINMEM = "minmem"
905 905
BE_VCPUS = "vcpus"
906 906
BE_AUTO_BALANCE = "auto_balance"
907
BE_ALWAYS_FAILOVER = "always_failover"
907 908

  
908 909
BES_PARAMETER_TYPES = {
909 910
  BE_MAXMEM: VTYPE_SIZE,
910 911
  BE_MINMEM: VTYPE_SIZE,
911 912
  BE_VCPUS: VTYPE_INT,
912 913
  BE_AUTO_BALANCE: VTYPE_BOOL,
914
  BE_ALWAYS_FAILOVER: VTYPE_BOOL,
913 915
  }
914 916

  
915 917
BES_PARAMETER_COMPAT = {
......
1715 1717
  BE_MAXMEM: 128,
1716 1718
  BE_VCPUS: 1,
1717 1719
  BE_AUTO_BALANCE: True,
1720
  BE_ALWAYS_FAILOVER: False,
1718 1721
  }
1719 1722

  
1720 1723
NDC_DEFAULTS = {
b/man/gnt-backup.rst
152 152
    whether the instance is considered in the N+1 cluster checks
153 153
    (enough redundancy in the cluster to survive a node failure)
154 154

  
155
always\_failover
156
    ``True`` or ``False``, whether the instance must be failed over
157
    (shut down and rebooted) always or it may be migrated (briefly
158
    suspended)
159

  
155 160

  
156 161
The ``-t`` options specifies the disk layout type for the instance.
157 162
If not passed, the configuration of the original instance is used.
b/man/gnt-cluster.rst
337 337
    Value of the auto\_balance flag for instances to use by default,
338 338
    will be set to true if not specified.
339 339

  
340
always\_failover
341
    Default value for the ``always\_failover`` flag for instances; if
342
    not set, ``False`` is used.
343

  
340 344

  
341 345
The ``-N (--nic-parameters)`` option allows you to set the default nic
342 346
parameters for the cluster. The parameter format is a comma-separated
b/man/gnt-instance.rst
144 144
    whether the instance is considered in the N+1 cluster checks
145 145
    (enough redundancy in the cluster to survive a node failure)
146 146

  
147
always\_failover
148
    ``True`` or ``False``, whether the instance must be failed over
149
    (shut down and rebooted) always or it may be migrated (briefly
150
    suspended)
151

  
147 152
Note that before 2.6 Ganeti had a ``memory`` parameter, which was the
148 153
only value of memory an instance could have. With the
149 154
``maxmem``/``minmem`` change Ganeti guarantees that at least the minimum
......
1444 1449
The option ``-f`` will skip the prompting for confirmation.
1445 1450

  
1446 1451
If ``--allow-failover`` is specified it tries to fallback to failover if
1447
it already can determine that a migration won't work (i.e. if the
1452
it already can determine that a migration won't work (e.g. if the
1448 1453
instance is shut down). Please note that the fallback will not happen
1449 1454
during execution. If a migration fails during execution it still fails.
1450 1455

  

Also available in: Unified diff