def kill_memservers(self, mem_url): for ctrl in control.probe(): try: if ctrl.get("network") in mem_url: ctrl.kill(timeout=1.0) except control.ControlException: pass
def kill_memservers(self, mem_url): # NOTE(dscannell): The command was only added to the vmsctl command # line in vms2.7. Older versions will revert back to using the control # directly (and as a result will require the process to be executed # as root user). for ctrl in control.probe(): try: if ctrl.get("network") in mem_url: ctrl.kill(timeout=1.0) except control.ControlException: pass
def post_migration(self, instance_ref, network_info, migration_url): # We call a normal discard to ensure the artifacts are cleaned up. self.discard(instance_ref.name) # We make sure that all the memory servers are gone that need it. # This looks for any servers that are providing the migration_url we # used above -- since we no longer need it. This is done this way # because the domain has already been destroyed and wiped away. In # fact, we don't even know it's old PID and a new domain might have # appeared at the same PID in the meantime. for ctrl in control.probe(): try: if ctrl.get("network") == migration_url: ctrl.kill(timeout=1.0) except control.ControlException: pass