[CRIU] p.haul incorrect lxc assumption
Tycho Andersen
tycho.andersen at canonical.com
Wed Nov 5 06:09:17 PST 2014
On Wed, Nov 05, 2014 at 03:12:13PM +0400, Pavel Emelyanov wrote:
> On 11/02/2014 06:02 AM, Sowmini Varadhan wrote:
> >
> > I set up my container using "lxc create -n iperfs -t busybox",
> > and the resulting lxc.config file has network.type = veth,
> > which means that lxc will automatically create a veth.pair for
> > you, but seems like the p_haul_lxc.py script *always* expects
> > the veth.pair to be manually set up- it fails with
> >
> >> Traceback (most recent call last):
> >> File "/home/sowmini/src/p.haul/p.haul", line 39, in <module>
> >> worker.start_migration()
> >> File "/home/sowmini/src/p.haul/p_haul_iters.py", line 193, in
> >> start_migration self.htype.net_lock()
> >> File "/home/sowmini/src/p.haul/p_haul_lxc.py", line 146, in net_lock
> >> util.ifdown(veth.pair)
> >
> > So I'm using the patch below to fix this - I am sure the brcmd
> > and python syntax can be cleaned up, and perhaps we can just
> > use brctl at all times to figure out veth.link and veth.name,
> > instead of reading the config file. Comments?
>
> I'd really love to have LXC developers to join the experiments with p.haul.
> It (the p.haul) is quite raw at the moment, so their comments on how it
> deals with networking would be really welcome.
Unfortunately, I have not had a chance to play with p.haul much (I
have not had a chance to work on criu much the last few weeks, but I
should be back soon). lxc-checkpoint will handle the networking/tty
aspects of migrating things right now, though. Eventually,
lxc-checkpoint or something higher level will use p.haul.
Tycho
> > diff --git a/p.haul b/p.haul
> > index b8f050e..8c7f181 100755
> > --- a/p.haul
> > +++ b/p.haul
> > @@ -1,4 +1,4 @@
> > diff --git a/p_haul_lxc.py b/p_haul_lxc.py
> > index 27df698..11d787d 100644
> > --- a/p_haul_lxc.py
> > +++ b/p_haul_lxc.py
> > @@ -54,6 +54,12 @@ class p_haul_type:
> > veth.name = v
> > elif k == "lxc.network.veth.pair":
> > veth.pair = v
> > + if veth.link == "lxcbr0":
> > + brcmd = "brctl show "+ veth.link
> > + brcmd = brcmd + "|grep " + veth.link
> > + brcmd = brcmd + "|awk '{print $4}'"
> > + f = os.popen(brcmd)
> > + veth.pair = f.read().rstrip('\n')
> > if veth:
> > self._veths.append(veth)
> > ifd.close()
> >
> >
> >
> > .
> >
>
More information about the CRIU
mailing list