Re: Review Request 34128: Enable different IP/Port for external access.

2015-08-13 Thread Anindya Sinha

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/34128/#review95256
---


Can this be merged now unless there are more comments?

- Anindya Sinha


On July 30, 2015, 10:36 p.m., Anindya Sinha wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/34128/
 ---
 
 (Updated July 30, 2015, 10:36 p.m.)
 
 
 Review request for mesos.
 
 
 Bugs: MESOS-809
 https://issues.apache.org/jira/browse/MESOS-809
 
 
 Repository: mesos
 
 
 Description
 ---
 
 Expose environment variables LIBPROCESS_ADVERTISE_IP and 
 LIBPROCESS_ADVERTISE_PORT as the IP and port which libprocess would advertise 
 (if set). If not set, it defaults to the IP and port on which it binded to.
 
 
 Diffs
 -
 
   3rdparty/libprocess/src/process.cpp 
 6d3609d06d017d8e50d7935b335fda7ebecbd04c 
 
 Diff: https://reviews.apache.org/r/34128/diff/
 
 
 Testing
 ---
 
 Testing:
   make test
 
 
 Thanks,
 
 Anindya Sinha
 




Re: Review Request 34128: Enable different IP/Port for external access.

2015-07-30 Thread Anindya Sinha

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/34128/
---

(Updated July 30, 2015, 10:36 p.m.)


Review request for mesos.


Changes
---

Changed environment variables to LIBPROCESS_ADVERTISE_IP and 
LIBPROCESS_ADVERTISE_PORT.


Bugs: MESOS-809
https://issues.apache.org/jira/browse/MESOS-809


Repository: mesos


Description (updated)
---

Expose environment variables LIBPROCESS_ADVERTISE_IP and 
LIBPROCESS_ADVERTISE_PORT as the IP and port which libprocess would advertise 
(if set). If not set, it defaults to the IP and port on which it binded to.


Diffs (updated)
-

  3rdparty/libprocess/src/process.cpp 6d3609d06d017d8e50d7935b335fda7ebecbd04c 

Diff: https://reviews.apache.org/r/34128/diff/


Testing
---

Testing:
  make test


Thanks,

Anindya Sinha



Re: Review Request 34128: Enable different IP/Port for external access.

2015-07-24 Thread Benjamin Hindman

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/34128/#review92983
---

Ship it!



3rdparty/libprocess/src/process.cpp (line 774)
https://reviews.apache.org/r/34128/#comment147260

Why the extra variable here? This part of the code shouldn't need to change 
IIUC.



3rdparty/libprocess/src/process.cpp (lines 819 - 835)
https://reviews.apache.org/r/34128/#comment147259

Let's be more specific in the naming here, how about 
LIBPROCESS_ADVERTISE_IP and LIBPROCESS_ADVERTISE_PORT. You use the verb 
'advertise' in your description above, which is much more self-explanatory than 
PUBLIC.

Also, I'm not sure why the 'os::getenv' change didn't make it in here but 
we should use that throught here as well (and 'numify' instead of 'atoi'), but 
feel free to follow up in a subsequent patch. Thanks!


- Benjamin Hindman


On May 18, 2015, 10:08 p.m., Anindya Sinha wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/34128/
 ---
 
 (Updated May 18, 2015, 10:08 p.m.)
 
 
 Review request for mesos.
 
 
 Bugs: MESOS-809
 https://issues.apache.org/jira/browse/MESOS-809
 
 
 Repository: mesos
 
 
 Description
 ---
 
 Expose environment variables LIBPROCESS_PUBLIC_IP and LIBPROCESS_PUBLIC_PORT 
 as the IP and
 port which libprocess would advertise (if set). If not set, it defaults to
 the IP and port on which it binded to.
 
 
 Diffs
 -
 
   3rdparty/libprocess/src/process.cpp 
 e3de3cd6b536aaaf59784360aed546512dd04dc9 
 
 Diff: https://reviews.apache.org/r/34128/diff/
 
 
 Testing
 ---
 
 Testing:
   make test
 
 
 Thanks,
 
 Anindya Sinha
 




Re: Review Request 34128: Enable different IP/Port for external access.

2015-07-24 Thread Vinod Kone

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/34128/#review92974
---

Ship it!


Ship It!

- Vinod Kone


On May 18, 2015, 10:08 p.m., Anindya Sinha wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/34128/
 ---
 
 (Updated May 18, 2015, 10:08 p.m.)
 
 
 Review request for mesos.
 
 
 Bugs: MESOS-809
 https://issues.apache.org/jira/browse/MESOS-809
 
 
 Repository: mesos
 
 
 Description
 ---
 
 Expose environment variables LIBPROCESS_PUBLIC_IP and LIBPROCESS_PUBLIC_PORT 
 as the IP and
 port which libprocess would advertise (if set). If not set, it defaults to
 the IP and port on which it binded to.
 
 
 Diffs
 -
 
   3rdparty/libprocess/src/process.cpp 
 e3de3cd6b536aaaf59784360aed546512dd04dc9 
 
 Diff: https://reviews.apache.org/r/34128/diff/
 
 
 Testing
 ---
 
 Testing:
   make test
 
 
 Thanks,
 
 Anindya Sinha
 




Re: Review Request 34128: Enable different IP/Port for external access.

2015-07-16 Thread Anindya Sinha


 On June 11, 2015, 7:34 p.m., Vinod Kone wrote:
  3rdparty/libprocess/src/process.cpp, lines 820-836
  https://reviews.apache.org/r/34128/diff/2/?file=963212#file963212line820
 
  If two libprocess based unix processes (e.g., scheudler and master) are 
  within the *same* bridged container, would they able to communicate with 
  this change? Can you test this to confirm?
  
  
  If not, a better option might be to instead have LIBPROCESS_BIND_IP and 
  LIBPROCESS_BIND_PORT that just changes the address we bind to. 
  LIBPROCESS_IP and LIBPROCESS_PORT semantics could be left untouched.
 
 Anindya Sinha wrote:
 If 2 libprocess based unix processes are running, they would point to a 
 different public_ip:public_port (most likely same public_ip but a different 
 public_port, ie. same LIBPROCESS_PUBLIC_IP but a different 
 LIBPROCESS_PUBLIC_PORT). The processes themselves would bind as it does today 
 on ip:port (based in LIBPROCESS_IP and LIBPROCESS_PORT). Once a request 
 lands on a corresponding public_ip:public_port, a proxy listening on that 
 would forward that to the actual ip:port corresponding to the 
 public_ip:public_port.
 
 As an example, mesos-master binds on 10.11.12.13:5050 (ip:port) with 
 public_ip:public_port as 192.168.100.100:6050, and say scheduler binds on 
 10.11.12.13:8081 with public_ip:public_port as 192.168.100.100:9081. Requests 
 received on 192.168.100.100:6050 shall be proxied over to 10.11.12.13:5050 
 (to reach mesos-master) and requests received on 192.168.100.100:9081 shall 
 be proxied over to 10.11.12.13:8081 (to reach scheduler).
 
 Vinod Kone wrote:
 ```
 a proxy listening on that would forward that...
 ```
 
 who sets up this proxy? or do you mean this is what happens currently in 
 bridged mode containers (e.g., docker)?
 
 Anindya Sinha wrote:
 No this is not something that is part of docker. The proxy would be 
 something external to the container which would proxy the request to your 
 application within the container.
 This patch enables external entities viz. zookeeper reach the host (based 
 on public_ip:public_port) from where a proxy will be required to route to the 
 application running within the container. If we use ip:port, zookeeper 
 won't be able to reach. The setting up of the proxy is not a part of docker 
 or libprocess.
 Please also refer to relevant issue 
 https://issues.apache.org/jira/browse/MESOS-2587.

Can we get some inputs on this so as to move forward?
Please also look into https://reviews.apache.org/r/34129/ which is also a part 
of this fix.


- Anindya


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/34128/#review87611
---


On May 18, 2015, 10:08 p.m., Anindya Sinha wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/34128/
 ---
 
 (Updated May 18, 2015, 10:08 p.m.)
 
 
 Review request for mesos.
 
 
 Bugs: MESOS-809
 https://issues.apache.org/jira/browse/MESOS-809
 
 
 Repository: mesos
 
 
 Description
 ---
 
 Expose environment variables LIBPROCESS_PUBLIC_IP and LIBPROCESS_PUBLIC_PORT 
 as the IP and
 port which libprocess would advertise (if set). If not set, it defaults to
 the IP and port on which it binded to.
 
 
 Diffs
 -
 
   3rdparty/libprocess/src/process.cpp 
 e3de3cd6b536aaaf59784360aed546512dd04dc9 
 
 Diff: https://reviews.apache.org/r/34128/diff/
 
 
 Testing
 ---
 
 Testing:
   make test
 
 
 Thanks,
 
 Anindya Sinha
 




Re: Review Request 34128: Enable different IP/Port for external access.

2015-06-22 Thread Anindya Sinha


 On June 11, 2015, 7:34 p.m., Vinod Kone wrote:
  3rdparty/libprocess/src/process.cpp, lines 820-836
  https://reviews.apache.org/r/34128/diff/2/?file=963212#file963212line820
 
  If two libprocess based unix processes (e.g., scheudler and master) are 
  within the *same* bridged container, would they able to communicate with 
  this change? Can you test this to confirm?
  
  
  If not, a better option might be to instead have LIBPROCESS_BIND_IP and 
  LIBPROCESS_BIND_PORT that just changes the address we bind to. 
  LIBPROCESS_IP and LIBPROCESS_PORT semantics could be left untouched.

If 2 libprocess based unix processes are running, they would point to a 
different public_ip:public_port (most likely same public_ip but a different 
public_port, ie. same LIBPROCESS_PUBLIC_IP but a different 
LIBPROCESS_PUBLIC_PORT). The processes themselves would bind as it does today 
on ip:port (based in LIBPROCESS_IP and LIBPROCESS_PORT). Once a request lands 
on a corresponding public_ip:public_port, a proxy listening on that would 
forward that to the actual ip:port corresponding to the 
public_ip:public_port.

As an example, mesos-master binds on 10.11.12.13:5050 (ip:port) with 
public_ip:public_port as 192.168.100.100:6050, and say scheduler binds on 
10.11.12.13:8081 with public_ip:public_port as 192.168.100.100:9081. Requests 
received on 192.168.100.100:6050 shall be proxied over to 10.11.12.13:5050 (to 
reach mesos-master) and requests received on 192.168.100.100:9081 shall be 
proxied over to 10.11.12.13:8081 (to reach scheduler).


- Anindya


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/34128/#review87611
---


On May 18, 2015, 10:08 p.m., Anindya Sinha wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/34128/
 ---
 
 (Updated May 18, 2015, 10:08 p.m.)
 
 
 Review request for mesos.
 
 
 Bugs: MESOS-809
 https://issues.apache.org/jira/browse/MESOS-809
 
 
 Repository: mesos
 
 
 Description
 ---
 
 Expose environment variables LIBPROCESS_PUBLIC_IP and LIBPROCESS_PUBLIC_PORT 
 as the IP and
 port which libprocess would advertise (if set). If not set, it defaults to
 the IP and port on which it binded to.
 
 
 Diffs
 -
 
   3rdparty/libprocess/src/process.cpp 
 e3de3cd6b536aaaf59784360aed546512dd04dc9 
 
 Diff: https://reviews.apache.org/r/34128/diff/
 
 
 Testing
 ---
 
 Testing:
   make test
 
 
 Thanks,
 
 Anindya Sinha
 




Re: Review Request 34128: Enable different IP/Port for external access.

2015-06-22 Thread Vinod Kone


 On June 11, 2015, 7:34 p.m., Vinod Kone wrote:
  3rdparty/libprocess/src/process.cpp, lines 820-836
  https://reviews.apache.org/r/34128/diff/2/?file=963212#file963212line820
 
  If two libprocess based unix processes (e.g., scheudler and master) are 
  within the *same* bridged container, would they able to communicate with 
  this change? Can you test this to confirm?
  
  
  If not, a better option might be to instead have LIBPROCESS_BIND_IP and 
  LIBPROCESS_BIND_PORT that just changes the address we bind to. 
  LIBPROCESS_IP and LIBPROCESS_PORT semantics could be left untouched.
 
 Anindya Sinha wrote:
 If 2 libprocess based unix processes are running, they would point to a 
 different public_ip:public_port (most likely same public_ip but a different 
 public_port, ie. same LIBPROCESS_PUBLIC_IP but a different 
 LIBPROCESS_PUBLIC_PORT). The processes themselves would bind as it does today 
 on ip:port (based in LIBPROCESS_IP and LIBPROCESS_PORT). Once a request 
 lands on a corresponding public_ip:public_port, a proxy listening on that 
 would forward that to the actual ip:port corresponding to the 
 public_ip:public_port.
 
 As an example, mesos-master binds on 10.11.12.13:5050 (ip:port) with 
 public_ip:public_port as 192.168.100.100:6050, and say scheduler binds on 
 10.11.12.13:8081 with public_ip:public_port as 192.168.100.100:9081. Requests 
 received on 192.168.100.100:6050 shall be proxied over to 10.11.12.13:5050 
 (to reach mesos-master) and requests received on 192.168.100.100:9081 shall 
 be proxied over to 10.11.12.13:8081 (to reach scheduler).

```
a proxy listening on that would forward that...
```

who sets up this proxy? or do you mean this is what happens currently in 
bridged mode containers (e.g., docker)?


- Vinod


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/34128/#review87611
---


On May 18, 2015, 10:08 p.m., Anindya Sinha wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/34128/
 ---
 
 (Updated May 18, 2015, 10:08 p.m.)
 
 
 Review request for mesos.
 
 
 Bugs: MESOS-809
 https://issues.apache.org/jira/browse/MESOS-809
 
 
 Repository: mesos
 
 
 Description
 ---
 
 Expose environment variables LIBPROCESS_PUBLIC_IP and LIBPROCESS_PUBLIC_PORT 
 as the IP and
 port which libprocess would advertise (if set). If not set, it defaults to
 the IP and port on which it binded to.
 
 
 Diffs
 -
 
   3rdparty/libprocess/src/process.cpp 
 e3de3cd6b536aaaf59784360aed546512dd04dc9 
 
 Diff: https://reviews.apache.org/r/34128/diff/
 
 
 Testing
 ---
 
 Testing:
   make test
 
 
 Thanks,
 
 Anindya Sinha
 




Re: Review Request 34128: Enable different IP/Port for external access.

2015-05-12 Thread Timothy Chen

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/34128/#review83533
---



3rdparty/libprocess/src/process.cpp
https://reviews.apache.org/r/34128/#comment134536

I think we should at least prefix the env variable, like 
LIBPROCESS_PUBLIC_IP and LIBPROCESS_PUBLIC_PORT so we don't clash with other 
env variables from other projects.



3rdparty/libprocess/src/process.cpp
https://reviews.apache.org/r/34128/#comment134539

I think overriding __address__ static is dangerous, since we use this 
variable in other places for other purposes, such as checking if we are 
communicating to a remote address, etc.

I suggest we create a local address struct just for binding for listening 
to public traffic.


- Timothy Chen


On May 12, 2015, 11:23 p.m., Anindya Sinha wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/34128/
 ---
 
 (Updated May 12, 2015, 11:23 p.m.)
 
 
 Review request for mesos.
 
 
 Bugs: MESOS-809
 https://issues.apache.org/jira/browse/MESOS-809
 
 
 Repository: mesos
 
 
 Description
 ---
 
 Expose environment variables PUBLIC_IP and PUBLIC_PORT as the IP and
 port which libprocess would advertise (if set). If not set, it defaults to
 the IP and port on which it binded to.
 
 
 Diffs
 -
 
   3rdparty/libprocess/src/process.cpp 
 588bd3e40a0b350ceca15bb8f3f78290ba41d173 
 
 Diff: https://reviews.apache.org/r/34128/diff/
 
 
 Testing
 ---
 
 Testing:
   make test
 
 
 Thanks,
 
 Anindya Sinha
 




Re: Review Request 34128: Enable different IP/Port for external access.

2015-05-12 Thread Anindya Sinha

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/34128/
---

(Updated May 12, 2015, 11:23 p.m.)


Review request for mesos.


Bugs: MESOS-809
https://issues.apache.org/jira/browse/MESOS-809


Repository: mesos


Description
---

Expose environment variables PUBLIC_IP and PUBLIC_PORT as the IP and
port which libprocess would advertise (if set). If not set, it defaults to
the IP and port on which it binded to.


Diffs
-

  3rdparty/libprocess/src/process.cpp 588bd3e40a0b350ceca15bb8f3f78290ba41d173 

Diff: https://reviews.apache.org/r/34128/diff/


Testing (updated)
---

Testing:
  make test


Thanks,

Anindya Sinha



Re: Review Request 34128: Enable different IP/Port for external access.

2015-05-12 Thread Mesos ReviewBot

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/34128/#review83529
---


Patch looks great!

Reviews applied: [34128]

All tests passed.

- Mesos ReviewBot


On May 12, 2015, 11:23 p.m., Anindya Sinha wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/34128/
 ---
 
 (Updated May 12, 2015, 11:23 p.m.)
 
 
 Review request for mesos.
 
 
 Bugs: MESOS-809
 https://issues.apache.org/jira/browse/MESOS-809
 
 
 Repository: mesos
 
 
 Description
 ---
 
 Expose environment variables PUBLIC_IP and PUBLIC_PORT as the IP and
 port which libprocess would advertise (if set). If not set, it defaults to
 the IP and port on which it binded to.
 
 
 Diffs
 -
 
   3rdparty/libprocess/src/process.cpp 
 588bd3e40a0b350ceca15bb8f3f78290ba41d173 
 
 Diff: https://reviews.apache.org/r/34128/diff/
 
 
 Testing
 ---
 
 Testing:
   make test
 
 
 Thanks,
 
 Anindya Sinha