Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Remove a superfluous warning in LUNodeRemove
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Iustin Pop  
View profile  
 More options Feb 27 2012, 8:44 am
From: Iustin Pop <ius...@google.com>
Date: Mon, 27 Feb 2012 14:44:08 +0100
Local: Mon, Feb 27 2012 8:44 am
Subject: [PATCH master] Remove a superfluous warning in LUNodeRemove
Since we run the post-hooks explicitly in the Exec() function (via
_RunPostHook) after we removed the target node from the config, we
will get a:

  WARNING Node 'node2', which is about to be removed, was not found in
  the list of all nodes

in the logs every time we remove a node. The patch just removes the
warning, as actually invalid configurations (for the pre hook) will be
checked correctly elsewhere.

Additionally, the docstrings for BuildHooksEnv and BuildHooksNodes are
corrected/switched.
---
 lib/cmdlib.py |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/lib/cmdlib.py b/lib/cmdlib.py
index d475b30..e11645e 100644
--- a/lib/cmdlib.py
+++ b/lib/cmdlib.py
@@ -4849,9 +4849,6 @@ class LUNodeRemove(LogicalUnit):
   def BuildHooksEnv(self):
     """Build hooks env.

-    This doesn't run on the target node in the pre phase as a failed
-    node would then be impossible to remove.
-
     """
     return {
       "OP_TARGET": self.op.node_name,
@@ -4861,13 +4858,15 @@ class LUNodeRemove(LogicalUnit):
   def BuildHooksNodes(self):
     """Build hooks nodes.

+    This doesn't run on the target node in the pre phase as a failed
+    node would then be impossible to remove.
+
     """
     all_nodes = self.cfg.GetNodeList()
     try:
       all_nodes.remove(self.op.node_name)
     except ValueError:
-      logging.warning("Node '%s', which is about to be removed, was not found"
-                      " in the list of all nodes", self.op.node_name)
+      pass
     return (all_nodes, all_nodes)

   def CheckPrereq(self):
--
1.7.7.3


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
René Nussbaumer  
View profile  
 More options Feb 27 2012, 8:49 am
From: René Nussbaumer <r...@google.com>
Date: Mon, 27 Feb 2012 14:49:49 +0100
Local: Mon, Feb 27 2012 8:49 am
Subject: Re: [PATCH master] Remove a superfluous warning in LUNodeRemove

LGTM!

René


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »