LGTM, thanks On Thu, Apr 23, 2015 at 5:30 PM, 'Helga Velroyen' via ganeti-devel < [email protected]> wrote:
> As it emits warnings for any unupdated nodes, lets name > it appropriately. > > Signed-off-by: Helga Velroyen <[email protected]> > --- > lib/cmdlib/cluster.py | 4 ++-- > lib/cmdlib/common.py | 2 +- > lib/cmdlib/node.py | 13 +++++++------ > 3 files changed, 10 insertions(+), 9 deletions(-) > > diff --git a/lib/cmdlib/cluster.py b/lib/cmdlib/cluster.py > index f4bf913..7594d18 100644 > --- a/lib/cmdlib/cluster.py > +++ b/lib/cmdlib/cluster.py > @@ -69,7 +69,7 @@ from ganeti.cmdlib.common import ShareAll, RunPostHook, \ > AddInstanceCommunicationNetworkOp, > ConnectInstanceCommunicationNetworkOp, \ > CheckImageValidity, \ > CheckDiskAccessModeConsistency, CreateNewClientCert, EnsureKvmdOnNodes, > \ > - EvaluateSshUpdateRPC > + WarnAboutFailedSshUpdates > > import ganeti.masterd.instance > > @@ -272,7 +272,7 @@ class LUClusterRenewCrypto(NoHooksLU): > result[master_uuid].Raise("Could not renew the SSH keys of all nodes") > > # Process any non-disruptive errors (a few nodes unreachable etc.) > - EvaluateSshUpdateRPC(result, master_uuid, feedback_fn) > + WarnAboutFailedSshUpdates(result, master_uuid, feedback_fn) > > def Exec(self, feedback_fn): > if self.op.node_certificates: > diff --git a/lib/cmdlib/common.py b/lib/cmdlib/common.py > index 5e5f573..dd34bc5 100644 > --- a/lib/cmdlib/common.py > +++ b/lib/cmdlib/common.py > @@ -1556,7 +1556,7 @@ def EnsureKvmdOnNodes(lu, feedback_fn, nodes=None): > node_uuid, feedback_fn) > > > -def EvaluateSshUpdateRPC(result, master_uuid, feedback_fn): > +def WarnAboutFailedSshUpdates(result, master_uuid, feedback_fn): > node_errors = result[master_uuid].payload > if node_errors: > feedback_fn("Some nodes' SSH key files could not be updated:") > diff --git a/lib/cmdlib/node.py b/lib/cmdlib/node.py > index 41451b3..18d4f34 100644 > --- a/lib/cmdlib/node.py > +++ b/lib/cmdlib/node.py > @@ -53,7 +53,8 @@ from ganeti.cmdlib.common import CheckParamsNotGlobal, \ > GetWantedNodes, MapInstanceLvsToNodes, RunPostHook, \ > FindFaultyInstanceDisks, CheckStorageTypeEnabled, CreateNewClientCert, \ > AddNodeCertToCandidateCerts, RemoveNodeCertFromCandidateCerts, \ > - EnsureKvmdOnNodes, EvaluateSshUpdateRPC > + EnsureKvmdOnNodes, WarnAboutFailedSshUpdates > + > from ganeti.ssh import GetSshPortMap > > > @@ -366,7 +367,7 @@ class LUNodeAdd(LogicalUnit): > remove_result[master_node].Raise( > "Could not remove SSH keys of node %s before readding," > " (UUID: %s)." % (new_node_name, new_node_uuid)) > - EvaluateSshUpdateRPC(remove_result, master_node, feedback_fn) > + WarnAboutFailedSshUpdates(remove_result, master_node, feedback_fn) > > result = rpcrunner.call_node_ssh_key_add( > [master_node], new_node_uuid, new_node_name, > @@ -375,7 +376,7 @@ class LUNodeAdd(LogicalUnit): > is_potential_master_candidate) > > result[master_node].Raise("Could not update the node's SSH setup.") > - EvaluateSshUpdateRPC(result, master_node, feedback_fn) > + WarnAboutFailedSshUpdates(result, master_node, feedback_fn) > > def Exec(self, feedback_fn): > """Adds the new node to the cluster. > @@ -886,7 +887,7 @@ class LUNodeSetParams(LogicalUnit): > ssh_result[master_node].Raise( > "Could not adjust the SSH setup after demoting node '%s'" > " (UUID: %s)." % (node.name, node.uuid)) > - EvaluateSshUpdateRPC(ssh_result, master_node, feedback_fn) > + WarnAboutFailedSshUpdates(ssh_result, master_node, feedback_fn) > > if self.new_role == self._ROLE_CANDIDATE: > ssh_result = self.rpc.call_node_ssh_key_add( > @@ -898,7 +899,7 @@ class LUNodeSetParams(LogicalUnit): > ssh_result[master_node].Raise( > "Could not update the SSH setup of node '%s' after promotion" > " (UUID: %s)." % (node.name, node.uuid)) > - EvaluateSshUpdateRPC(ssh_result, master_node, feedback_fn) > + WarnAboutFailedSshUpdates(ssh_result, master_node, feedback_fn) > > return result > > @@ -1595,7 +1596,7 @@ class LUNodeRemove(LogicalUnit): > result[master_node].Raise( > "Could not remove the SSH key of node '%s' (UUID: %s)." % > (self.op.node_name, self.node.uuid)) > - EvaluateSshUpdateRPC(result, master_node, feedback_fn) > + WarnAboutFailedSshUpdates(result, master_node, feedback_fn) > > # Promote nodes to master candidate as needed > AdjustCandidatePool(self, [self.node.uuid]) > -- > 2.2.0.rc0.207.ga3a616c > > Hrvoje Ribicic Ganeti Engineering Google Germany GmbH Dienerstr. 12, 80331, München Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: Hamburg Geschäftsführer: Graham Law, Christine Elizabeth Flores Steuernummer: 48/725/00206 Umsatzsteueridentifikationsnummer: DE813741370
