ovs.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:vswitchperf 作者: opnfv 项目源码 文件源码
def restart(self):
        """ Restart ``ovs-vswitchd`` instance. ``ovsdb-server`` is not restarted.

        :raises: pexpect.EOF, pexpect.TIMEOUT
        """
        self._logger.info("Restarting vswitchd...")
        if os.path.isfile(self._vswitchd_pidfile_path):
            self._logger.info('Killing ovs-vswitchd...')
            with open(self._vswitchd_pidfile_path, "r") as pidfile:
                vswitchd_pid = pidfile.read().strip()
                tasks.terminate_task(vswitchd_pid, logger=self._logger)

        try:
            tasks.Process.start(self)
            self.relinquish()
        except (pexpect.EOF, pexpect.TIMEOUT) as exc:
            logging.error("Exception during VSwitch start.")
            self._kill_ovsdb()
            raise exc
        self._logger.info("Vswitchd...Started.")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号