Interdiff post patch 2:

diff --git a/lib/hypervisor/hv_xen.py b/lib/hypervisor/hv_xen.py
index 3439cb2..271ecaa 100644
--- a/lib/hypervisor/hv_xen.py
+++ b/lib/hypervisor/hv_xen.py
@@ -1121,7 +1121,7 @@ class XenHypervisor(hv_base.BaseHypervisor):

     if utils.IsProcessAlive(read_pid):
       # If the process is alive, let's make sure we are killing the right
one
-      cmdline = utils.GetProcCmdline(read_pid)
+      cmdline = ' '.join(utils.GetProcCmdline(read_pid))
       if cmdline.count("xl migrate-receive") > 0:
         utils.KillProcess(read_pid)



On Thu, Jun 11, 2015 at 1:56 PM, Klaus Aehlig <[email protected]> wrote:

> On Wed, Jun 10, 2015 at 04:05:45PM +0200, 'Hrvoje Ribicic' via
> ganeti-devel wrote:
> > In the case that a listening socat daemon was started but the migration
> > failed on the sending side, the daemon will stay in place and occupy
> > the migration port forever. This patch attempts to remedy this by
> > saving the PID of the daemon, and attempting to kill it when the next
> > migration is started, provided the command line roughly matches our
> > migration workflow.
> >
> > Signed-off-by: Hrvoje Ribicic <[email protected]>
> > ---
> >  lib/hypervisor/hv_xen.py | 71
> ++++++++++++++++++++++++++++++++++++++++++++----
> >  src/Ganeti/Constants.hs  |  4 +--
> >  2 files changed, 67 insertions(+), 8 deletions(-)
>
> LGTM
>
> However, you will probably have to change...
>
> > +    if utils.IsProcessAlive(read_pid):
> > +      # If the process is alive, let's make sure we are killing the
> right one
> > +      cmdline = utils.GetProcCmdline(read_pid)
> > +      if cmdline.count("xl migrate-receive") > 0:
> > +        utils.KillProcess(read_pid)
>
> ...that test once you changed patch 2.
>
> --
> Klaus Aehlig
> Google Germany GmbH, Dienerstr. 12, 80331 Muenchen
> Registergericht und -nummer: Hamburg, HRB 86891
> Sitz der Gesellschaft: Hamburg
> Geschaeftsfuehrer: Graham Law, Christine Elizabeth Flores
>

Hrvoje Ribicic
Ganeti Engineering
Google Germany GmbH
Dienerstr. 12, 80331, München

Geschäftsführer: Graham Law, Christine Elizabeth Flores
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg

Reply via email to