when rebooting, remove all marks, not only for the running vservers
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Sat, 8 Jan 2011 16:32:25 +0000 (17:32 +0100)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Sat, 8 Jan 2011 16:32:25 +0000 (17:32 +0100)
scripts/manage-infrastructure.py

index 84dcb79..4709c15 100755 (executable)
@@ -220,11 +220,14 @@ class BuildBoxes:
             vserver_names.append(longname)
             print self.margin_outline(self.vplcname(longname)),"%(vserver_line)s [=%(longname)s]"%locals()
         if not self.options.probe:
-            # remove mark for all running servers to avoid resurrection
-            if vserver_names:
-                bash="; ".join( [ "rm -f /etc/vservers/%s/apps/init/mark"%vs for vs in vserver_names ] )
-                stop_command=['bash','-c',"'" + bash + "'"]
-                self.run_ssh(box,stop_command,"Removing mark on running vservers on %s"%box)
+#            # remove mark for all running servers to avoid resurrection
+#            if vserver_names:
+#                bash="; ".join( [ "rm -f /etc/vservers/%s/apps/init/mark"%vs for vs in vserver_names ] )
+#                stop_command=['bash','-c',"'" + bash + "'"]
+#                self.run_ssh(box,stop_command,"Removing mark on running vservers on %s"%box)
+            # just trash all marks 
+            stop_command=['rm','-rf','/etc/vservers/*/apps/init/mark']
+            self.run_ssh(box,stop_command,"Removing all vserver marks on %s"%box)
             self.reboot(box)
 
     vnode_matcher = re.compile(".*(vnode[0-9]+)")