commit ac63745b0ee268fa267b1f29cea0aaa79587c7e6
Merge: f52c6e1 d287130
Author: Brian Foley <[email protected]>
Date:   Fri Dec 16 17:23:46 2016 +0000

    Merge branch 'stable-2.16' into stable-2.17
    
    * stable-2.15
      Fix gnt-instance console instance unpausing for xl toolstack
      Disable pylint too-many-nested-blocks in _RunCmdPipe
      Reduce nesting in import-export ProcessChildIO
      Reduce nesting in LUOobCommand.Exec
      Reduce nesting in LUInstanceCreate.RunOsScripts
      Reduce nesting in RemoveNodeSshKeyBulk key calculation
      Reduce nesting in RemoveNodeSshKeyBulk ssh logic
      Reduce nesting in gnt-cluster VerifyDisks missing disk loop
      Reduce nesting in _CheckVLANArguments
      Reduce nesting in StartDaemon
      Disable pylint bad-continuation warning
      Disable pylint superfluous-parens warning
      Disable pylint redefined-variable-type warning
      Disable pylint too-many-branches warnings
      Disable pylint broad-except warnings
      Disable incorrect pylint assigning-non-slot warning
      Quell pylint unbalanced-tuple-unpacking warning
      Cleanup: Use new-style classes everywhere
      Quell pylint socket.timeout warning
      Quell the pylint wrong-import-order warnings
      Quell cell-var-from-loop warning
      Use default value lambda param to avoid cell-var-from-loop
      Quell too-many-boolean-expressions
      Remove pylint tests removed in pylint 2.0
      Quell trailing newline
      Quell bad-whitespace warning
      Quell consider-using-enumerate warning
      Disable pylint unsubscriptable-object warning
      Disable pylint bare-except warning
      Disable unwanted pylint wrong-import-position warnings
      Disable pylint unused-wildcard-import warning
      Disable incorrect pylint not-callable warning
      Disable pylint unpacking-non-sequence warning
      Disable pylint misplaced-comparison-constant warning
      Disable incorect pylint simplify-if-statement warning
      Disable pylint eval-used warning
      Disable pylint invalid-name warning
      Disable pylint import-self warning
      Disable some pylint unused-import warnings
      Replace deprecated pylint >=0.27 pragma with new form
      Delete old warning disables removed from pylint 1.6
      Fix pylint >1.4 pycurl no-member warnings
      Cleanup: Remove unused/duplicate module/fn import
      Cleanup: Fix unidiomatic-typecheck
      Cleanup: Remove some unneeded pylint disables
      Cleanup: Iterate dict rather than key list
      Cleanup: Remove unused format key
      Cleanup: StartInstance and RebootInstance return None
      Cleanup: Fix for/else with no break in AddAuthorizedKeys
      Cleanup: Replace map/filters with list comprehensions
      Cleanup: del is a statement not a function
      Cleanup: Use FOO not in BAR instead of not FOO in BAR
      Cleanup: Simplify boolean assignment
      Cleanup: Remove some unnecessary if (...) parens
      Fix invalid variable error for file-based disks
      FIX: Refactor DiagnoseOS to use a loop, not an inner fn
      FIX: Set INSTANCE_NICn_NETWORK_NAME only if net is defined
      StartInstance restores instance state if running
      Allow migrate --cleanup to adopt an instance
      Make migrate --cleanup more robust
      Make finalize_migration_{src,dst} a single op
      Make FinalizeMigration{Src,Dst} more robust
      Fix instance state detection in _Shutdowninstance
      Code cleanup in hypervisor backend
      Fix for incorrect parsing of DRBD versions
      Fix for instance reinstall not updating config
      Change a few errors to report names, not UUIDs
      Give atomicWriteFile temp filenames a more distinct pattern
      LV check failure should print instance name
      Add ganeti-noded and ganeti-rapi --max-clients options
      Disable logging CallRPCMethod timings in non-debug configs
      568 Update hv_kvm to handle output from qemu >= 1.6.0
      Improve cluster verify ssh key errors
      Fix inconsistent spaces vs tabs indent in makefile
    
    * stable-2.13
      Bugfix: migrate needs HypervisorClass, not an instance
    
    Fix easy merge conflict in lib/backend.py -- dead code removed in 2.15
    
    Signed-off-by: Brian Foley <[email protected]>

diff --cc lib/backend.py
index 58c8b3a,1d4d2e4..5b83290
--- a/lib/backend.py
+++ b/lib/backend.py
@@@ -1914,17 -1903,21 +1919,21 @@@ def RemoveNodeSshKeyBulk(node_list
          error_msg_final = ("When removing the key of node '%s', updating the"
                             " SSH key files of node '%s' failed. Last error"
                             " was: %s.")
-         if node in potential_master_candidates:
-           logging.debug("Updating key setup of potential master candidate 
node"
-                         " %s.", node)
+ 
+         if node in potential_master_candidates or from_authorized_keys:
+           if node in potential_master_candidates:
+             node_desc = "potential master candidate"
+           else:
+             node_desc = "normal"
+           logging.debug("Updating key setup of %s node %s.", node_desc, node)
            try:
 +            backoff = 5  # seconds
              utils.RetryByNumberOfTimes(
 -                constants.SSHS_MAX_RETRIES,
 -                errors.SshUpdateError,
 +                constants.SSHS_MAX_RETRIES, backoff, errors.SshUpdateError,
                  run_cmd_fn, cluster_name, node, pathutils.SSH_UPDATE,
                  ssh_port, pot_mc_data,
 -                debug=False, verbose=False, use_cluster_key=False,
 -                ask_key=False, strict_host_check=False)
 +                debug=ssh_update_debug, verbose=ssh_update_verbose,
 +                use_cluster_key=False, ask_key=False, strict_host_check=False)
            except errors.SshUpdateError as last_exception:
              error_msg = error_msg_final % (
                  node_info.name, node, last_exception)

Reply via email to