commit e48ca3f734cfcadc056edb7b6ec7bdc40bed2e7f
Merge: 216e20b 2cd22ad
Author: Klaus Aehlig <[email protected]>
Date:   Thu Jan 14 18:01:17 2016 +0100

    Merge branch 'stable-2.13' into stable-2.14
    
    * stable-2.13
      Run ssh-key renewal in debug mode during upgrade
    
    * stable-2.12
      Increase minimal sizes of test online nodes
      Also log the high-level upgrade steps
      Add function to provide logged user feedback
      Run renew-crypto in upgrades in debug mode
      Unconditionally log upgrades at debug level
      Document healthy-majority restriction on master-failover
      Check for healthy majority on master failover with voting
      Add a predicate testing that a majority of nodes is healthy
      Fix outdated comment
      Pass arguments to correct daemons during master-failover
      Fix documentation for master-failover
    
    * stable-2.11
      (no changes)
    
    * stable-2.10
      KVM: explicitly configure routed NICs late
    
    Signed-off-by: Klaus Aehlig <[email protected]>

diff --cc lib/client/gnt_cluster.py
index 27877a7,954ab4b..5c2c576
--- a/lib/client/gnt_cluster.py
+++ b/lib/client/gnt_cluster.py
@@@ -2179,8 -2187,44 +2187,8 @@@ def _VersionSpecificDowngrade()
  
    @return: True upon success
    """
-   ToStdout("Performing version-specific downgrade tasks.")
+   ToStdoutAndLoginfo("Performing version-specific downgrade tasks.")
  
 -  # Determine if this cluster is set up with SSH handling
 -  # (aka not using --no-ssh-init), check if the public
 -  # keyfile exists.
 -  update_keys = os.path.exists(pathutils.SSH_PUB_KEYS)
 -
 -  if not update_keys:
 -    return True
 -
 -  ToStdout("Replace nodes' SSH keys with the master's keys.")
 -  (_, root_keyfiles) = \
 -    ssh.GetAllUserFiles(constants.SSH_LOGIN_USER, mkdir=False, dircheck=False)
 -
 -  dsa_root_keyfiles = dict((kind, value) for (kind, value)
 -                           in root_keyfiles.items()
 -                           if kind == constants.SSHK_DSA)
 -  master_private_keyfile, master_public_keyfile = \
 -      dsa_root_keyfiles[constants.SSHK_DSA]
 -
 -  nodes = ssconf.SimpleStore().GetOnlineNodeList()
 -  master_node = ssconf.SimpleStore().GetMasterNode()
 -  cluster_name = ssconf.SimpleStore().GetClusterName()
 -
 -  # If master node is in 'nodes', remove it
 -  if master_node in nodes:
 -    nodes.remove(master_node)
 -
 -  srun = ssh.SshRunner(cluster_name=cluster_name)
 -  for name in nodes:
 -    for key_file in [master_private_keyfile, master_public_keyfile]:
 -      command = utils.text.ShellQuoteArgs([
 -          "scp", key_file, "%s:%s" % (name, key_file)])
 -      result = srun.Run(master_node, constants.SSH_LOGIN_USER, command)
 -      if result.exit_code != 0:
 -        ToStderr("Overiding SSH key '%s' of node '%s' failed. You might"
 -                 " want to clean up manually." % (key_file, name))
 -
    return True
  
  
diff --cc test/hs/Test/Ganeti/HTools/Node.hs
index b930a43,d782fe2..e7f46e2
--- a/test/hs/Test/Ganeti/HTools/Node.hs
+++ b/test/hs/Test/Ganeti/HTools/Node.hs
@@@ -114,33 -113,11 +114,33 @@@ genOnlineNode :: Gen Node.Nod
  genOnlineNode =
    arbitrary `suchThat` (\n -> not (Node.offline n) &&
                                not (Node.failN1 n) &&
-                               Node.availDisk n > 0 &&
-                               Node.availMem n > 0 &&
-                               Node.availCpu n > 0 &&
-                               Node.tSpindles n > 0)
+                               Node.availDisk n > 2 * Types.unitDsk &&
+                               Node.availMem n > 2 * Types.unitMem &&
+                               Node.availCpu n > 2 &&
+                               Node.tSpindles n > 2)
  
 +-- | Helper function to generate a sane empty node with consistent
 +-- internal data.
 +genEmptyOnlineNode :: Gen Node.Node
 +genEmptyOnlineNode =
 +  (do node <- arbitrary
 +      let fmem = truncate (Node.tMem node) - Node.nMem node
 +      let node' = node { Node.offline = False
 +                       , Node.fMem = fmem
 +                       , Node.fMemForth = fmem
 +                       , Node.pMem = fromIntegral fmem / Node.tMem node
 +                       , Node.pMemForth = fromIntegral fmem / Node.tMem node
 +                       , Node.rMem = 0
 +                       , Node.rMemForth = 0
 +                       , Node.pRem = 0
 +                       , Node.pRemForth = 0
 +                       }
 +      return node') `suchThat` (\ n -> not (Node.failN1 n) &&
 +                                       Node.availDisk n > 0 &&
 +                                       Node.availMem n > 0 &&
 +                                       Node.availCpu n > 0 &&
 +                                       Node.tSpindles n > 0)
 +
  -- | Generate a node with exclusive storage enabled.
  genExclStorNode :: Gen Node.Node
  genExclStorNode = do

-- 
Klaus Aehlig
Google Germany GmbH, Dienerstr. 12, 80331 Muenchen
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschaeftsfuehrer: Matthew Scott Sucherman, Paul Terence Manicle

Reply via email to