[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Gear link from container localhost to host localhost address

----- Original Message -----
> I'm trying to create a unit with a link from a port on localhost in
> the container to a port on localhost of the host machine.
> The reason I want to do that is so that I can add a NAT rule on the
> host machine which routes the connection to another host (if
> necessary) without having to restart the gear unit.
> If the gear links of a running unit could be altered (via the REST
> API)  we wouldn't need to do that, but I can't find an example of such

It doesn't exist today, it was something we'd like to have but just hasn't been implement.

> Unfortunately, when I use {'NetworkLinks: [{'ToHost':
> '',...}]} the client in the container receives a connection
> refused error.

Can you look at journalctl -u ctr-<name_of_container> and see whether you're getting a permission denied error from the "gear" command that runs in ExecPostStart (which is what sets up the links)?  If you use "" or "localhost" as the ToHost, we'll map that to the first "up" and non loopback interface we find in the device list.  When we find one, we print "Using <ip> for" from the gear command.  If you don't see that, you'll see an error.

> It works perfectly if I specify one of the host's non-loopback addresses.
> Does anyone know if it's possible to link from container localhost to
> host localhost?
> Thanks in advance.
> -RichardW.
> _______________________________________________
> users mailing list
> users lists openshift redhat com
> http://lists.openshift.redhat.com/openshiftmm/listinfo/users

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]