Revision 40d93e3b

b/lib/cmdlib/cluster.py
528 528
      "Not owning correct locks"
529 529
    assert not self.owned_locks(locking.LEVEL_NODE)
530 530

  
531
    es_flags = rpc.GetExclusiveStorageForNodeNames(self.cfg,
532
                                                   per_node_disks.keys())
533

  
531 534
    changed = []
532 535
    for node, dskl in per_node_disks.items():
533 536
      newl = [v[2].Copy() for v in dskl]
......
554 557
                          " dimension information, ignoring", idx,
555 558
                          instance.name)
556 559
          continue
557
        (size, _) = dimensions
560
        (size, spindles) = dimensions
558 561
        if not isinstance(size, (int, long)):
559 562
          self.LogWarning("Disk %d of instance %s did not return valid"
560 563
                          " size information, ignoring", idx, instance.name)
......
566 569
                       instance.name, disk.size, size)
567 570
          disk.size = size
568 571
          self.cfg.Update(instance, feedback_fn)
569
          changed.append((instance.name, idx, size))
572
          changed.append((instance.name, idx, "size", size))
573
        if es_flags[node]:
574
          if spindles is None:
575
            self.LogWarning("Disk %d of instance %s did not return valid"
576
                            " spindles information, ignoring", idx,
577
                            instance.name)
578
          elif disk.spindles is None or disk.spindles != spindles:
579
            self.LogInfo("Disk %d of instance %s has mismatched spindles,"
580
                         " correcting: recorded %s, actual %s",
581
                         idx, instance.name, disk.spindles, spindles)
582
            disk.spindles = spindles
583
            self.cfg.Update(instance, feedback_fn)
584
            changed.append((instance.name, idx, "spindles", disk.spindles))
570 585
        if self._EnsureChildSizes(disk):
571 586
          self.cfg.Update(instance, feedback_fn)
572
          changed.append((instance.name, idx, disk.size))
587
          changed.append((instance.name, idx, "size", disk.size))
573 588
    return changed
574 589

  
575 590

  
b/lib/opcodes.py
868 868
  Parameters: optional instances list, in case we want to restrict the
869 869
  checks to only a subset of the instances.
870 870

  
871
  Result: a list of tuples, (instance, disk, new-size) for changed
871
  Result: a list of tuples, (instance, disk, parameter, new-size) for changed
872 872
  configurations.
873 873

  
874 874
  In normal operation, the list should be empty.
......
880 880
  OP_PARAMS = [
881 881
    ("instances", ht.EmptyList, ht.TListOf(ht.TNonEmptyString), None),
882 882
    ]
883
  OP_RESULT = ht.TListOf(ht.TAnd(ht.TIsLength(3),
883
  OP_RESULT = ht.TListOf(ht.TAnd(ht.TIsLength(4),
884 884
                                 ht.TItems([ht.TNonEmptyString,
885 885
                                            ht.TNonNegativeInt,
886
                                            ht.TNonEmptyString,
886 887
                                            ht.TNonNegativeInt])))
887 888

  
888 889

  
b/man/gnt-cluster.rst
758 758
disks matches the actual size and updates any mismatches found.
759 759
This is needed if the Ganeti configuration is no longer consistent
760 760
with reality, as it will impact some disk operations. If no
761
arguments are given, all instances will be checked.
761
arguments are given, all instances will be checked. When exclusive
762
storage is active, also spindles are updated.
762 763

  
763 764
Note that only active disks can be checked by this command; in case
764 765
a disk cannot be activated it's advised to use
765 766
**gnt-instance activate-disks \--ignore-size ...** to force
766 767
activation without regard to the current size.
767 768

  
768
When the all disk sizes are consistent, the command will return no
769
When all the disk sizes are consistent, the command will return no
769 770
output. Otherwise it will log details about the inconsistencies in
770 771
the configuration.
771 772

  

Also available in: Unified diff