You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@aurora.apache.org by Stephan Erb <se...@apache.org> on 2016/04/01 14:05:12 UTC

Re: Review Request 45177: Setting DiscoveryInfo.

-----------------------------------------------------------
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)
<https://reviews.apache.org/r/45177/#comment189597>

    Should we consider using the inverse notation here? This would be `<instance id>.<jobname>.<environment>.<role>` instead of `<role>.<environment>.<jobname>.<instance id>`? @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-0000",
> "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.

Posted by Zhitao Li <zh...@gmail.com>.

> On April 1, 2016, 12:05 p.m., Stephan Erb wrote:
> > src/main/java/org/apache/aurora/scheduler/mesos/MesosTaskFactory.java, line 242
> > <https://reviews.apache.org/r/45177/diff/3/?file=1321463#file1321463line242>
> >
> >     Should we consider using the inverse notation here? This would be `<instance id>.<jobname>.<environment>.<role>` instead of `<role>.<environment>.<jobname>.<instance id>`? @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.

`<instance id>` 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-0000",
> "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.

Posted by Zhitao Li <zh...@gmail.com>.

> On April 1, 2016, 12:05 p.m., Stephan Erb wrote:
> > src/main/java/org/apache/aurora/scheduler/mesos/MesosTaskFactory.java, line 242
> > <https://reviews.apache.org/r/45177/diff/3/?file=1321463#file1321463line242>
> >
> >     Should we consider using the inverse notation here? This would be `<instance id>.<jobname>.<environment>.<role>` instead of `<role>.<environment>.<jobname>.<instance id>`? @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.
>     
>     `<instance id>` 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-0000",
> "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
> 
>