You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mesos.apache.org by Andy Grove <an...@codefutures.com> on 2014/10/01 21:47:54 UTC
Mesos 0.20.1 still using -net=host when launching Docker containers
Hi,
I'm making better progress but have run into another issue that I need help
tracking down.
I've actually packaged up my code in a github repo now and will be writing
up a tutorial on this once I have everything working.
https://github.com/codefutures/mesos-docker-tutorial
The README.md contains instructions on running the framework.
I can use this to start a single instance of the fedora/apache container
but when I try and run multiple instances the first one works but the other
containers start and then fail pretty quickly.
I tracked down the error information in the sandbox and the other
containers are failing with "cannot bind to port 80" so it looks like the
containers are being launched with host networking (-net=host). I thought
this was one of the issues that was fixed in 0.20.1. Do I have to do
something to enable containerized networking?
Thanks,
Andy.
--
Andy Grove
VP Engineering
CodeFutures Corporation
Re: Mesos 0.20.1 still using -net=host when launching Docker containers
Posted by Tim Chen <ti...@mesosphere.io>.
Hi Andy,
The docs is sitting at the docs folder in the source tree, and there is a
docker containerization doc markdown file.
Simply modify it and put a patch on reviewboard, and assign to the mesos
group and me.
Let me know if you need more specific steps around this.
Tim
On Wed, Oct 1, 2014 at 4:08 PM, Andy Grove <an...@codefutures.com>
wrote:
> I'd be happy to submit some documentation patches if you can point me in
> the right direction. Is there a separate git repo for the docs?
>
> Thanks,
>
> Andy.
>
> --
> Andy Grove
> VP Engineering
> CodeFutures Corporation
>
>
>
> On Wed, Oct 1, 2014 at 3:30 PM, Timothy Chen <ti...@mesosphere.io> wrote:
>
>> Sorry for the documentation, I didn't update the docs as part of 0.20.1
>> which we added the network modes.
>>
>> Please if you like submit a patch and I can help submit it.
>>
>> Tim
>>
>> On Oct 1, 2014, at 2:25 PM, Tim St Clair <ts...@redhat.com> wrote:
>>
>> inline below -
>>
>> *From: *"Andy Grove" <an...@codefutures.com>
>> *To: *user@mesos.apache.org
>> *Sent: *Wednesday, October 1, 2014 2:47:54 PM
>> *Subject: *Mesos 0.20.1 still using -net=host when launching Docker
>> containers
>>
>> Hi,
>>
>> I'm making better progress but have run into another issue that I need
>> help tracking down.
>>
>> I've actually packaged up my code in a github repo now and will be
>> writing up a tutorial on this once I have everything working.
>>
>> https://github.com/codefutures/mesos-docker-tutorial
>>
>> The README.md contains instructions on running the framework.
>>
>> I can use this to start a single instance of the fedora/apache container
>> but when I try and run multiple instances the first one works but the other
>> containers start and then fail pretty quickly.
>>
>> I tracked down the error information in the sandbox and the other
>> containers are failing with "cannot bind to port 80" so it looks like the
>> containers are being launched with host networking (-net=host). I thought
>> this was one of the issues that was fixed in 0.20.1. Do I have to do
>> something to enable containerized networking?
>>
>> It's still HOST by default, you'll need to specify network=BRIDGE in the
>> DockerInfo iirc.
>>
>> Cheers,
>> Tim
>>
>>
>> Thanks,
>>
>> Andy.
>>
>> --
>> Andy Grove
>> VP Engineering
>> CodeFutures Corporation
>>
>>
>>
>>
>>
>> --
>> Cheers,
>> Timothy St. Clair
>> Red Hat Inc.
>>
>>
>
Re: Mesos 0.20.1 still using -net=host when launching Docker containers
Posted by Andy Grove <an...@codefutures.com>.
I'd be happy to submit some documentation patches if you can point me in
the right direction. Is there a separate git repo for the docs?
Thanks,
Andy.
--
Andy Grove
VP Engineering
CodeFutures Corporation
On Wed, Oct 1, 2014 at 3:30 PM, Timothy Chen <ti...@mesosphere.io> wrote:
> Sorry for the documentation, I didn't update the docs as part of 0.20.1
> which we added the network modes.
>
> Please if you like submit a patch and I can help submit it.
>
> Tim
>
> On Oct 1, 2014, at 2:25 PM, Tim St Clair <ts...@redhat.com> wrote:
>
> inline below -
>
> *From: *"Andy Grove" <an...@codefutures.com>
> *To: *user@mesos.apache.org
> *Sent: *Wednesday, October 1, 2014 2:47:54 PM
> *Subject: *Mesos 0.20.1 still using -net=host when launching Docker
> containers
>
> Hi,
>
> I'm making better progress but have run into another issue that I need
> help tracking down.
>
> I've actually packaged up my code in a github repo now and will be writing
> up a tutorial on this once I have everything working.
>
> https://github.com/codefutures/mesos-docker-tutorial
>
> The README.md contains instructions on running the framework.
>
> I can use this to start a single instance of the fedora/apache container
> but when I try and run multiple instances the first one works but the other
> containers start and then fail pretty quickly.
>
> I tracked down the error information in the sandbox and the other
> containers are failing with "cannot bind to port 80" so it looks like the
> containers are being launched with host networking (-net=host). I thought
> this was one of the issues that was fixed in 0.20.1. Do I have to do
> something to enable containerized networking?
>
> It's still HOST by default, you'll need to specify network=BRIDGE in the
> DockerInfo iirc.
>
> Cheers,
> Tim
>
>
> Thanks,
>
> Andy.
>
> --
> Andy Grove
> VP Engineering
> CodeFutures Corporation
>
>
>
>
>
> --
> Cheers,
> Timothy St. Clair
> Red Hat Inc.
>
>
Re: Mesos 0.20.1 still using -net=host when launching Docker containers
Posted by Timothy Chen <ti...@mesosphere.io>.
Sorry for the documentation, I didn't update the docs as part of 0.20.1 which we added the network modes.
Please if you like submit a patch and I can help submit it.
Tim
> On Oct 1, 2014, at 2:25 PM, Tim St Clair <ts...@redhat.com> wrote:
>
> inline below -
> From: "Andy Grove" <an...@codefutures.com>
> To: user@mesos.apache.org
> Sent: Wednesday, October 1, 2014 2:47:54 PM
> Subject: Mesos 0.20.1 still using -net=host when launching Docker containers
>
> Hi,
>
> I'm making better progress but have run into another issue that I need help tracking down.
>
> I've actually packaged up my code in a github repo now and will be writing up a tutorial on this once I have everything working.
>
> https://github.com/codefutures/mesos-docker-tutorial
>
> The README.md contains instructions on running the framework.
>
> I can use this to start a single instance of the fedora/apache container but when I try and run multiple instances the first one works but the other containers start and then fail pretty quickly.
>
> I tracked down the error information in the sandbox and the other containers are failing with "cannot bind to port 80" so it looks like the containers are being launched with host networking (-net=host). I thought this was one of the issues that was fixed in 0.20.1. Do I have to do something to enable containerized networking?
> It's still HOST by default, you'll need to specify network=BRIDGE in the DockerInfo iirc.
>
> Cheers,
> Tim
>
> Thanks,
>
> Andy.
>
> --
> Andy Grove
> VP Engineering
> CodeFutures Corporation
>
>
>
>
>
> --
> Cheers,
> Timothy St. Clair
> Red Hat Inc.
Re: Mesos 0.20.1 still using -net=host when launching Docker
containers
Posted by Tim St Clair <ts...@redhat.com>.
inline below -
> From: "Andy Grove" <an...@codefutures.com>
> To: user@mesos.apache.org
> Sent: Wednesday, October 1, 2014 2:47:54 PM
> Subject: Mesos 0.20.1 still using -net=host when launching Docker containers
> Hi,
> I'm making better progress but have run into another issue that I need help
> tracking down.
> I've actually packaged up my code in a github repo now and will be writing up
> a tutorial on this once I have everything working.
> https://github.com/codefutures/mesos-docker-tutorial
> The README.md contains instructions on running the framework.
> I can use this to start a single instance of the fedora/apache container but
> when I try and run multiple instances the first one works but the other
> containers start and then fail pretty quickly.
> I tracked down the error information in the sandbox and the other containers
> are failing with "cannot bind to port 80" so it looks like the containers
> are being launched with host networking (-net=host). I thought this was one
> of the issues that was fixed in 0.20.1. Do I have to do something to enable
> containerized networking?
It's still HOST by default, you'll need to specify network=BRIDGE in the DockerInfo iirc.
Cheers,
Tim
> Thanks,
> Andy.
> --
> Andy Grove
> VP Engineering
> CodeFutures Corporation
--
Cheers,
Timothy St. Clair
Red Hat Inc.
Re: Mesos 0.20.1 still using -net=host when launching Docker containers
Posted by Vinod Kone <vi...@gmail.com>.
On Wed, Oct 1, 2014 at 12:54 PM, Andy Grove <an...@codefutures.com>
wrote:
> I'd recommend adding this to the documentation as most people will
> probably expect this to be the default behavior.
>
> I'd also be happy to contribute this example code to be shipped with Mesos
> if there's any interest in that.
>
Yes please. Happy to accept patches for both documentation and examples.
Re: Mesos 0.20.1 still using -net=host when launching Docker containers
Posted by Andy Grove <an...@codefutures.com>.
I managed to resolve this thanks to code completion hints in my IDE. I
needed to configure bridge networking:
dockerInfoBuilder.setNetwork(Protos.ContainerInfo.DockerInfo.Network.BRIDGE);
I'd recommend adding this to the documentation as most people will probably
expect this to be the default behavior.
I'd also be happy to contribute this example code to be shipped with Mesos
if there's any interest in that.
Thanks,
Andy.
--
Andy Grove
VP Engineering
CodeFutures Corporation
On Wed, Oct 1, 2014 at 1:47 PM, Andy Grove <an...@codefutures.com>
wrote:
> Hi,
>
> I'm making better progress but have run into another issue that I need
> help tracking down.
>
> I've actually packaged up my code in a github repo now and will be writing
> up a tutorial on this once I have everything working.
>
> https://github.com/codefutures/mesos-docker-tutorial
>
> The README.md contains instructions on running the framework.
>
> I can use this to start a single instance of the fedora/apache container
> but when I try and run multiple instances the first one works but the other
> containers start and then fail pretty quickly.
>
> I tracked down the error information in the sandbox and the other
> containers are failing with "cannot bind to port 80" so it looks like the
> containers are being launched with host networking (-net=host). I thought
> this was one of the issues that was fixed in 0.20.1. Do I have to do
> something to enable containerized networking?
>
> Thanks,
>
> Andy.
>
> --
> Andy Grove
> VP Engineering
> CodeFutures Corporation
>
>
>