jpetazzo / pipework

Software-Defined Networking tools for LXC (LinuX Containers)
Apache License 2.0
4.22k stars 727 forks source link

Does not work with libcontainer #40

Closed cpuguy83 closed 10 years ago

cpuguy83 commented 10 years ago

So far the issue just seems to be that pipework can't find the cgroup the container is in via line 87: NN=$(find "$CGROUPMNT" -name "$DOCKERID" | wc -l) And indeed the containers don't seem to have anything in there anymore.

This is about as far as I've gotten. Looked at some of the libcontainer code to figure this out but nothing really stood out to me.

cpuguy83 commented 10 years ago

BTW, I know @crosbymichael is working on stuff to enable setting network interfaces with libcontainer directly from the docker run command so I'm not sure how much effort should be put into this.

Though on 0.9 I'm currently SOL on getting a public IP into my container (because LXC isn't working for me on 0.9, https://github.com/dotcloud/docker/issues/4584 )

crosbymichael commented 10 years ago

I think all he needs to do is find the pid for the namespace. All the information that pipework should need is found in:

/var/lib/docker/execdriver/native/<id>/{pid, container.json}

cpuguy83 commented 10 years ago

Thanks!

Working on this now.

jpetazzo commented 10 years ago

(Associated PR is #41)

JessicaMulein commented 10 years ago

Does PR #41 resolve this issue? Is pipework ready for libcontainer in production?

cpuguy83 commented 10 years ago

@bretttrotter-wf Yes, this is all taken care of.