Re: Review Request 45177: Setting DiscoveryInfo.

2016-04-05 Thread Aurora ReviewBot

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


Ship it!




Master (a9b3df8) is green with this patch.
  ./build-support/jenkins/build.sh

I will refresh this build result if you post a review containing "@ReviewBot 
retry"

- Aurora ReviewBot


On April 5, 2016, 11 p.m., Zhitao Li wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45177/
> ---
> 
> (Updated April 5, 2016, 11 p.m.)
> 
> 
> Review request for Aurora, Kunal Thakar and Stephan Erb.
> 
> 
> Bugs: AURORA-1629
> https://issues.apache.org/jira/browse/AURORA-1629
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> This allows alternative service discovery methodologies to find tasks from 
> Aurora (e.g. mesos-dns), especially the dynamic port mapping.
> 
> 
> Diffs
> -
> 
>   RELEASE-NOTES.md 2f935da01201cbef095e9d308630e187914f00ff 
>   docs/features/service-discovery.md 858ca2a137db9c8fbce20e9b2b924447fe7a41ae 
>   docs/reference/scheduler-configuration.md 
> e6c0bb60281d7c39c2aa235445ee4c1ef97464ba 
>   examples/vagrant/upstart/aurora-scheduler.conf 
> d61801c0b7c9683434a548a26bed3c49bbb75927 
>   
> src/main/java/org/apache/aurora/scheduler/configuration/executor/ExecutorModule.java
>  add1270409b7e82578267a2c10cf2afe6e93e3de 
>   
> src/main/java/org/apache/aurora/scheduler/configuration/executor/ExecutorSettings.java
>  7beea81a1e97f3f2fce215ff3e364919c3aebf6d 
>   src/main/java/org/apache/aurora/scheduler/mesos/MesosTaskFactory.java 
> 85c550bb5754154de5f639df4a0992d10cb70993 
>   src/main/java/org/apache/aurora/scheduler/mesos/TestExecutorSettings.java 
> 7110fbd78b1b4356acd40e5ab9c3379e5ac19df7 
>   
> src/test/java/org/apache/aurora/scheduler/mesos/MesosTaskFactoryImplTest.java 
> 3a6048633efceec68b15d3c511237c0f1871a3fc 
>   src/test/sh/org/apache/aurora/e2e/http/http_example.aurora 
> bb4fdec2fb2347635c6a7cc9e13133b4bf407771 
>   src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh 
> 34717569365bbaad7117d7ec996e448462023fe8 
> 
> Diff: https://reviews.apache.org/r/45177/diff/
> 
> 
> Testing
> ---
> 
> 1. Added unit test;
> 2. Use the vagrant environment to start the example in http_example.aurora, 
> and observe the following in master's state.json:
> 
> ```
> curl 192.168.33.7:5050/state | jq . | less
> 
> "tasks": [
> {
> "discovery": {
> "environment": "test",
> "location": "devcluster",
> "name": "http_example.test.vagrant",
> "ports": {
> "ports": [
> {
> "name": "tcp",
> "number": 31499,
> "protocol": "TCP"
> },
> {
> "name": "http",
> "number": 31529,
> "protocol": "TCP"
> }
> ]
> },
> "visibility": "CLUSTER"
> },
> "executor_id": 
> "thermos-vagrant-test-http_example-1-e56d2834-3df3-4d6e-9399-4f5e80668703",
> "framework_id": "66d5ac1b-9243-4ef3-8016-40f19d079f5d-",
> "id": "vagrant-test-http_example-1-e56d2834-3df3-4d6e-9399-4f5e80668703",
> "name": "vagrant/test/http_example",
> "resources": {
> "cpus": 0.4,
> "disk": 64,
> "mem": 32,
> "ports": "[31499-31499, 31529-31529]"
> },
> ...
> 
> ```
> 
> 
> Thanks,
> 
> Zhitao Li
> 
>



Re: Review Request 45177: Setting DiscoveryInfo.

2016-04-05 Thread Zhitao Li


> On April 5, 2016, 5:50 p.m., Maxim Khutornenko wrote:
> > src/test/sh/org/apache/aurora/e2e/http/http_example.aurora, line 21
> > 
> >
> > Curious, what do changes in this file actually test?
> 
> Zhitao Li wrote:
> I used this to trigger the multiple ports case and test what SRV records 
> Mesos DNS uses.
> 
> I can revert change to this file if people don't like it, but I figured a 
> slightly more complex example wouldn't really hurt.
> 
> Maxim Khutornenko wrote:
> How did you test it? Any chance you could contribute an e2e test to back 
> these changes up?
> 
> Zhitao Li wrote:
> My testing was manual (see the json blobs in Testing Done of the review).
> 
> I think it's actually possible to test this in e2e script:
> 1) enable this flag by default in vagrant;
> 2) curl the `/state` endpoint of master in the test_end_to_end.sh, parse 
> the response through `jq` utility,
> 3) verify discovery part is not empty. (Including Mesos DNS would be way 
> too heavy).
> 
> The blocker is that `jq` is not installed by default in the vagrant box, 
> so I can't really push such test safely.
> 
> Maybe we can enable this by default in vagrant, and I can add the testing 
> later after a virtualbox with jq is built?
> 
> Maxim Khutornenko wrote:
> > The blocker is that jq is not installed by default in the vagrant box, 
> so I can't really push such test safely.
> 
> Can you pipe to `python -m json.tool` to get what you want instead? If 
> that's not sufficient, I don't see much problem adding it to vbox image. See 
> `build-support/packer/README.md` for instructions.

e2e test added. I'll send a oneline patch for installing jq, but I probably 
need a committer who has persission to update the box to help for that.


- Zhitao


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


On April 5, 2016, 11 p.m., Zhitao Li wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45177/
> ---
> 
> (Updated April 5, 2016, 11 p.m.)
> 
> 
> Review request for Aurora, Kunal Thakar and Stephan Erb.
> 
> 
> Bugs: AURORA-1629
> https://issues.apache.org/jira/browse/AURORA-1629
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> This allows alternative service discovery methodologies to find tasks from 
> Aurora (e.g. mesos-dns), especially the dynamic port mapping.
> 
> 
> Diffs
> -
> 
>   RELEASE-NOTES.md 2f935da01201cbef095e9d308630e187914f00ff 
>   docs/features/service-discovery.md 858ca2a137db9c8fbce20e9b2b924447fe7a41ae 
>   docs/reference/scheduler-configuration.md 
> e6c0bb60281d7c39c2aa235445ee4c1ef97464ba 
>   examples/vagrant/upstart/aurora-scheduler.conf 
> d61801c0b7c9683434a548a26bed3c49bbb75927 
>   
> src/main/java/org/apache/aurora/scheduler/configuration/executor/ExecutorModule.java
>  add1270409b7e82578267a2c10cf2afe6e93e3de 
>   
> src/main/java/org/apache/aurora/scheduler/configuration/executor/ExecutorSettings.java
>  7beea81a1e97f3f2fce215ff3e364919c3aebf6d 
>   src/main/java/org/apache/aurora/scheduler/mesos/MesosTaskFactory.java 
> 85c550bb5754154de5f639df4a0992d10cb70993 
>   src/main/java/org/apache/aurora/scheduler/mesos/TestExecutorSettings.java 
> 7110fbd78b1b4356acd40e5ab9c3379e5ac19df7 
>   
> src/test/java/org/apache/aurora/scheduler/mesos/MesosTaskFactoryImplTest.java 
> 3a6048633efceec68b15d3c511237c0f1871a3fc 
>   src/test/sh/org/apache/aurora/e2e/http/http_example.aurora 
> bb4fdec2fb2347635c6a7cc9e13133b4bf407771 
>   src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh 
> 34717569365bbaad7117d7ec996e448462023fe8 
> 
> Diff: https://reviews.apache.org/r/45177/diff/
> 
> 
> Testing
> ---
> 
> 1. Added unit test;
> 2. Use the vagrant environment to start the example in http_example.aurora, 
> and observe the following in master's state.json:
> 
> ```
> curl 192.168.33.7:5050/state | jq . | less
> 
> "tasks": [
> {
> "discovery": {
> "environment": "test",
> "location": "devcluster",
> "name": "http_example.test.vagrant",
> "ports": {
> "ports": [
> {
> "name": "tcp",
> "number": 31499,
> "protocol": "TCP"
> },
> {
> "name": "http",
> "number": 31529,
> "protocol": "TCP"
> }
> ]
> },
> "visibility": "CLUSTER"
> },
> "executor_id": 
> "thermos-vagrant-test-http_example-1-e56d2834-3df3-4d6e-9399-4f5e80668703",
> "framework_id": "66d5ac1b-9243-4ef3-8016-40f19d079f5d-",
> "id": "vagrant-test-http_example-1-e56d2834-3df3-4d6e-9399-4f5e80668703",
> "name": "vagrant/test/http_example",
> "resources": {
> "cpus": 0.4,
> "disk": 64,
> "mem": 32,
> "ports": "[31499-31499, 31529-31529]"
> },
> 

Re: Review Request 45177: Setting DiscoveryInfo.

2016-04-05 Thread Zhitao Li


> On April 5, 2016, 5:50 p.m., Maxim Khutornenko wrote:
> > src/test/sh/org/apache/aurora/e2e/http/http_example.aurora, line 21
> > 
> >
> > Curious, what do changes in this file actually test?
> 
> Zhitao Li wrote:
> I used this to trigger the multiple ports case and test what SRV records 
> Mesos DNS uses.
> 
> I can revert change to this file if people don't like it, but I figured a 
> slightly more complex example wouldn't really hurt.
> 
> Maxim Khutornenko wrote:
> How did you test it? Any chance you could contribute an e2e test to back 
> these changes up?

My testing was manual (see the json blobs in Testing Done of the review).

I think it's actually possible to test this in e2e script:
1) enable this flag by default in vagrant;
2) curl the `/state` endpoint of master in the test_end_to_end.sh, parse the 
response through `jq` utility,
3) verify discovery part is not empty. (Including Mesos DNS would be way too 
heavy).

The blocker is that `jq` is not installed by default in the vagrant box, so I 
can't really push such test safely.

Maybe we can enable this by default in vagrant, and I can add the testing later 
after a virtualbox with jq is built?


- Zhitao


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


On April 5, 2016, 6:15 p.m., Zhitao Li wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45177/
> ---
> 
> (Updated April 5, 2016, 6:15 p.m.)
> 
> 
> Review request for Aurora, Kunal Thakar and Stephan Erb.
> 
> 
> Bugs: AURORA-1629
> https://issues.apache.org/jira/browse/AURORA-1629
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> This allows alternative service discovery methodologies to find tasks from 
> Aurora (e.g. mesos-dns), especially the dynamic port mapping.
> 
> 
> Diffs
> -
> 
>   RELEASE-NOTES.md 2f935da01201cbef095e9d308630e187914f00ff 
>   docs/features/service-discovery.md 858ca2a137db9c8fbce20e9b2b924447fe7a41ae 
>   docs/reference/scheduler-configuration.md 
> e6c0bb60281d7c39c2aa235445ee4c1ef97464ba 
>   examples/vagrant/upstart/aurora-scheduler.conf 
> d61801c0b7c9683434a548a26bed3c49bbb75927 
>   
> src/main/java/org/apache/aurora/scheduler/configuration/executor/ExecutorModule.java
>  add1270409b7e82578267a2c10cf2afe6e93e3de 
>   
> src/main/java/org/apache/aurora/scheduler/configuration/executor/ExecutorSettings.java
>  7beea81a1e97f3f2fce215ff3e364919c3aebf6d 
>   src/main/java/org/apache/aurora/scheduler/mesos/MesosTaskFactory.java 
> 85c550bb5754154de5f639df4a0992d10cb70993 
>   src/main/java/org/apache/aurora/scheduler/mesos/TestExecutorSettings.java 
> 7110fbd78b1b4356acd40e5ab9c3379e5ac19df7 
>   
> src/test/java/org/apache/aurora/scheduler/mesos/MesosTaskFactoryImplTest.java 
> 3a6048633efceec68b15d3c511237c0f1871a3fc 
>   src/test/sh/org/apache/aurora/e2e/http/http_example.aurora 
> bb4fdec2fb2347635c6a7cc9e13133b4bf407771 
> 
> Diff: https://reviews.apache.org/r/45177/diff/
> 
> 
> Testing
> ---
> 
> 1. Added unit test;
> 2. Use the vagrant environment to start the example in http_example.aurora, 
> and observe the following in master's state.json:
> 
> ```
> curl 192.168.33.7:5050/state | jq . | less
> 
> "tasks": [
> {
> "discovery": {
> "environment": "test",
> "location": "devcluster",
> "name": "http_example.test.vagrant",
> "ports": {
> "ports": [
> {
> "name": "tcp",
> "number": 31499,
> "protocol": "TCP"
> },
> {
> "name": "http",
> "number": 31529,
> "protocol": "TCP"
> }
> ]
> },
> "visibility": "CLUSTER"
> },
> "executor_id": 
> "thermos-vagrant-test-http_example-1-e56d2834-3df3-4d6e-9399-4f5e80668703",
> "framework_id": "66d5ac1b-9243-4ef3-8016-40f19d079f5d-",
> "id": "vagrant-test-http_example-1-e56d2834-3df3-4d6e-9399-4f5e80668703",
> "name": "vagrant/test/http_example",
> "resources": {
> "cpus": 0.4,
> "disk": 64,
> "mem": 32,
> "ports": "[31499-31499, 31529-31529]"
> },
> ...
> 
> ```
> 
> 
> Thanks,
> 
> Zhitao Li
> 
>



Re: Review Request 45177: Setting DiscoveryInfo.

2016-04-05 Thread Maxim Khutornenko


> On April 5, 2016, 5:50 p.m., Maxim Khutornenko wrote:
> > src/test/sh/org/apache/aurora/e2e/http/http_example.aurora, line 21
> > 
> >
> > Curious, what do changes in this file actually test?
> 
> Zhitao Li wrote:
> I used this to trigger the multiple ports case and test what SRV records 
> Mesos DNS uses.
> 
> I can revert change to this file if people don't like it, but I figured a 
> slightly more complex example wouldn't really hurt.

How did you test it? Any chance you could contribute an e2e test to back these 
changes up?


- Maxim


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


On April 5, 2016, 6:15 p.m., Zhitao Li wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45177/
> ---
> 
> (Updated April 5, 2016, 6:15 p.m.)
> 
> 
> Review request for Aurora, Kunal Thakar and Stephan Erb.
> 
> 
> Bugs: AURORA-1629
> https://issues.apache.org/jira/browse/AURORA-1629
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> This allows alternative service discovery methodologies to find tasks from 
> Aurora (e.g. mesos-dns), especially the dynamic port mapping.
> 
> 
> Diffs
> -
> 
>   RELEASE-NOTES.md 2f935da01201cbef095e9d308630e187914f00ff 
>   docs/features/service-discovery.md 858ca2a137db9c8fbce20e9b2b924447fe7a41ae 
>   docs/reference/scheduler-configuration.md 
> e6c0bb60281d7c39c2aa235445ee4c1ef97464ba 
>   examples/vagrant/upstart/aurora-scheduler.conf 
> d61801c0b7c9683434a548a26bed3c49bbb75927 
>   
> src/main/java/org/apache/aurora/scheduler/configuration/executor/ExecutorModule.java
>  add1270409b7e82578267a2c10cf2afe6e93e3de 
>   
> src/main/java/org/apache/aurora/scheduler/configuration/executor/ExecutorSettings.java
>  7beea81a1e97f3f2fce215ff3e364919c3aebf6d 
>   src/main/java/org/apache/aurora/scheduler/mesos/MesosTaskFactory.java 
> 85c550bb5754154de5f639df4a0992d10cb70993 
>   src/main/java/org/apache/aurora/scheduler/mesos/TestExecutorSettings.java 
> 7110fbd78b1b4356acd40e5ab9c3379e5ac19df7 
>   
> src/test/java/org/apache/aurora/scheduler/mesos/MesosTaskFactoryImplTest.java 
> 3a6048633efceec68b15d3c511237c0f1871a3fc 
>   src/test/sh/org/apache/aurora/e2e/http/http_example.aurora 
> bb4fdec2fb2347635c6a7cc9e13133b4bf407771 
> 
> Diff: https://reviews.apache.org/r/45177/diff/
> 
> 
> Testing
> ---
> 
> 1. Added unit test;
> 2. Use the vagrant environment to start the example in http_example.aurora, 
> and observe the following in master's state.json:
> 
> ```
> curl 192.168.33.7:5050/state | jq . | less
> 
> "tasks": [
> {
> "discovery": {
> "environment": "test",
> "location": "devcluster",
> "name": "http_example.test.vagrant",
> "ports": {
> "ports": [
> {
> "name": "tcp",
> "number": 31499,
> "protocol": "TCP"
> },
> {
> "name": "http",
> "number": 31529,
> "protocol": "TCP"
> }
> ]
> },
> "visibility": "CLUSTER"
> },
> "executor_id": 
> "thermos-vagrant-test-http_example-1-e56d2834-3df3-4d6e-9399-4f5e80668703",
> "framework_id": "66d5ac1b-9243-4ef3-8016-40f19d079f5d-",
> "id": "vagrant-test-http_example-1-e56d2834-3df3-4d6e-9399-4f5e80668703",
> "name": "vagrant/test/http_example",
> "resources": {
> "cpus": 0.4,
> "disk": 64,
> "mem": 32,
> "ports": "[31499-31499, 31529-31529]"
> },
> ...
> 
> ```
> 
> 
> Thanks,
> 
> Zhitao Li
> 
>



Re: Review Request 45177: Setting DiscoveryInfo.

2016-04-05 Thread Zhitao Li

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

(Updated April 5, 2016, 6:15 p.m.)


Review request for Aurora, Kunal Thakar and Stephan Erb.


Changes
---

1. rebase;
2. make test more future proof by comparing full protobuf object instead;
3. document and typo fixes.


Bugs: AURORA-1629
https://issues.apache.org/jira/browse/AURORA-1629


Repository: aurora


Description
---

This allows alternative service discovery methodologies to find tasks from 
Aurora (e.g. mesos-dns), especially the dynamic port mapping.


Diffs (updated)
-

  RELEASE-NOTES.md 2f935da01201cbef095e9d308630e187914f00ff 
  docs/features/service-discovery.md 858ca2a137db9c8fbce20e9b2b924447fe7a41ae 
  docs/reference/scheduler-configuration.md 
e6c0bb60281d7c39c2aa235445ee4c1ef97464ba 
  examples/vagrant/upstart/aurora-scheduler.conf 
d61801c0b7c9683434a548a26bed3c49bbb75927 
  
src/main/java/org/apache/aurora/scheduler/configuration/executor/ExecutorModule.java
 add1270409b7e82578267a2c10cf2afe6e93e3de 
  
src/main/java/org/apache/aurora/scheduler/configuration/executor/ExecutorSettings.java
 7beea81a1e97f3f2fce215ff3e364919c3aebf6d 
  src/main/java/org/apache/aurora/scheduler/mesos/MesosTaskFactory.java 
85c550bb5754154de5f639df4a0992d10cb70993 
  src/main/java/org/apache/aurora/scheduler/mesos/TestExecutorSettings.java 
7110fbd78b1b4356acd40e5ab9c3379e5ac19df7 
  src/test/java/org/apache/aurora/scheduler/mesos/MesosTaskFactoryImplTest.java 
3a6048633efceec68b15d3c511237c0f1871a3fc 
  src/test/sh/org/apache/aurora/e2e/http/http_example.aurora 
bb4fdec2fb2347635c6a7cc9e13133b4bf407771 

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


Testing
---

1. Added unit test;
2. Use the vagrant environment to start the example in http_example.aurora, and 
observe the following in master's state.json:

```
curl 192.168.33.7:5050/state | jq . | less

"tasks": [
{
"discovery": {
"environment": "test",
"location": "devcluster",
"name": "http_example.test.vagrant",
"ports": {
"ports": [
{
"name": "tcp",
"number": 31499,
"protocol": "TCP"
},
{
"name": "http",
"number": 31529,
"protocol": "TCP"
}
]
},
"visibility": "CLUSTER"
},
"executor_id": 
"thermos-vagrant-test-http_example-1-e56d2834-3df3-4d6e-9399-4f5e80668703",
"framework_id": "66d5ac1b-9243-4ef3-8016-40f19d079f5d-",
"id": "vagrant-test-http_example-1-e56d2834-3df3-4d6e-9399-4f5e80668703",
"name": "vagrant/test/http_example",
"resources": {
"cpus": 0.4,
"disk": 64,
"mem": 32,
"ports": "[31499-31499, 31529-31529]"
},
...

```


Thanks,

Zhitao Li



Re: Review Request 45177: Setting DiscoveryInfo.

2016-04-05 Thread Zhitao Li


> On April 5, 2016, 5:50 p.m., Maxim Khutornenko wrote:
> > src/test/sh/org/apache/aurora/e2e/http/http_example.aurora, line 21
> > 
> >
> > Curious, what do changes in this file actually test?

I used this to trigger the multiple ports case and test what SRV records Mesos 
DNS uses.

I can revert change to this file if people don't like it, but I figured a 
slightly more complex example wouldn't really hurt.


> On April 5, 2016, 5:50 p.m., Maxim Khutornenko wrote:
> > docs/features/service-discovery.md, line 31
> > 
> >
> > Where is `twitterscheduler` part coming from in this example?

This is the lower case of 
`CommandLineDriverSettingsModule.TWITTER_FRAMEWORK_NAME`. There is a TODO to 
allow this being reconfigured in Aurora, and I also filed an issue to Mesos DNS.

I'll add some explanation.


> On April 5, 2016, 5:50 p.m., Maxim Khutornenko wrote:
> > src/main/java/org/apache/aurora/scheduler/mesos/MesosTaskFactory.java, line 
> > 252
> > 
> >
> > This should be moved above the previous line it belongs to.

fixing


- Zhitao


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


On April 5, 2016, 4:20 p.m., Zhitao Li wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45177/
> ---
> 
> (Updated April 5, 2016, 4:20 p.m.)
> 
> 
> Review request for Aurora, Kunal Thakar and Stephan Erb.
> 
> 
> Bugs: AURORA-1629
> https://issues.apache.org/jira/browse/AURORA-1629
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> This allows alternative service discovery methodologies to find tasks from 
> Aurora (e.g. mesos-dns), especially the dynamic port mapping.
> 
> 
> Diffs
> -
> 
>   RELEASE-NOTES.md 1df0345fac6ec6da92be15eb246c6957dea066bf 
>   docs/features/service-discovery.md 858ca2a137db9c8fbce20e9b2b924447fe7a41ae 
>   docs/reference/scheduler-configuration.md 
> e6c0bb60281d7c39c2aa235445ee4c1ef97464ba 
>   examples/vagrant/upstart/aurora-scheduler.conf 
> d61801c0b7c9683434a548a26bed3c49bbb75927 
>   
> src/main/java/org/apache/aurora/scheduler/configuration/executor/ExecutorModule.java
>  add1270409b7e82578267a2c10cf2afe6e93e3de 
>   
> src/main/java/org/apache/aurora/scheduler/configuration/executor/ExecutorSettings.java
>  7beea81a1e97f3f2fce215ff3e364919c3aebf6d 
>   src/main/java/org/apache/aurora/scheduler/mesos/MesosTaskFactory.java 
> 85c550bb5754154de5f639df4a0992d10cb70993 
>   src/main/java/org/apache/aurora/scheduler/mesos/TestExecutorSettings.java 
> 7110fbd78b1b4356acd40e5ab9c3379e5ac19df7 
>   
> src/test/java/org/apache/aurora/scheduler/mesos/MesosTaskFactoryImplTest.java 
> 3a6048633efceec68b15d3c511237c0f1871a3fc 
>   src/test/sh/org/apache/aurora/e2e/http/http_example.aurora 
> bb4fdec2fb2347635c6a7cc9e13133b4bf407771 
> 
> Diff: https://reviews.apache.org/r/45177/diff/
> 
> 
> Testing
> ---
> 
> 1. Added unit test;
> 2. Use the vagrant environment to start the example in http_example.aurora, 
> and observe the following in master's state.json:
> 
> ```
> curl 192.168.33.7:5050/state | jq . | less
> 
> "tasks": [
> {
> "discovery": {
> "environment": "test",
> "location": "devcluster",
> "name": "http_example.test.vagrant",
> "ports": {
> "ports": [
> {
> "name": "tcp",
> "number": 31499,
> "protocol": "TCP"
> },
> {
> "name": "http",
> "number": 31529,
> "protocol": "TCP"
> }
> ]
> },
> "visibility": "CLUSTER"
> },
> "executor_id": 
> "thermos-vagrant-test-http_example-1-e56d2834-3df3-4d6e-9399-4f5e80668703",
> "framework_id": "66d5ac1b-9243-4ef3-8016-40f19d079f5d-",
> "id": "vagrant-test-http_example-1-e56d2834-3df3-4d6e-9399-4f5e80668703",
> "name": "vagrant/test/http_example",
> "resources": {
> "cpus": 0.4,
> "disk": 64,
> "mem": 32,
> "ports": "[31499-31499, 31529-31529]"
> },
> ...
> 
> ```
> 
> 
> Thanks,
> 
> Zhitao Li
> 
>



Re: Review Request 45177: Setting DiscoveryInfo.

2016-04-05 Thread Aurora ReviewBot

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


Ship it!




Master (f729fd4) is green with this patch.
  ./build-support/jenkins/build.sh

I will refresh this build result if you post a review containing "@ReviewBot 
retry"

- Aurora ReviewBot


On April 5, 2016, 4:20 p.m., Zhitao Li wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45177/
> ---
> 
> (Updated April 5, 2016, 4:20 p.m.)
> 
> 
> Review request for Aurora, Kunal Thakar and Stephan Erb.
> 
> 
> Bugs: AURORA-1629
> https://issues.apache.org/jira/browse/AURORA-1629
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> This allows alternative service discovery methodologies to find tasks from 
> Aurora (e.g. mesos-dns), especially the dynamic port mapping.
> 
> 
> Diffs
> -
> 
>   RELEASE-NOTES.md 1df0345fac6ec6da92be15eb246c6957dea066bf 
>   docs/features/service-discovery.md 858ca2a137db9c8fbce20e9b2b924447fe7a41ae 
>   docs/reference/scheduler-configuration.md 
> e6c0bb60281d7c39c2aa235445ee4c1ef97464ba 
>   examples/vagrant/upstart/aurora-scheduler.conf 
> d61801c0b7c9683434a548a26bed3c49bbb75927 
>   
> src/main/java/org/apache/aurora/scheduler/configuration/executor/ExecutorModule.java
>  add1270409b7e82578267a2c10cf2afe6e93e3de 
>   
> src/main/java/org/apache/aurora/scheduler/configuration/executor/ExecutorSettings.java
>  7beea81a1e97f3f2fce215ff3e364919c3aebf6d 
>   src/main/java/org/apache/aurora/scheduler/mesos/MesosTaskFactory.java 
> 85c550bb5754154de5f639df4a0992d10cb70993 
>   src/main/java/org/apache/aurora/scheduler/mesos/TestExecutorSettings.java 
> 7110fbd78b1b4356acd40e5ab9c3379e5ac19df7 
>   
> src/test/java/org/apache/aurora/scheduler/mesos/MesosTaskFactoryImplTest.java 
> 3a6048633efceec68b15d3c511237c0f1871a3fc 
>   src/test/sh/org/apache/aurora/e2e/http/http_example.aurora 
> bb4fdec2fb2347635c6a7cc9e13133b4bf407771 
> 
> Diff: https://reviews.apache.org/r/45177/diff/
> 
> 
> Testing
> ---
> 
> 1. Added unit test;
> 2. Use the vagrant environment to start the example in http_example.aurora, 
> and observe the following in master's state.json:
> 
> ```
> curl 192.168.33.7:5050/state | jq . | less
> 
> "tasks": [
> {
> "discovery": {
> "environment": "test",
> "location": "devcluster",
> "name": "http_example.test.vagrant",
> "ports": {
> "ports": [
> {
> "name": "tcp",
> "number": 31499,
> "protocol": "TCP"
> },
> {
> "name": "http",
> "number": 31529,
> "protocol": "TCP"
> }
> ]
> },
> "visibility": "CLUSTER"
> },
> "executor_id": 
> "thermos-vagrant-test-http_example-1-e56d2834-3df3-4d6e-9399-4f5e80668703",
> "framework_id": "66d5ac1b-9243-4ef3-8016-40f19d079f5d-",
> "id": "vagrant-test-http_example-1-e56d2834-3df3-4d6e-9399-4f5e80668703",
> "name": "vagrant/test/http_example",
> "resources": {
> "cpus": 0.4,
> "disk": 64,
> "mem": 32,
> "ports": "[31499-31499, 31529-31529]"
> },
> ...
> 
> ```
> 
> 
> Thanks,
> 
> Zhitao Li
> 
>



Re: Review Request 45177: Setting DiscoveryInfo.

2016-04-05 Thread Zhitao Li

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

(Updated April 5, 2016, 4:20 p.m.)


Review request for Aurora, Kunal Thakar and Stephan Erb.


Changes
---

rebase


Bugs: AURORA-1629
https://issues.apache.org/jira/browse/AURORA-1629


Repository: aurora


Description
---

This allows alternative service discovery methodologies to find tasks from 
Aurora (e.g. mesos-dns), especially the dynamic port mapping.


Diffs (updated)
-

  RELEASE-NOTES.md 1df0345fac6ec6da92be15eb246c6957dea066bf 
  docs/features/service-discovery.md 858ca2a137db9c8fbce20e9b2b924447fe7a41ae 
  docs/reference/scheduler-configuration.md 
e6c0bb60281d7c39c2aa235445ee4c1ef97464ba 
  examples/vagrant/upstart/aurora-scheduler.conf 
d61801c0b7c9683434a548a26bed3c49bbb75927 
  
src/main/java/org/apache/aurora/scheduler/configuration/executor/ExecutorModule.java
 add1270409b7e82578267a2c10cf2afe6e93e3de 
  
src/main/java/org/apache/aurora/scheduler/configuration/executor/ExecutorSettings.java
 7beea81a1e97f3f2fce215ff3e364919c3aebf6d 
  src/main/java/org/apache/aurora/scheduler/mesos/MesosTaskFactory.java 
85c550bb5754154de5f639df4a0992d10cb70993 
  src/main/java/org/apache/aurora/scheduler/mesos/TestExecutorSettings.java 
7110fbd78b1b4356acd40e5ab9c3379e5ac19df7 
  src/test/java/org/apache/aurora/scheduler/mesos/MesosTaskFactoryImplTest.java 
3a6048633efceec68b15d3c511237c0f1871a3fc 
  src/test/sh/org/apache/aurora/e2e/http/http_example.aurora 
bb4fdec2fb2347635c6a7cc9e13133b4bf407771 

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


Testing
---

1. Added unit test;
2. Use the vagrant environment to start the example in http_example.aurora, and 
observe the following in master's state.json:

```
curl 192.168.33.7:5050/state | jq . | less

"tasks": [
{
"discovery": {
"environment": "test",
"location": "devcluster",
"name": "http_example.test.vagrant",
"ports": {
"ports": [
{
"name": "tcp",
"number": 31499,
"protocol": "TCP"
},
{
"name": "http",
"number": 31529,
"protocol": "TCP"
}
]
},
"visibility": "CLUSTER"
},
"executor_id": 
"thermos-vagrant-test-http_example-1-e56d2834-3df3-4d6e-9399-4f5e80668703",
"framework_id": "66d5ac1b-9243-4ef3-8016-40f19d079f5d-",
"id": "vagrant-test-http_example-1-e56d2834-3df3-4d6e-9399-4f5e80668703",
"name": "vagrant/test/http_example",
"resources": {
"cpus": 0.4,
"disk": 64,
"mem": 32,
"ports": "[31499-31499, 31529-31529]"
},
...

```


Thanks,

Zhitao Li



Re: Review Request 45177: Setting DiscoveryInfo.

2016-04-05 Thread Aurora ReviewBot

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



This patch does not apply cleanly against master (f729fd4), do you need to 
rebase?

I will refresh this build result if you post a review containing "@ReviewBot 
retry"

- Aurora ReviewBot


On April 5, 2016, 4:02 p.m., Zhitao Li wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45177/
> ---
> 
> (Updated April 5, 2016, 4:02 p.m.)
> 
> 
> Review request for Aurora, Kunal Thakar and Stephan Erb.
> 
> 
> Bugs: AURORA-1629
> https://issues.apache.org/jira/browse/AURORA-1629
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> This allows alternative service discovery methodologies to find tasks from 
> Aurora (e.g. mesos-dns), especially the dynamic port mapping.
> 
> 
> Diffs
> -
> 
>   RELEASE-NOTES.md 6fc3afeb5a9e2f2c2ba944fbc6d611d3494eb779 
>   docs/features/service-discovery.md 858ca2a137db9c8fbce20e9b2b924447fe7a41ae 
>   docs/reference/scheduler-configuration.md 
> 9945531aeb53db7387e3b030521be94a66a0c9f0 
>   examples/vagrant/upstart/aurora-scheduler.conf 
> d61801c0b7c9683434a548a26bed3c49bbb75927 
>   
> src/main/java/org/apache/aurora/scheduler/configuration/executor/ExecutorModule.java
>  add1270409b7e82578267a2c10cf2afe6e93e3de 
>   
> src/main/java/org/apache/aurora/scheduler/configuration/executor/ExecutorSettings.java
>  7beea81a1e97f3f2fce215ff3e364919c3aebf6d 
>   src/main/java/org/apache/aurora/scheduler/mesos/MesosTaskFactory.java 
> 85c550bb5754154de5f639df4a0992d10cb70993 
>   src/main/java/org/apache/aurora/scheduler/mesos/TestExecutorSettings.java 
> 7110fbd78b1b4356acd40e5ab9c3379e5ac19df7 
>   
> src/test/java/org/apache/aurora/scheduler/mesos/MesosTaskFactoryImplTest.java 
> 3a6048633efceec68b15d3c511237c0f1871a3fc 
>   src/test/sh/org/apache/aurora/e2e/http/http_example.aurora 
> bb4fdec2fb2347635c6a7cc9e13133b4bf407771 
> 
> Diff: https://reviews.apache.org/r/45177/diff/
> 
> 
> Testing
> ---
> 
> 1. Added unit test;
> 2. Use the vagrant environment to start the example in http_example.aurora, 
> and observe the following in master's state.json:
> 
> ```
> curl 192.168.33.7:5050/state | jq . | less
> 
> "tasks": [
> {
> "discovery": {
> "environment": "test",
> "location": "devcluster",
> "name": "http_example.test.vagrant",
> "ports": {
> "ports": [
> {
> "name": "tcp",
> "number": 31499,
> "protocol": "TCP"
> },
> {
> "name": "http",
> "number": 31529,
> "protocol": "TCP"
> }
> ]
> },
> "visibility": "CLUSTER"
> },
> "executor_id": 
> "thermos-vagrant-test-http_example-1-e56d2834-3df3-4d6e-9399-4f5e80668703",
> "framework_id": "66d5ac1b-9243-4ef3-8016-40f19d079f5d-",
> "id": "vagrant-test-http_example-1-e56d2834-3df3-4d6e-9399-4f5e80668703",
> "name": "vagrant/test/http_example",
> "resources": {
> "cpus": 0.4,
> "disk": 64,
> "mem": 32,
> "ports": "[31499-31499, 31529-31529]"
> },
> ...
> 
> ```
> 
> 
> Thanks,
> 
> Zhitao Li
> 
>



Re: Review Request 45177: Setting DiscoveryInfo.

2016-04-05 Thread Zhitao Li

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

(Updated April 5, 2016, 4:02 p.m.)


Review request for Aurora, Kunal Thakar and Stephan Erb.


Changes
---

1. Change http_example to multiple ports;
2. Add documentation for how multiple ports work for Mesos DNS, and other 
limitation;
3. New flag doc in scheduler-configurtion.md.


Bugs: AURORA-1629
https://issues.apache.org/jira/browse/AURORA-1629


Repository: aurora


Description
---

This allows alternative service discovery methodologies to find tasks from 
Aurora (e.g. mesos-dns), especially the dynamic port mapping.


Diffs (updated)
-

  RELEASE-NOTES.md 6fc3afeb5a9e2f2c2ba944fbc6d611d3494eb779 
  docs/features/service-discovery.md 858ca2a137db9c8fbce20e9b2b924447fe7a41ae 
  docs/reference/scheduler-configuration.md 
9945531aeb53db7387e3b030521be94a66a0c9f0 
  examples/vagrant/upstart/aurora-scheduler.conf 
d61801c0b7c9683434a548a26bed3c49bbb75927 
  
src/main/java/org/apache/aurora/scheduler/configuration/executor/ExecutorModule.java
 add1270409b7e82578267a2c10cf2afe6e93e3de 
  
src/main/java/org/apache/aurora/scheduler/configuration/executor/ExecutorSettings.java
 7beea81a1e97f3f2fce215ff3e364919c3aebf6d 
  src/main/java/org/apache/aurora/scheduler/mesos/MesosTaskFactory.java 
85c550bb5754154de5f639df4a0992d10cb70993 
  src/main/java/org/apache/aurora/scheduler/mesos/TestExecutorSettings.java 
7110fbd78b1b4356acd40e5ab9c3379e5ac19df7 
  src/test/java/org/apache/aurora/scheduler/mesos/MesosTaskFactoryImplTest.java 
3a6048633efceec68b15d3c511237c0f1871a3fc 
  src/test/sh/org/apache/aurora/e2e/http/http_example.aurora 
bb4fdec2fb2347635c6a7cc9e13133b4bf407771 

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


Testing (updated)
---

1. Added unit test;
2. Use the vagrant environment to start the example in http_example.aurora, and 
observe the following in master's state.json:

```
curl 192.168.33.7:5050/state | jq . | less

"tasks": [
{
"discovery": {
"environment": "test",
"location": "devcluster",
"name": "http_example.test.vagrant",
"ports": {
"ports": [
{
"name": "tcp",
"number": 31499,
"protocol": "TCP"
},
{
"name": "http",
"number": 31529,
"protocol": "TCP"
}
]
},
"visibility": "CLUSTER"
},
"executor_id": 
"thermos-vagrant-test-http_example-1-e56d2834-3df3-4d6e-9399-4f5e80668703",
"framework_id": "66d5ac1b-9243-4ef3-8016-40f19d079f5d-",
"id": "vagrant-test-http_example-1-e56d2834-3df3-4d6e-9399-4f5e80668703",
"name": "vagrant/test/http_example",
"resources": {
"cpus": 0.4,
"disk": 64,
"mem": 32,
"ports": "[31499-31499, 31529-31529]"
},
...

```


Thanks,

Zhitao Li



Re: Review Request 45177: Setting DiscoveryInfo.

2016-04-05 Thread Zhitao Li


> On April 5, 2016, 1:39 p.m., Stephan Erb wrote:
> > docs/features/service-discovery.md, line 31
> > 
> >
> > How does Mesos DNS find out about our primary port? The code below 
> > reads like we just populate all ports.

Performed more testing: in fact Mesos DNS merges all (ip, port) tuples into 
this one record.

It has another (pretty undocumented) SRV record of form 
`_{port-name}.{name}.{framework}.{domain}`, which should be used for multiple 
ports case instead.

I'm updating document to reflect this.


> On April 5, 2016, 1:39 p.m., Stephan Erb wrote:
> > src/main/java/org/apache/aurora/scheduler/configuration/executor/ExecutorModule.java,
> >  line 106
> > 
> >
> > Please add this flag to the `scheduler-configuration.md` documentation 
> > (we should really automate that one day...)

Will do.


> On April 5, 2016, 1:39 p.m., Stephan Erb wrote:
> > src/main/java/org/apache/aurora/scheduler/mesos/MesosTaskFactory.java, line 
> > 253
> > 
> >
> > This has the disadvantage that it will ignore the portmap of the 
> > announcer. The `mname` feature has the same problem. The portmap resolve 
> > code does currently only live in python. 
> > https://github.com/apache/aurora/blob/b24619b28c4dbb35188871bacd0091a9e01218e3/src/main/python/apache/aurora/config/port_resolver.py#L22
> >  
> > 
> > I don't think the limitation is very severe right now (given that this 
> > is still a beta feature).
> > However you should probably be aware of that. Maybe you could mention 
> > it in the documentation.

Will mention this in document.


- Zhitao


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


On April 5, 2016, 1:50 p.m., Zhitao Li wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45177/
> ---
> 
> (Updated April 5, 2016, 1:50 p.m.)
> 
> 
> Review request for Aurora, Kunal Thakar and Stephan Erb.
> 
> 
> Bugs: AURORA-1629
> https://issues.apache.org/jira/browse/AURORA-1629
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> This allows alternative service discovery methodologies to find tasks from 
> Aurora (e.g. mesos-dns), especially the dynamic port mapping.
> 
> 
> Diffs
> -
> 
>   RELEASE-NOTES.md 6fc3afeb5a9e2f2c2ba944fbc6d611d3494eb779 
>   docs/features/service-discovery.md 858ca2a137db9c8fbce20e9b2b924447fe7a41ae 
>   examples/vagrant/upstart/aurora-scheduler.conf 
> d61801c0b7c9683434a548a26bed3c49bbb75927 
>   
> src/main/java/org/apache/aurora/scheduler/configuration/executor/ExecutorModule.java
>  add1270409b7e82578267a2c10cf2afe6e93e3de 
>   
> src/main/java/org/apache/aurora/scheduler/configuration/executor/ExecutorSettings.java
>  7beea81a1e97f3f2fce215ff3e364919c3aebf6d 
>   src/main/java/org/apache/aurora/scheduler/mesos/MesosTaskFactory.java 
> 85c550bb5754154de5f639df4a0992d10cb70993 
>   src/main/java/org/apache/aurora/scheduler/mesos/TestExecutorSettings.java 
> 7110fbd78b1b4356acd40e5ab9c3379e5ac19df7 
>   
> src/test/java/org/apache/aurora/scheduler/mesos/MesosTaskFactoryImplTest.java 
> 3a6048633efceec68b15d3c511237c0f1871a3fc 
> 
> Diff: https://reviews.apache.org/r/45177/diff/
> 
> 
> Testing
> ---
> 
> 1. Added unit test;
> 2. Use the vagrant environment to start the example in http_example.aurora, 
> and observe the following in master's state.json:
> 
> ```
> curl 192.168.33.7:5050/state | jq . | less
> 
> "tasks": [
> {
> "discovery": {
> "environment": "test",
> "name": "vagrant.test.http_example.1",
> "ports": {
> "ports": [
> {
> "name": "http",
> "number": 31648
> }
> ]
> },
> "visibility": "CLUSTER"
> },
> "executor_id": 
> "thermos-vagrant-test-http_example-1-69c3908a-e8cd-44a7-a824-dd87ef5920f0",
> "framework_id": "770e194c-6366-41f2-8a2d-e2c616aa9490-",
> "id": "vagrant-test-http_example-1-69c3908a-e8cd-44a7-a824-dd87ef5920f0",
> "name": "vagrant/test/http_example",
> "resources": {
> "cpus": 0.4,
> "disk": 64,
> "mem": 32,
> "ports": "[31648-31648]"
> },
> ...
> 
> ```
> 
> 
> Thanks,
> 
> Zhitao Li
> 
>



Re: Review Request 45177: Setting DiscoveryInfo.

2016-04-05 Thread Zhitao Li

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

(Updated April 5, 2016, 3:50 p.m.)


Review request for Aurora, Kunal Thakar and Stephan Erb.


Bugs: AURORA-1629
https://issues.apache.org/jira/browse/AURORA-1629


Repository: aurora


Description
---

This allows alternative service discovery methodologies to find tasks from 
Aurora (e.g. mesos-dns), especially the dynamic port mapping.


Diffs
-

  RELEASE-NOTES.md 6fc3afeb5a9e2f2c2ba944fbc6d611d3494eb779 
  docs/features/service-discovery.md 858ca2a137db9c8fbce20e9b2b924447fe7a41ae 
  examples/vagrant/upstart/aurora-scheduler.conf 
d61801c0b7c9683434a548a26bed3c49bbb75927 
  
src/main/java/org/apache/aurora/scheduler/configuration/executor/ExecutorModule.java
 add1270409b7e82578267a2c10cf2afe6e93e3de 
  
src/main/java/org/apache/aurora/scheduler/configuration/executor/ExecutorSettings.java
 7beea81a1e97f3f2fce215ff3e364919c3aebf6d 
  src/main/java/org/apache/aurora/scheduler/mesos/MesosTaskFactory.java 
85c550bb5754154de5f639df4a0992d10cb70993 
  src/main/java/org/apache/aurora/scheduler/mesos/TestExecutorSettings.java 
7110fbd78b1b4356acd40e5ab9c3379e5ac19df7 
  src/test/java/org/apache/aurora/scheduler/mesos/MesosTaskFactoryImplTest.java 
3a6048633efceec68b15d3c511237c0f1871a3fc 

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


Testing
---

1. Added unit test;
2. Use the vagrant environment to start the example in http_example.aurora, and 
observe the following in master's state.json:

```
curl 192.168.33.7:5050/state | jq . | less

"tasks": [
{
"discovery": {
"environment": "test",
"name": "vagrant.test.http_example.1",
"ports": {
"ports": [
{
"name": "http",
"number": 31648
}
]
},
"visibility": "CLUSTER"
},
"executor_id": 
"thermos-vagrant-test-http_example-1-69c3908a-e8cd-44a7-a824-dd87ef5920f0",
"framework_id": "770e194c-6366-41f2-8a2d-e2c616aa9490-",
"id": "vagrant-test-http_example-1-69c3908a-e8cd-44a7-a824-dd87ef5920f0",
"name": "vagrant/test/http_example",
"resources": {
"cpus": 0.4,
"disk": 64,
"mem": 32,
"ports": "[31648-31648]"
},
...

```


Thanks,

Zhitao Li



Re: Review Request 45177: Setting DiscoveryInfo.

2016-04-05 Thread Stephan Erb

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




docs/features/service-discovery.md (line 31)


How does Mesos DNS find out about our primary port? The code below reads 
like we just populate all ports.



src/main/java/org/apache/aurora/scheduler/configuration/executor/ExecutorModule.java
 (line 106)


Please add this flag to the `scheduler-configuration.md` documentation (we 
should really automate that one day...)



src/main/java/org/apache/aurora/scheduler/mesos/MesosTaskFactory.java (line 253)


This has the disadvantage that it will ignore the portmap of the announcer. 
The `mname` feature has the same problem. The portmap resolve code does 
currently only live in python. 
https://github.com/apache/aurora/blob/b24619b28c4dbb35188871bacd0091a9e01218e3/src/main/python/apache/aurora/config/port_resolver.py#L22
 

I don't think the limitation is very severe right now (given that this is 
still a beta feature).
However you should probably be aware of that. Maybe you could mention it in 
the documentation.


- Stephan Erb


On April 4, 2016, 9:44 p.m., Zhitao Li wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45177/
> ---
> 
> (Updated April 4, 2016, 9:44 p.m.)
> 
> 
> Review request for Aurora, Kunal Thakar and Stephan Erb.
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> This allows alternative service discovery methodologies to find tasks from 
> Aurora (e.g. mesos-dns), especially the dynamic port mapping.
> 
> 
> Diffs
> -
> 
>   RELEASE-NOTES.md 6fc3afeb5a9e2f2c2ba944fbc6d611d3494eb779 
>   docs/features/service-discovery.md 858ca2a137db9c8fbce20e9b2b924447fe7a41ae 
>   examples/vagrant/upstart/aurora-scheduler.conf 
> d61801c0b7c9683434a548a26bed3c49bbb75927 
>   
> src/main/java/org/apache/aurora/scheduler/configuration/executor/ExecutorModule.java
>  add1270409b7e82578267a2c10cf2afe6e93e3de 
>   
> src/main/java/org/apache/aurora/scheduler/configuration/executor/ExecutorSettings.java
>  7beea81a1e97f3f2fce215ff3e364919c3aebf6d 
>   src/main/java/org/apache/aurora/scheduler/mesos/MesosTaskFactory.java 
> 85c550bb5754154de5f639df4a0992d10cb70993 
>   src/main/java/org/apache/aurora/scheduler/mesos/TestExecutorSettings.java 
> 7110fbd78b1b4356acd40e5ab9c3379e5ac19df7 
>   
> src/test/java/org/apache/aurora/scheduler/mesos/MesosTaskFactoryImplTest.java 
> 3a6048633efceec68b15d3c511237c0f1871a3fc 
> 
> Diff: https://reviews.apache.org/r/45177/diff/
> 
> 
> Testing
> ---
> 
> 1. Added unit test;
> 2. Use the vagrant environment to start the example in http_example.aurora, 
> and observe the following in master's state.json:
> 
> ```
> curl 192.168.33.7:5050/state | jq . | less
> 
> "tasks": [
> {
> "discovery": {
> "environment": "test",
> "name": "vagrant.test.http_example.1",
> "ports": {
> "ports": [
> {
> "name": "http",
> "number": 31648
> }
> ]
> },
> "visibility": "CLUSTER"
> },
> "executor_id": 
> "thermos-vagrant-test-http_example-1-69c3908a-e8cd-44a7-a824-dd87ef5920f0",
> "framework_id": "770e194c-6366-41f2-8a2d-e2c616aa9490-",
> "id": "vagrant-test-http_example-1-69c3908a-e8cd-44a7-a824-dd87ef5920f0",
> "name": "vagrant/test/http_example",
> "resources": {
> "cpus": 0.4,
> "disk": 64,
> "mem": 32,
> "ports": "[31648-31648]"
> },
> ...
> 
> ```
> 
> 
> Thanks,
> 
> Zhitao Li
> 
>



Re: Review Request 45177: Setting DiscoveryInfo.

2016-04-04 Thread Aurora ReviewBot

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


Ship it!




Master (9847b02) is green with this patch.
  ./build-support/jenkins/build.sh

I will refresh this build result if you post a review containing "@ReviewBot 
retry"

- Aurora ReviewBot


On April 4, 2016, 7:44 p.m., Zhitao Li wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45177/
> ---
> 
> (Updated April 4, 2016, 7:44 p.m.)
> 
> 
> Review request for Aurora, Kunal Thakar and Stephan Erb.
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> This allows alternative service discovery methodologies to find tasks from 
> Aurora (e.g. mesos-dns), especially the dynamic port mapping.
> 
> 
> Diffs
> -
> 
>   RELEASE-NOTES.md 6fc3afeb5a9e2f2c2ba944fbc6d611d3494eb779 
>   docs/features/service-discovery.md 858ca2a137db9c8fbce20e9b2b924447fe7a41ae 
>   examples/vagrant/upstart/aurora-scheduler.conf 
> d61801c0b7c9683434a548a26bed3c49bbb75927 
>   
> src/main/java/org/apache/aurora/scheduler/configuration/executor/ExecutorModule.java
>  add1270409b7e82578267a2c10cf2afe6e93e3de 
>   
> src/main/java/org/apache/aurora/scheduler/configuration/executor/ExecutorSettings.java
>  7beea81a1e97f3f2fce215ff3e364919c3aebf6d 
>   src/main/java/org/apache/aurora/scheduler/mesos/MesosTaskFactory.java 
> 85c550bb5754154de5f639df4a0992d10cb70993 
>   src/main/java/org/apache/aurora/scheduler/mesos/TestExecutorSettings.java 
> 7110fbd78b1b4356acd40e5ab9c3379e5ac19df7 
>   
> src/test/java/org/apache/aurora/scheduler/mesos/MesosTaskFactoryImplTest.java 
> 3a6048633efceec68b15d3c511237c0f1871a3fc 
> 
> Diff: https://reviews.apache.org/r/45177/diff/
> 
> 
> Testing
> ---
> 
> 1. Added unit test;
> 2. Use the vagrant environment to start the example in http_example.aurora, 
> and observe the following in master's state.json:
> 
> ```
> curl 192.168.33.7:5050/state | jq . | less
> 
> "tasks": [
> {
> "discovery": {
> "environment": "test",
> "name": "vagrant.test.http_example.1",
> "ports": {
> "ports": [
> {
> "name": "http",
> "number": 31648
> }
> ]
> },
> "visibility": "CLUSTER"
> },
> "executor_id": 
> "thermos-vagrant-test-http_example-1-69c3908a-e8cd-44a7-a824-dd87ef5920f0",
> "framework_id": "770e194c-6366-41f2-8a2d-e2c616aa9490-",
> "id": "vagrant-test-http_example-1-69c3908a-e8cd-44a7-a824-dd87ef5920f0",
> "name": "vagrant/test/http_example",
> "resources": {
> "cpus": 0.4,
> "disk": 64,
> "mem": 32,
> "ports": "[31648-31648]"
> },
> ...
> 
> ```
> 
> 
> Thanks,
> 
> Zhitao Li
> 
>



Re: Review Request 45177: Setting DiscoveryInfo.

2016-04-04 Thread Zhitao Li


> On April 1, 2016, 12:05 p.m., Stephan Erb wrote:
> > src/main/java/org/apache/aurora/scheduler/mesos/MesosTaskFactory.java, line 
> > 242
> > 
> >
> > Should we consider using the inverse notation here? This would be 
> > `...` instead of 
> > `...`? @benley made a simmilar 
> > comment on the mailing list.
> > 
> > What do you think?
> 
> Zhitao Li wrote:
> I'll give this a try and test again, but I suspect current implementation 
> of Mesos DNS simply swallows dot and truncates the string with its own 
> standard.
> 
> `` probably should be left out by default since client wants 
> load balance among instances instead of one instance per record?

Sorry I was wrong in previous comment, inverse DNS record actualy looks pretty 
nice (twitterscheduler is still there, but I don't think it's a big problem to 
myself, especially given last `mesos` domain is customizable in Mesos DNS).

Updated code and doc.


- Zhitao


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


On April 4, 2016, 7:44 p.m., Zhitao Li wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45177/
> ---
> 
> (Updated April 4, 2016, 7:44 p.m.)
> 
> 
> Review request for Aurora, Kunal Thakar and Stephan Erb.
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> This allows alternative service discovery methodologies to find tasks from 
> Aurora (e.g. mesos-dns), especially the dynamic port mapping.
> 
> 
> Diffs
> -
> 
>   RELEASE-NOTES.md 6fc3afeb5a9e2f2c2ba944fbc6d611d3494eb779 
>   docs/features/service-discovery.md 858ca2a137db9c8fbce20e9b2b924447fe7a41ae 
>   examples/vagrant/upstart/aurora-scheduler.conf 
> d61801c0b7c9683434a548a26bed3c49bbb75927 
>   
> src/main/java/org/apache/aurora/scheduler/configuration/executor/ExecutorModule.java
>  add1270409b7e82578267a2c10cf2afe6e93e3de 
>   
> src/main/java/org/apache/aurora/scheduler/configuration/executor/ExecutorSettings.java
>  7beea81a1e97f3f2fce215ff3e364919c3aebf6d 
>   src/main/java/org/apache/aurora/scheduler/mesos/MesosTaskFactory.java 
> 85c550bb5754154de5f639df4a0992d10cb70993 
>   src/main/java/org/apache/aurora/scheduler/mesos/TestExecutorSettings.java 
> 7110fbd78b1b4356acd40e5ab9c3379e5ac19df7 
>   
> src/test/java/org/apache/aurora/scheduler/mesos/MesosTaskFactoryImplTest.java 
> 3a6048633efceec68b15d3c511237c0f1871a3fc 
> 
> Diff: https://reviews.apache.org/r/45177/diff/
> 
> 
> Testing
> ---
> 
> 1. Added unit test;
> 2. Use the vagrant environment to start the example in http_example.aurora, 
> and observe the following in master's state.json:
> 
> ```
> curl 192.168.33.7:5050/state | jq . | less
> 
> "tasks": [
> {
> "discovery": {
> "environment": "test",
> "name": "vagrant.test.http_example.1",
> "ports": {
> "ports": [
> {
> "name": "http",
> "number": 31648
> }
> ]
> },
> "visibility": "CLUSTER"
> },
> "executor_id": 
> "thermos-vagrant-test-http_example-1-69c3908a-e8cd-44a7-a824-dd87ef5920f0",
> "framework_id": "770e194c-6366-41f2-8a2d-e2c616aa9490-",
> "id": "vagrant-test-http_example-1-69c3908a-e8cd-44a7-a824-dd87ef5920f0",
> "name": "vagrant/test/http_example",
> "resources": {
> "cpus": 0.4,
> "disk": 64,
> "mem": 32,
> "ports": "[31648-31648]"
> },
> ...
> 
> ```
> 
> 
> Thanks,
> 
> Zhitao Li
> 
>



Re: Review Request 45177: Setting DiscoveryInfo.

2016-04-04 Thread Zhitao Li

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

(Updated April 4, 2016, 7:44 p.m.)


Review request for Aurora, Kunal Thakar and Stephan Erb.


Changes
---

Inverse DNS name, and doc update as requested.


Repository: aurora


Description
---

This allows alternative service discovery methodologies to find tasks from 
Aurora (e.g. mesos-dns), especially the dynamic port mapping.


Diffs (updated)
-

  RELEASE-NOTES.md 6fc3afeb5a9e2f2c2ba944fbc6d611d3494eb779 
  docs/features/service-discovery.md 858ca2a137db9c8fbce20e9b2b924447fe7a41ae 
  examples/vagrant/upstart/aurora-scheduler.conf 
d61801c0b7c9683434a548a26bed3c49bbb75927 
  
src/main/java/org/apache/aurora/scheduler/configuration/executor/ExecutorModule.java
 add1270409b7e82578267a2c10cf2afe6e93e3de 
  
src/main/java/org/apache/aurora/scheduler/configuration/executor/ExecutorSettings.java
 7beea81a1e97f3f2fce215ff3e364919c3aebf6d 
  src/main/java/org/apache/aurora/scheduler/mesos/MesosTaskFactory.java 
85c550bb5754154de5f639df4a0992d10cb70993 
  src/main/java/org/apache/aurora/scheduler/mesos/TestExecutorSettings.java 
7110fbd78b1b4356acd40e5ab9c3379e5ac19df7 
  src/test/java/org/apache/aurora/scheduler/mesos/MesosTaskFactoryImplTest.java 
3a6048633efceec68b15d3c511237c0f1871a3fc 

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


Testing
---

1. Added unit test;
2. Use the vagrant environment to start the example in http_example.aurora, and 
observe the following in master's state.json:

```
curl 192.168.33.7:5050/state | jq . | less

"tasks": [
{
"discovery": {
"environment": "test",
"name": "vagrant.test.http_example.1",
"ports": {
"ports": [
{
"name": "http",
"number": 31648
}
]
},
"visibility": "CLUSTER"
},
"executor_id": 
"thermos-vagrant-test-http_example-1-69c3908a-e8cd-44a7-a824-dd87ef5920f0",
"framework_id": "770e194c-6366-41f2-8a2d-e2c616aa9490-",
"id": "vagrant-test-http_example-1-69c3908a-e8cd-44a7-a824-dd87ef5920f0",
"name": "vagrant/test/http_example",
"resources": {
"cpus": 0.4,
"disk": 64,
"mem": 32,
"ports": "[31648-31648]"
},
...

```


Thanks,

Zhitao Li



Re: Review Request 45177: Setting DiscoveryInfo.

2016-04-01 Thread Zhitao Li


> On April 1, 2016, 12:05 p.m., Stephan Erb wrote:
> > src/main/java/org/apache/aurora/scheduler/mesos/MesosTaskFactory.java, line 
> > 242
> > 
> >
> > Should we consider using the inverse notation here? This would be 
> > `...` instead of 
> > `...`? @benley made a simmilar 
> > comment on the mailing list.
> > 
> > What do you think?

I'll give this a try and test again, but I suspect current implementation of 
Mesos DNS simply swallows dot and truncates the string with its own standard.

`` probably should be left out by default since client wants load 
balance among instances instead of one instance per record?


- Zhitao


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


On March 31, 2016, 9:48 p.m., Zhitao Li wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45177/
> ---
> 
> (Updated March 31, 2016, 9:48 p.m.)
> 
> 
> Review request for Aurora, Kunal Thakar and Stephan Erb.
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> This allows alternative service discovery methodologies to find tasks from 
> Aurora (e.g. mesos-dns), especially the dynamic port mapping.
> 
> 
> Diffs
> -
> 
>   RELEASE-NOTES.md 6fc3afeb5a9e2f2c2ba944fbc6d611d3494eb779 
>   examples/vagrant/upstart/aurora-scheduler.conf 
> d61801c0b7c9683434a548a26bed3c49bbb75927 
>   
> src/main/java/org/apache/aurora/scheduler/configuration/executor/ExecutorModule.java
>  add1270409b7e82578267a2c10cf2afe6e93e3de 
>   
> src/main/java/org/apache/aurora/scheduler/configuration/executor/ExecutorSettings.java
>  7beea81a1e97f3f2fce215ff3e364919c3aebf6d 
>   src/main/java/org/apache/aurora/scheduler/mesos/MesosTaskFactory.java 
> 85c550bb5754154de5f639df4a0992d10cb70993 
>   src/main/java/org/apache/aurora/scheduler/mesos/TestExecutorSettings.java 
> 7110fbd78b1b4356acd40e5ab9c3379e5ac19df7 
>   
> src/test/java/org/apache/aurora/scheduler/mesos/MesosTaskFactoryImplTest.java 
> 3a6048633efceec68b15d3c511237c0f1871a3fc 
> 
> Diff: https://reviews.apache.org/r/45177/diff/
> 
> 
> Testing
> ---
> 
> 1. Added unit test;
> 2. Use the vagrant environment to start the example in http_example.aurora, 
> and observe the following in master's state.json:
> 
> ```
> curl 192.168.33.7:5050/state | jq . | less
> 
> "tasks": [
> {
> "discovery": {
> "environment": "test",
> "name": "vagrant.test.http_example.1",
> "ports": {
> "ports": [
> {
> "name": "http",
> "number": 31648
> }
> ]
> },
> "visibility": "CLUSTER"
> },
> "executor_id": 
> "thermos-vagrant-test-http_example-1-69c3908a-e8cd-44a7-a824-dd87ef5920f0",
> "framework_id": "770e194c-6366-41f2-8a2d-e2c616aa9490-",
> "id": "vagrant-test-http_example-1-69c3908a-e8cd-44a7-a824-dd87ef5920f0",
> "name": "vagrant/test/http_example",
> "resources": {
> "cpus": 0.4,
> "disk": 64,
> "mem": 32,
> "ports": "[31648-31648]"
> },
> ...
> 
> ```
> 
> 
> Thanks,
> 
> Zhitao Li
> 
>



Re: Review Request 45177: Setting DiscoveryInfo.

2016-04-01 Thread Zhitao Li


> On March 31, 2016, 8:25 p.m., Joshua Cohen wrote:
> > RELEASE-NOTES.md, line 14
> > 
> >
> > Is there any reason we need a command line arg to control this? Is 
> > there any detriment to just always populating `DiscoveryInfo`?
> 
> Zhitao Li wrote:
> The only possible concern I have for now is that this would 1) generate 
> more data to Mesos and master/slave might have higher memory pressure, and 2) 
> Mesos endpoints like /state.json might be slower.
> 
> Giving operator a flag to control this would allow people to test it out.
> 
> Unfortunately, I don't have a large Aurora cluster running so I can't 
> really quantifiy it's impact right now.
> 
> Joshua Cohen wrote:
> In my gut I feel like it shouldn't be a problem, but out of an abundance 
> of caution, let's go ahead with the flag. We can remove it in the future if 
> the functionality is deemed harmless to large clusters.

Agreed. Removing it in the future is exactly what I planned.


- Zhitao


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


On March 31, 2016, 9:48 p.m., Zhitao Li wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45177/
> ---
> 
> (Updated March 31, 2016, 9:48 p.m.)
> 
> 
> Review request for Aurora, Kunal Thakar and Stephan Erb.
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> This allows alternative service discovery methodologies to find tasks from 
> Aurora (e.g. mesos-dns), especially the dynamic port mapping.
> 
> 
> Diffs
> -
> 
>   RELEASE-NOTES.md 6fc3afeb5a9e2f2c2ba944fbc6d611d3494eb779 
>   examples/vagrant/upstart/aurora-scheduler.conf 
> d61801c0b7c9683434a548a26bed3c49bbb75927 
>   
> src/main/java/org/apache/aurora/scheduler/configuration/executor/ExecutorModule.java
>  add1270409b7e82578267a2c10cf2afe6e93e3de 
>   
> src/main/java/org/apache/aurora/scheduler/configuration/executor/ExecutorSettings.java
>  7beea81a1e97f3f2fce215ff3e364919c3aebf6d 
>   src/main/java/org/apache/aurora/scheduler/mesos/MesosTaskFactory.java 
> 85c550bb5754154de5f639df4a0992d10cb70993 
>   src/main/java/org/apache/aurora/scheduler/mesos/TestExecutorSettings.java 
> 7110fbd78b1b4356acd40e5ab9c3379e5ac19df7 
>   
> src/test/java/org/apache/aurora/scheduler/mesos/MesosTaskFactoryImplTest.java 
> 3a6048633efceec68b15d3c511237c0f1871a3fc 
> 
> Diff: https://reviews.apache.org/r/45177/diff/
> 
> 
> Testing
> ---
> 
> 1. Added unit test;
> 2. Use the vagrant environment to start the example in http_example.aurora, 
> and observe the following in master's state.json:
> 
> ```
> curl 192.168.33.7:5050/state | jq . | less
> 
> "tasks": [
> {
> "discovery": {
> "environment": "test",
> "name": "vagrant.test.http_example.1",
> "ports": {
> "ports": [
> {
> "name": "http",
> "number": 31648
> }
> ]
> },
> "visibility": "CLUSTER"
> },
> "executor_id": 
> "thermos-vagrant-test-http_example-1-69c3908a-e8cd-44a7-a824-dd87ef5920f0",
> "framework_id": "770e194c-6366-41f2-8a2d-e2c616aa9490-",
> "id": "vagrant-test-http_example-1-69c3908a-e8cd-44a7-a824-dd87ef5920f0",
> "name": "vagrant/test/http_example",
> "resources": {
> "cpus": 0.4,
> "disk": 64,
> "mem": 32,
> "ports": "[31648-31648]"
> },
> ...
> 
> ```
> 
> 
> Thanks,
> 
> Zhitao Li
> 
>



Re: Review Request 45177: Setting DiscoveryInfo.

2016-04-01 Thread Stephan Erb

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



Please add an explanation of the feature to 
https://github.com/apache/aurora/blob/master/docs/features/service-discovery.md.

I am aware that the existing ZK-based service discovery is not documented well, 
but let's at least get that right for the new stuff :-)


src/main/java/org/apache/aurora/scheduler/mesos/MesosTaskFactory.java (line 242)


Should we consider using the inverse notation here? This would be 
`...` instead of 
`...`? @benley made a simmilar comment 
on the mailing list.

What do you think?


- Stephan Erb


On March 31, 2016, 11:48 p.m., Zhitao Li wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45177/
> ---
> 
> (Updated March 31, 2016, 11:48 p.m.)
> 
> 
> Review request for Aurora, Kunal Thakar and Stephan Erb.
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> This allows alternative service discovery methodologies to find tasks from 
> Aurora (e.g. mesos-dns), especially the dynamic port mapping.
> 
> 
> Diffs
> -
> 
>   RELEASE-NOTES.md 6fc3afeb5a9e2f2c2ba944fbc6d611d3494eb779 
>   examples/vagrant/upstart/aurora-scheduler.conf 
> d61801c0b7c9683434a548a26bed3c49bbb75927 
>   
> src/main/java/org/apache/aurora/scheduler/configuration/executor/ExecutorModule.java
>  add1270409b7e82578267a2c10cf2afe6e93e3de 
>   
> src/main/java/org/apache/aurora/scheduler/configuration/executor/ExecutorSettings.java
>  7beea81a1e97f3f2fce215ff3e364919c3aebf6d 
>   src/main/java/org/apache/aurora/scheduler/mesos/MesosTaskFactory.java 
> 85c550bb5754154de5f639df4a0992d10cb70993 
>   src/main/java/org/apache/aurora/scheduler/mesos/TestExecutorSettings.java 
> 7110fbd78b1b4356acd40e5ab9c3379e5ac19df7 
>   
> src/test/java/org/apache/aurora/scheduler/mesos/MesosTaskFactoryImplTest.java 
> 3a6048633efceec68b15d3c511237c0f1871a3fc 
> 
> Diff: https://reviews.apache.org/r/45177/diff/
> 
> 
> Testing
> ---
> 
> 1. Added unit test;
> 2. Use the vagrant environment to start the example in http_example.aurora, 
> and observe the following in master's state.json:
> 
> ```
> curl 192.168.33.7:5050/state | jq . | less
> 
> "tasks": [
> {
> "discovery": {
> "environment": "test",
> "name": "vagrant.test.http_example.1",
> "ports": {
> "ports": [
> {
> "name": "http",
> "number": 31648
> }
> ]
> },
> "visibility": "CLUSTER"
> },
> "executor_id": 
> "thermos-vagrant-test-http_example-1-69c3908a-e8cd-44a7-a824-dd87ef5920f0",
> "framework_id": "770e194c-6366-41f2-8a2d-e2c616aa9490-",
> "id": "vagrant-test-http_example-1-69c3908a-e8cd-44a7-a824-dd87ef5920f0",
> "name": "vagrant/test/http_example",
> "resources": {
> "cpus": 0.4,
> "disk": 64,
> "mem": 32,
> "ports": "[31648-31648]"
> },
> ...
> 
> ```
> 
> 
> Thanks,
> 
> Zhitao Li
> 
>



Re: Review Request 45177: Setting DiscoveryInfo.

2016-03-31 Thread Aurora ReviewBot

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



Master (17ade11) is red with this patch.
  ./build-support/jenkins/build.sh

:commons:generateThriftResources
:commons:processResources
:commons:classes
:commons:jar
:compileJava/home/jenkins/jenkins-slave/workspace/AuroraBot/src/main/java/org/apache/aurora/scheduler/storage/log/WriteAheadStorage.java:74:
 Note: Wrote forwarder 
org.apache.aurora.scheduler.storage.log.WriteAheadStorageForwarder
@Forward({
^
Note: Writing 
file:/home/jenkins/jenkins-slave/workspace/AuroraBot/dist/classes/main/org/apache/aurora/common/args/apt/cmdline.arg.info.txt.2
Note: Writing 
file:/home/jenkins/jenkins-slave/workspace/AuroraBot/dist/classes/main/META-INF/compiler/resource-mappings/org.apache.aurora.common.args.apt.CmdLineProcessor

:generateBuildProperties
:processResources
:classes
:jar
:startScripts
:distTar
:distZip
:assemble
:compileJmhJavaNote: 
/home/jenkins/jenkins-slave/workspace/AuroraBot/src/jmh/java/org/apache/aurora/benchmark/fakes/FakeSchedulerDriver.java
 uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

:processJmhResources UP-TO-DATE
:jmhClasses
:checkstyleJmh
:jsHint
:checkstyleMain[ant:checkstyle] 
/home/jenkins/jenkins-slave/workspace/AuroraBot/src/main/java/org/apache/aurora/scheduler/mesos/MesosTaskFactory.java:93:
 error: Line is longer than 100 characters (found 110).
 FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':checkstyleMain'.
> Checkstyle rule violations were found. See the report at: 
> file:///home/jenkins/jenkins-slave/workspace/AuroraBot/dist/reports/checkstyle/main.html

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug 
option to get more log output.

BUILD FAILED

Total time: 4 mins 25.107 secs


I will refresh this build result if you post a review containing "@ReviewBot 
retry"

- Aurora ReviewBot


On March 31, 2016, 9:48 p.m., Zhitao Li wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45177/
> ---
> 
> (Updated March 31, 2016, 9:48 p.m.)
> 
> 
> Review request for Aurora, Kunal Thakar and Stephan Erb.
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> This allows alternative service discovery methodologies to find tasks from 
> Aurora (e.g. mesos-dns), especially the dynamic port mapping.
> 
> 
> Diffs
> -
> 
>   RELEASE-NOTES.md 6fc3afeb5a9e2f2c2ba944fbc6d611d3494eb779 
>   examples/vagrant/upstart/aurora-scheduler.conf 
> d61801c0b7c9683434a548a26bed3c49bbb75927 
>   
> src/main/java/org/apache/aurora/scheduler/configuration/executor/ExecutorModule.java
>  add1270409b7e82578267a2c10cf2afe6e93e3de 
>   
> src/main/java/org/apache/aurora/scheduler/configuration/executor/ExecutorSettings.java
>  7beea81a1e97f3f2fce215ff3e364919c3aebf6d 
>   src/main/java/org/apache/aurora/scheduler/mesos/MesosTaskFactory.java 
> 85c550bb5754154de5f639df4a0992d10cb70993 
>   src/main/java/org/apache/aurora/scheduler/mesos/TestExecutorSettings.java 
> 7110fbd78b1b4356acd40e5ab9c3379e5ac19df7 
>   
> src/test/java/org/apache/aurora/scheduler/mesos/MesosTaskFactoryImplTest.java 
> 3a6048633efceec68b15d3c511237c0f1871a3fc 
> 
> Diff: https://reviews.apache.org/r/45177/diff/
> 
> 
> Testing
> ---
> 
> 1. Added unit test;
> 2. Use the vagrant environment to start the example in http_example.aurora, 
> and observe the following in master's state.json:
> 
> ```
> curl 192.168.33.7:5050/state | jq . | less
> 
> "tasks": [
> {
> "discovery": {
> "environment": "test",
> "name": "vagrant.test.http_example.1",
> "ports": {
> "ports": [
> {
> "name": "http",
> "number": 31648
> }
> ]
> },
> "visibility": "CLUSTER"
> },
> "executor_id": 
> "thermos-vagrant-test-http_example-1-69c3908a-e8cd-44a7-a824-dd87ef5920f0",
> "framework_id": "770e194c-6366-41f2-8a2d-e2c616aa9490-",
> "id": "vagrant-test-http_example-1-69c3908a-e8cd-44a7-a824-dd87ef5920f0",
> "name": "vagrant/test/http_example",
> "resources": {
> "cpus": 0.4,
> "disk": 64,
> "mem": 32,
> "ports": "[31648-31648]"
> },
> ...
> 
> ```
> 
> 
> Thanks,
> 
> Zhitao Li
> 
>



Re: Review Request 45177: Setting DiscoveryInfo.

2016-03-31 Thread Joshua Cohen


> On March 31, 2016, 8:25 p.m., Joshua Cohen wrote:
> > RELEASE-NOTES.md, line 14
> > 
> >
> > Is there any reason we need a command line arg to control this? Is 
> > there any detriment to just always populating `DiscoveryInfo`?
> 
> Zhitao Li wrote:
> The only possible concern I have for now is that this would 1) generate 
> more data to Mesos and master/slave might have higher memory pressure, and 2) 
> Mesos endpoints like /state.json might be slower.
> 
> Giving operator a flag to control this would allow people to test it out.
> 
> Unfortunately, I don't have a large Aurora cluster running so I can't 
> really quantifiy it's impact right now.

In my gut I feel like it shouldn't be a problem, but out of an abundance of 
caution, let's go ahead with the flag. We can remove it in the future if the 
functionality is deemed harmless to large clusters.


- Joshua


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


On March 31, 2016, 9:48 p.m., Zhitao Li wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45177/
> ---
> 
> (Updated March 31, 2016, 9:48 p.m.)
> 
> 
> Review request for Aurora, Kunal Thakar and Stephan Erb.
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> This allows alternative service discovery methodologies to find tasks from 
> Aurora (e.g. mesos-dns), especially the dynamic port mapping.
> 
> 
> Diffs
> -
> 
>   RELEASE-NOTES.md 6fc3afeb5a9e2f2c2ba944fbc6d611d3494eb779 
>   examples/vagrant/upstart/aurora-scheduler.conf 
> d61801c0b7c9683434a548a26bed3c49bbb75927 
>   
> src/main/java/org/apache/aurora/scheduler/configuration/executor/ExecutorModule.java
>  add1270409b7e82578267a2c10cf2afe6e93e3de 
>   
> src/main/java/org/apache/aurora/scheduler/configuration/executor/ExecutorSettings.java
>  7beea81a1e97f3f2fce215ff3e364919c3aebf6d 
>   src/main/java/org/apache/aurora/scheduler/mesos/MesosTaskFactory.java 
> 85c550bb5754154de5f639df4a0992d10cb70993 
>   src/main/java/org/apache/aurora/scheduler/mesos/TestExecutorSettings.java 
> 7110fbd78b1b4356acd40e5ab9c3379e5ac19df7 
>   
> src/test/java/org/apache/aurora/scheduler/mesos/MesosTaskFactoryImplTest.java 
> 3a6048633efceec68b15d3c511237c0f1871a3fc 
> 
> Diff: https://reviews.apache.org/r/45177/diff/
> 
> 
> Testing
> ---
> 
> 1. Added unit test;
> 2. Use the vagrant environment to start the example in http_example.aurora, 
> and observe the following in master's state.json:
> 
> ```
> curl 192.168.33.7:5050/state | jq . | less
> 
> "tasks": [
> {
> "discovery": {
> "environment": "test",
> "name": "vagrant.test.http_example.1",
> "ports": {
> "ports": [
> {
> "name": "http",
> "number": 31648
> }
> ]
> },
> "visibility": "CLUSTER"
> },
> "executor_id": 
> "thermos-vagrant-test-http_example-1-69c3908a-e8cd-44a7-a824-dd87ef5920f0",
> "framework_id": "770e194c-6366-41f2-8a2d-e2c616aa9490-",
> "id": "vagrant-test-http_example-1-69c3908a-e8cd-44a7-a824-dd87ef5920f0",
> "name": "vagrant/test/http_example",
> "resources": {
> "cpus": 0.4,
> "disk": 64,
> "mem": 32,
> "ports": "[31648-31648]"
> },
> ...
> 
> ```
> 
> 
> Thanks,
> 
> Zhitao Li
> 
>



Re: Review Request 45177: Setting DiscoveryInfo.

2016-03-31 Thread Zhitao Li

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

(Updated March 31, 2016, 9:48 p.m.)


Review request for Aurora, Kunal Thakar and Stephan Erb.


Changes
---

Rebase and add environment and location to DiscoveryInfo as requested by Joshua.


Repository: aurora


Description
---

This allows alternative service discovery methodologies to find tasks from 
Aurora (e.g. mesos-dns), especially the dynamic port mapping.


Diffs (updated)
-

  RELEASE-NOTES.md 6fc3afeb5a9e2f2c2ba944fbc6d611d3494eb779 
  examples/vagrant/upstart/aurora-scheduler.conf 
d61801c0b7c9683434a548a26bed3c49bbb75927 
  
src/main/java/org/apache/aurora/scheduler/configuration/executor/ExecutorModule.java
 add1270409b7e82578267a2c10cf2afe6e93e3de 
  
src/main/java/org/apache/aurora/scheduler/configuration/executor/ExecutorSettings.java
 7beea81a1e97f3f2fce215ff3e364919c3aebf6d 
  src/main/java/org/apache/aurora/scheduler/mesos/MesosTaskFactory.java 
85c550bb5754154de5f639df4a0992d10cb70993 
  src/main/java/org/apache/aurora/scheduler/mesos/TestExecutorSettings.java 
7110fbd78b1b4356acd40e5ab9c3379e5ac19df7 
  src/test/java/org/apache/aurora/scheduler/mesos/MesosTaskFactoryImplTest.java 
3a6048633efceec68b15d3c511237c0f1871a3fc 

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


Testing
---

1. Added unit test;
2. Use the vagrant environment to start the example in http_example.aurora, and 
observe the following in master's state.json:

```
curl 192.168.33.7:5050/state | jq . | less

"tasks": [
{
"discovery": {
"environment": "test",
"name": "vagrant.test.http_example.1",
"ports": {
"ports": [
{
"name": "http",
"number": 31648
}
]
},
"visibility": "CLUSTER"
},
"executor_id": 
"thermos-vagrant-test-http_example-1-69c3908a-e8cd-44a7-a824-dd87ef5920f0",
"framework_id": "770e194c-6366-41f2-8a2d-e2c616aa9490-",
"id": "vagrant-test-http_example-1-69c3908a-e8cd-44a7-a824-dd87ef5920f0",
"name": "vagrant/test/http_example",
"resources": {
"cpus": 0.4,
"disk": 64,
"mem": 32,
"ports": "[31648-31648]"
},
...

```


Thanks,

Zhitao Li



Re: Review Request 45177: Setting DiscoveryInfo.

2016-03-31 Thread Joshua Cohen


> On March 31, 2016, 8:25 p.m., Joshua Cohen wrote:
> > src/main/java/org/apache/aurora/scheduler/mesos/MesosTaskFactory.java, line 
> > 242
> > 
> >
> > Can you also set DiscoveryInfo.location to the cluster name? From the 
> > docs on DiscoveryInfo in 
> > [mesos.proto](https://github.com/apache/mesos/blob/master/include/mesos/mesos.proto#L1831-L1836):
> > 
> > the location field may receive values like 
> > EAST-US/WEST-US/EUROPE/AMEA
> > 
> > This seems well aligned with our cluster?
> 
> Zhitao Li wrote:
> Yeah I wanted to do this. Do you know how to get that information inside 
> Aurora scheduler process?

You *should* be able to add `IServerInfo serverInfo` to the constructor to get 
a reference to the 
[ServerInfo](https://github.com/apache/aurora/blob/master/api/src/main/thrift/org/apache/aurora/gen/api.thrift#L890)
 struct injected. From there you can access `serverInfo.getClusterName()`.


- Joshua


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


On March 31, 2016, 7:52 p.m., Zhitao Li wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45177/
> ---
> 
> (Updated March 31, 2016, 7:52 p.m.)
> 
> 
> Review request for Aurora, Kunal Thakar and Stephan Erb.
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> This allows alternative service discovery methodologies to find tasks from 
> Aurora (e.g. mesos-dns), especially the dynamic port mapping.
> 
> 
> Diffs
> -
> 
>   RELEASE-NOTES.md 34f28a165aae4ae24fa95ef19b4972e088fd63a0 
>   examples/vagrant/upstart/aurora-scheduler.conf 
> 120b89a1dc10a259940cb9527eb2517f19d04471 
>   
> src/main/java/org/apache/aurora/scheduler/configuration/executor/ExecutorModule.java
>  949c299bdbc54f976db994266fb97f3099256f13 
>   
> src/main/java/org/apache/aurora/scheduler/configuration/executor/ExecutorSettings.java
>  7beea81a1e97f3f2fce215ff3e364919c3aebf6d 
>   src/main/java/org/apache/aurora/scheduler/mesos/MesosTaskFactory.java 
> 20cbd419dcb988f2c7ba72c8acbe6fee90d02248 
>   src/main/java/org/apache/aurora/scheduler/mesos/TestExecutorSettings.java 
> 16fa2d35cdf7ecdf82dd1ec7739e685ec1ff1aa2 
>   
> src/test/java/org/apache/aurora/scheduler/mesos/MesosTaskFactoryImplTest.java 
> 5103bd0f43d53079976b0f1596e299f2d91aa860 
> 
> Diff: https://reviews.apache.org/r/45177/diff/
> 
> 
> Testing
> ---
> 
> 1. Added unit test;
> 2. Use the vagrant environment to start the example in http_example.aurora, 
> and observe the following in master's state.json:
> 
> ```
> curl 192.168.33.7:5050/state | jq . | less
> 
> "tasks": [
> {
> "discovery": {
> "environment": "test",
> "name": "vagrant.test.http_example.1",
> "ports": {
> "ports": [
> {
> "name": "http",
> "number": 31648
> }
> ]
> },
> "visibility": "CLUSTER"
> },
> "executor_id": 
> "thermos-vagrant-test-http_example-1-69c3908a-e8cd-44a7-a824-dd87ef5920f0",
> "framework_id": "770e194c-6366-41f2-8a2d-e2c616aa9490-",
> "id": "vagrant-test-http_example-1-69c3908a-e8cd-44a7-a824-dd87ef5920f0",
> "name": "vagrant/test/http_example",
> "resources": {
> "cpus": 0.4,
> "disk": 64,
> "mem": 32,
> "ports": "[31648-31648]"
> },
> ...
> 
> ```
> 
> 
> Thanks,
> 
> Zhitao Li
> 
>



Re: Review Request 45177: Setting DiscoveryInfo.

2016-03-31 Thread Zhitao Li


> On March 31, 2016, 8:25 p.m., Joshua Cohen wrote:
> > RELEASE-NOTES.md, line 14
> > 
> >
> > Is there any reason we need a command line arg to control this? Is 
> > there any detriment to just always populating `DiscoveryInfo`?

The only possible concern I have for now is that this would 1) generate more 
data to Mesos and master/slave might have higher memory pressure, and 2) Mesos 
endpoints like /state.json might be slower.

Giving operator a flag to control this would allow people to test it out.

Unfortunately, I don't have a large Aurora cluster running so I can't really 
quantifiy it's impact right now.


> On March 31, 2016, 8:25 p.m., Joshua Cohen wrote:
> > src/main/java/org/apache/aurora/scheduler/mesos/MesosTaskFactory.java, line 
> > 242
> > 
> >
> > Can you also set DiscoveryInfo.location to the cluster name? From the 
> > docs on DiscoveryInfo in 
> > [mesos.proto](https://github.com/apache/mesos/blob/master/include/mesos/mesos.proto#L1831-L1836):
> > 
> > the location field may receive values like 
> > EAST-US/WEST-US/EUROPE/AMEA
> > 
> > This seems well aligned with our cluster?

Yeah I wanted to do this. Do you know how to get that information inside Aurora 
scheduler process?


- Zhitao


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


On March 31, 2016, 7:52 p.m., Zhitao Li wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45177/
> ---
> 
> (Updated March 31, 2016, 7:52 p.m.)
> 
> 
> Review request for Aurora, Kunal Thakar and Stephan Erb.
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> This allows alternative service discovery methodologies to find tasks from 
> Aurora (e.g. mesos-dns), especially the dynamic port mapping.
> 
> 
> Diffs
> -
> 
>   RELEASE-NOTES.md 34f28a165aae4ae24fa95ef19b4972e088fd63a0 
>   examples/vagrant/upstart/aurora-scheduler.conf 
> 120b89a1dc10a259940cb9527eb2517f19d04471 
>   
> src/main/java/org/apache/aurora/scheduler/configuration/executor/ExecutorModule.java
>  949c299bdbc54f976db994266fb97f3099256f13 
>   
> src/main/java/org/apache/aurora/scheduler/configuration/executor/ExecutorSettings.java
>  7beea81a1e97f3f2fce215ff3e364919c3aebf6d 
>   src/main/java/org/apache/aurora/scheduler/mesos/MesosTaskFactory.java 
> 20cbd419dcb988f2c7ba72c8acbe6fee90d02248 
>   src/main/java/org/apache/aurora/scheduler/mesos/TestExecutorSettings.java 
> 16fa2d35cdf7ecdf82dd1ec7739e685ec1ff1aa2 
>   
> src/test/java/org/apache/aurora/scheduler/mesos/MesosTaskFactoryImplTest.java 
> 5103bd0f43d53079976b0f1596e299f2d91aa860 
> 
> Diff: https://reviews.apache.org/r/45177/diff/
> 
> 
> Testing
> ---
> 
> 1. Added unit test;
> 2. Use the vagrant environment to start the example in http_example.aurora, 
> and observe the following in master's state.json:
> 
> ```
> curl 192.168.33.7:5050/state | jq . | less
> 
> "tasks": [
> {
> "discovery": {
> "environment": "test",
> "name": "vagrant.test.http_example.1",
> "ports": {
> "ports": [
> {
> "name": "http",
> "number": 31648
> }
> ]
> },
> "visibility": "CLUSTER"
> },
> "executor_id": 
> "thermos-vagrant-test-http_example-1-69c3908a-e8cd-44a7-a824-dd87ef5920f0",
> "framework_id": "770e194c-6366-41f2-8a2d-e2c616aa9490-",
> "id": "vagrant-test-http_example-1-69c3908a-e8cd-44a7-a824-dd87ef5920f0",
> "name": "vagrant/test/http_example",
> "resources": {
> "cpus": 0.4,
> "disk": 64,
> "mem": 32,
> "ports": "[31648-31648]"
> },
> ...
> 
> ```
> 
> 
> Thanks,
> 
> Zhitao Li
> 
>



Re: Review Request 45177: Setting DiscoveryInfo.

2016-03-31 Thread Joshua Cohen

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




RELEASE-NOTES.md (line 14)


Is there any reason we need a command line arg to control this? Is there 
any detriment to just always populating `DiscoveryInfo`?



src/main/java/org/apache/aurora/scheduler/mesos/MesosTaskFactory.java (line 242)


Can you also set DiscoveryInfo.location to the cluster name? From the docs 
on DiscoveryInfo in 
[mesos.proto](https://github.com/apache/mesos/blob/master/include/mesos/mesos.proto#L1831-L1836):

the location field may receive values like EAST-US/WEST-US/EUROPE/AMEA

This seems well aligned with our cluster?


- Joshua Cohen


On March 31, 2016, 7:52 p.m., Zhitao Li wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45177/
> ---
> 
> (Updated March 31, 2016, 7:52 p.m.)
> 
> 
> Review request for Aurora, Kunal Thakar and Stephan Erb.
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> This allows alternative service discovery methodologies to find tasks from 
> Aurora (e.g. mesos-dns), especially the dynamic port mapping.
> 
> 
> Diffs
> -
> 
>   RELEASE-NOTES.md 34f28a165aae4ae24fa95ef19b4972e088fd63a0 
>   examples/vagrant/upstart/aurora-scheduler.conf 
> 120b89a1dc10a259940cb9527eb2517f19d04471 
>   
> src/main/java/org/apache/aurora/scheduler/configuration/executor/ExecutorModule.java
>  949c299bdbc54f976db994266fb97f3099256f13 
>   
> src/main/java/org/apache/aurora/scheduler/configuration/executor/ExecutorSettings.java
>  7beea81a1e97f3f2fce215ff3e364919c3aebf6d 
>   src/main/java/org/apache/aurora/scheduler/mesos/MesosTaskFactory.java 
> 20cbd419dcb988f2c7ba72c8acbe6fee90d02248 
>   src/main/java/org/apache/aurora/scheduler/mesos/TestExecutorSettings.java 
> 16fa2d35cdf7ecdf82dd1ec7739e685ec1ff1aa2 
>   
> src/test/java/org/apache/aurora/scheduler/mesos/MesosTaskFactoryImplTest.java 
> 5103bd0f43d53079976b0f1596e299f2d91aa860 
> 
> Diff: https://reviews.apache.org/r/45177/diff/
> 
> 
> Testing
> ---
> 
> 1. Added unit test;
> 2. Use the vagrant environment to start the example in http_example.aurora, 
> and observe the following in master's state.json:
> 
> ```
> curl 192.168.33.7:5050/state | jq . | less
> 
> "tasks": [
> {
> "discovery": {
> "environment": "test",
> "name": "vagrant.test.http_example.1",
> "ports": {
> "ports": [
> {
> "name": "http",
> "number": 31648
> }
> ]
> },
> "visibility": "CLUSTER"
> },
> "executor_id": 
> "thermos-vagrant-test-http_example-1-69c3908a-e8cd-44a7-a824-dd87ef5920f0",
> "framework_id": "770e194c-6366-41f2-8a2d-e2c616aa9490-",
> "id": "vagrant-test-http_example-1-69c3908a-e8cd-44a7-a824-dd87ef5920f0",
> "name": "vagrant/test/http_example",
> "resources": {
> "cpus": 0.4,
> "disk": 64,
> "mem": 32,
> "ports": "[31648-31648]"
> },
> ...
> 
> ```
> 
> 
> Thanks,
> 
> Zhitao Li
> 
>



Re: Review Request 45177: Setting DiscoveryInfo.

2016-03-31 Thread Zhitao Li

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

(Updated March 31, 2016, 7:51 p.m.)


Review request for Aurora.


Changes
---

Unit test and command line flag switch.


Summary (updated)
-

Setting DiscoveryInfo.


Repository: aurora


Description (updated)
---

This allows alternative service discovery methodologies to find tasks from 
Aurora (e.g. mesos-dns), especially the dynamic port mapping.


Diffs (updated)
-

  RELEASE-NOTES.md 34f28a165aae4ae24fa95ef19b4972e088fd63a0 
  examples/vagrant/upstart/aurora-scheduler.conf 
120b89a1dc10a259940cb9527eb2517f19d04471 
  
src/main/java/org/apache/aurora/scheduler/configuration/executor/ExecutorModule.java
 949c299bdbc54f976db994266fb97f3099256f13 
  
src/main/java/org/apache/aurora/scheduler/configuration/executor/ExecutorSettings.java
 7beea81a1e97f3f2fce215ff3e364919c3aebf6d 
  src/main/java/org/apache/aurora/scheduler/mesos/MesosTaskFactory.java 
20cbd419dcb988f2c7ba72c8acbe6fee90d02248 
  src/main/java/org/apache/aurora/scheduler/mesos/TestExecutorSettings.java 
16fa2d35cdf7ecdf82dd1ec7739e685ec1ff1aa2 
  src/test/java/org/apache/aurora/scheduler/mesos/MesosTaskFactoryImplTest.java 
5103bd0f43d53079976b0f1596e299f2d91aa860 

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


Testing (updated)
---

1. Added unit test;
2. Use the vagrant environment to start the example in http_example.aurora, and 
observe the following in master's state.json:

```
curl 192.168.33.7:5050/state | jq . | less

"tasks": [
{
"discovery": {
"environment": "test",
"name": "vagrant.test.http_example.1",
"ports": {
"ports": [
{
"name": "http",
"number": 31648
}
]
},
"visibility": "CLUSTER"
},
"executor_id": 
"thermos-vagrant-test-http_example-1-69c3908a-e8cd-44a7-a824-dd87ef5920f0",
"framework_id": "770e194c-6366-41f2-8a2d-e2c616aa9490-",
"id": "vagrant-test-http_example-1-69c3908a-e8cd-44a7-a824-dd87ef5920f0",
"name": "vagrant/test/http_example",
"resources": {
"cpus": 0.4,
"disk": 64,
"mem": 32,
"ports": "[31648-31648]"
},
...

```


Thanks,

Zhitao Li