예제 #1
0
파일: volume.py 프로젝트: vikas-lamba/vdsm
 def killProcRollback(cls, taskObj, pid, ctime):
     """
     First part of several volume rollbacks.
     """
     cls.log.info("pid=%s ctime=%s", pid, ctime)
     try:
         pidCtime = misc.getProcCtime(pid)
     except OSError, e:
         cls.log.debug("pid=%s ctime=%s (%s)", pid, ctime, str(e))
         return
예제 #2
0
파일: volume.py 프로젝트: hackxay/vdsm
    def killProcRollback(cls, taskObj, pid, ctime):
        """
        First part of several volume rollbacks.
        """
        cls.log.info("pid=%s ctime=%s", pid, ctime)
        try:
            pidCtime = misc.getProcCtime(pid)
        except OSError as e:
            cls.log.debug("pid=%s ctime=%s (%s)", pid, ctime, str(e))
            return

        try:
            # If process exists and it's a same process kill it
            # We identifying the process according its pid and ctime
            if ctime == pidCtime:
                os.kill(int(pid), signal.SIGKILL)
        except Exception:
            cls.log.error("pid=%s ctime=%s", pid, ctime, exc_info=True)
            raise
예제 #3
0
    def killProcRollback(cls, taskObj, pid, ctime):
        """
        First part of several volume rollbacks.
        """
        cls.log.info("pid=%s ctime=%s", pid, ctime)
        try:
            pidCtime = misc.getProcCtime(pid)
        except OSError as e:
            cls.log.debug("pid=%s ctime=%s (%s)", pid, ctime, str(e))
            return

        try:
            # If process exists and it's a same process kill it
            # We identifying the process according its pid and ctime
            if ctime == pidCtime:
                os.kill(int(pid), signal.SIGKILL)
        except Exception:
            cls.log.error("pid=%s ctime=%s", pid, ctime, exc_info=True)
            raise
예제 #4
0
파일: volume.py 프로젝트: hackxay/vdsm
def baseAsyncTasksRollback(proc):
    name = "Kill-" + str(proc.pid)
    vars.task.pushRecovery(
        task.Recovery(name, "volume", "Volume", "killProcRollback",
                      [str(proc.pid),
                       str(misc.getProcCtime(proc.pid))]))
예제 #5
0
파일: volume.py 프로젝트: vikas-lamba/vdsm
def baseAsyncTasksRollback(proc):
    name = "Kill-" + str(proc.pid)
    vars.task.pushRecovery(task.Recovery(name, "volume", "Volume", "killProcRollback",
                                         [str(proc.pid), str(misc.getProcCtime(proc.pid))]))