dont forget to define shell in remove_node
authorTony Mack <tmack@cs.princeton.edu>
Thu, 11 Mar 2010 22:26:49 +0000 (22:26 +0000)
committerTony Mack <tmack@cs.princeton.edu>
Thu, 11 Mar 2010 22:26:49 +0000 (22:26 +0000)
PLC/Peers.py

index e78f568..13eaabc 100644 (file)
@@ -178,6 +178,11 @@ class Peer(Row):
     
         remove = Row.remove_object(Node, 'peer_node')
         remove(self, node, commit)
+
+        # calling UpdateNode with the node's hostname
+        # will force the 'hrn' tag to be updated with the
+        # correct root auth
+        shell = Shell() 
         UpdateNode = self.api.callable('UpdateNode')
         UpdateNode(shell.auth, node['node_id'], {'hostname': node['hostname']})