Revision 7e66c35b lib/hypervisor/hv_kvm.py

b/lib/hypervisor/hv_kvm.py
107 107
    """
108 108
    return '%s/%s.runtime' % (cls._CONF_DIR, instance_name)
109 109

  
110
  @classmethod
111
  def _RemoveInstanceRuntimeFiles(cls, pidfile, instance_name):
112
    """Removes an instance's rutime sockets/files.
113

  
114
    """
115
    utils.RemoveFile(pidfile)
116
    utils.RemoveFile(cls._InstanceMonitor(instance_name))
117
    utils.RemoveFile(cls._InstanceSerial(instance_name))
118
    utils.RemoveFile(cls._InstanceKVMRuntime(instance_name))
119

  
110 120
  def _WriteNetScript(self, instance, seq, nic):
111 121
    """Write a script to connect a net interface to the proper bridge.
112 122

  
......
492 502
        self._RetryInstancePowerdown(instance, pid)
493 503

  
494 504
    if not utils.IsProcessAlive(pid):
495
      utils.RemoveFile(pidfile)
496
      utils.RemoveFile(self._InstanceMonitor(instance.name))
497
      utils.RemoveFile(self._InstanceSerial(instance.name))
498
      utils.RemoveFile(self._InstanceKVMRuntime(instance.name))
505
      self._RemoveInstanceRuntimeFiles(pidfile, instance.name)
499 506
      return True
500 507
    else:
501 508
      return False
......
610 617
          time.sleep(2)
611 618

  
612 619
    utils.KillProcess(pid)
613
    utils.RemoveFile(pidfile)
614
    utils.RemoveFile(self._InstanceMonitor(instance_name))
615
    utils.RemoveFile(self._InstanceSerial(instance_name))
616
    utils.RemoveFile(self._InstanceKVMRuntime(instance_name))
620
    self._RemoveInstanceRuntimeFiles(pidfile, instance.name)
617 621

  
618 622
  def GetNodeInfo(self):
619 623
    """Return information about the node.

Also available in: Unified diff