Re: Review Request 57708: Populate `host` and `webURL`fields of FrameworkInfo.

2017-03-17 Thread Mehrdad Nurolahzade


> On March 17, 2017, 5:01 p.m., Mehrdad Nurolahzade wrote:
> > src/main/java/org/apache/aurora/scheduler/app/SchedulerMain.java
> > Line 85 (original), 87 (patched)
> > 
> >
> > Needs to be mentioned in release notes.

Scratch the above comment.
This was not added with this patch.


- Mehrdad


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


On March 17, 2017, 4:36 p.m., Zameer Manji wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/57708/
> ---
> 
> (Updated March 17, 2017, 4:36 p.m.)
> 
> 
> Review request for Aurora, Mehrdad Nurolahzade and Stephan Erb.
> 
> 
> Bugs: AURORA-1905
> https://issues.apache.org/jira/browse/AURORA-1905
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> This patch extracts out `FrameworkInfo` construction from the 
> `DriverSettings` data class to a factory class. This factory class combines 
> the base info constructed via CLI arguments with the HTTP server's host and 
> port information. This allows us to populate the `host` and `weburl` fields 
> of framework info, which enhance the Mesos UI.
> 
> This is necessary for users of the `V1_DRIVER` as the new driver does not 
> automatically populate the `host` field. Further, by using our own host and 
> port information, we ensure the information in ZooKeeper, the information 
> used for HTTP redirects and the information in the Mesos UI are all in sync.
> 
> Note that in vagrant, the hostname and URL are `aurora.local` because we set 
> the `--hostname` argument of the scheduler. By default Java will set it to 
> the FQDN or IP address of the host.
> 
> 
> Diffs
> -
> 
>   src/jmh/java/org/apache/aurora/benchmark/StatusUpdateBenchmark.java 
> 95496c1520413269ecb6237427720cc78f176a2d 
>   src/main/java/org/apache/aurora/scheduler/app/SchedulerMain.java 
> 3665c4d45f1dd29b4f5c8d3bcaed4b0bf3225f69 
>   
> src/main/java/org/apache/aurora/scheduler/mesos/CommandLineDriverSettingsModule.java
>  ad6110a7d42ef37023a362e6da4ce35977a5ff69 
>   src/main/java/org/apache/aurora/scheduler/mesos/DriverSettings.java 
> f477404268f96e60dba21d58e90127dcaa0122aa 
>   src/main/java/org/apache/aurora/scheduler/mesos/FrameworkInfoFactory.java 
> PRE-CREATION 
>   src/main/java/org/apache/aurora/scheduler/mesos/SchedulerDriverService.java 
> f65a29d7ad8bc49784e324e674f30a6728a9d4ae 
>   
> src/main/java/org/apache/aurora/scheduler/mesos/VersionedMesosSchedulerImpl.java
>  84e3f47636d95521600e9a4c4d5b8bc8bbbff8cf 
>   
> src/main/java/org/apache/aurora/scheduler/mesos/VersionedSchedulerDriverService.java
>  d928d02cab087991a8cd8896d4366f6e5dca0913 
>   src/test/java/org/apache/aurora/scheduler/app/SchedulerIT.java 
> f5799751489a2773d116375ee17ca9e24fc3b134 
>   src/test/java/org/apache/aurora/scheduler/app/local/LocalSchedulerMain.java 
> 7151b81ce23973437aca96d92be7e99948172fb6 
>   
> src/test/java/org/apache/aurora/scheduler/mesos/FrameworkInfoFactoryImplTest.java
>  PRE-CREATION 
>   
> src/test/java/org/apache/aurora/scheduler/mesos/SchedulerDriverServiceTest.java
>  38e913570dce06359ab2fcc56778073c3ba17277 
>   
> src/test/java/org/apache/aurora/scheduler/mesos/VersionedMesosSchedulerImplTest.java
>  988ec501e62c0cf65114f4ee4d10cbc0bc85c2d7 
>   
> src/test/java/org/apache/aurora/scheduler/mesos/VersionedSchedulerDriverServiceTest.java
>  72aede85829f087bc88760e8b564d25aceb8aed8 
>   src/test/java/org/apache/aurora/scheduler/thrift/ThriftIT.java 
> 14218213bc92fe8c6f981003996c70ebb9370902 
> 
> 
> Diff: https://reviews.apache.org/r/57708/diff/3/
> 
> 
> Testing
> ---
> 
> e2e tests.
> 
> 
> File Attachments
> 
> 
> Screenshot
>   
> https://reviews.apache.org/media/uploaded/files/2017/03/16/1e989156-ea88-4e63-be72-bcca1e45b24e__Screen_Shot_2017-03-16_at_3.41.04_PM.png
> 
> 
> Thanks,
> 
> Zameer Manji
> 
>



Re: Review Request 57708: Populate `host` and `webURL`fields of FrameworkInfo.

2017-03-17 Thread Mehrdad Nurolahzade

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


Ship it!




Ship It!


src/main/java/org/apache/aurora/scheduler/app/SchedulerMain.java
Line 85 (original), 87 (patched)


Needs to be mentioned in release notes.


- Mehrdad Nurolahzade


On March 17, 2017, 4:36 p.m., Zameer Manji wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/57708/
> ---
> 
> (Updated March 17, 2017, 4:36 p.m.)
> 
> 
> Review request for Aurora, Mehrdad Nurolahzade and Stephan Erb.
> 
> 
> Bugs: AURORA-1905
> https://issues.apache.org/jira/browse/AURORA-1905
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> This patch extracts out `FrameworkInfo` construction from the 
> `DriverSettings` data class to a factory class. This factory class combines 
> the base info constructed via CLI arguments with the HTTP server's host and 
> port information. This allows us to populate the `host` and `weburl` fields 
> of framework info, which enhance the Mesos UI.
> 
> This is necessary for users of the `V1_DRIVER` as the new driver does not 
> automatically populate the `host` field. Further, by using our own host and 
> port information, we ensure the information in ZooKeeper, the information 
> used for HTTP redirects and the information in the Mesos UI are all in sync.
> 
> Note that in vagrant, the hostname and URL are `aurora.local` because we set 
> the `--hostname` argument of the scheduler. By default Java will set it to 
> the FQDN or IP address of the host.
> 
> 
> Diffs
> -
> 
>   src/jmh/java/org/apache/aurora/benchmark/StatusUpdateBenchmark.java 
> 95496c1520413269ecb6237427720cc78f176a2d 
>   src/main/java/org/apache/aurora/scheduler/app/SchedulerMain.java 
> 3665c4d45f1dd29b4f5c8d3bcaed4b0bf3225f69 
>   
> src/main/java/org/apache/aurora/scheduler/mesos/CommandLineDriverSettingsModule.java
>  ad6110a7d42ef37023a362e6da4ce35977a5ff69 
>   src/main/java/org/apache/aurora/scheduler/mesos/DriverSettings.java 
> f477404268f96e60dba21d58e90127dcaa0122aa 
>   src/main/java/org/apache/aurora/scheduler/mesos/FrameworkInfoFactory.java 
> PRE-CREATION 
>   src/main/java/org/apache/aurora/scheduler/mesos/SchedulerDriverService.java 
> f65a29d7ad8bc49784e324e674f30a6728a9d4ae 
>   
> src/main/java/org/apache/aurora/scheduler/mesos/VersionedMesosSchedulerImpl.java
>  84e3f47636d95521600e9a4c4d5b8bc8bbbff8cf 
>   
> src/main/java/org/apache/aurora/scheduler/mesos/VersionedSchedulerDriverService.java
>  d928d02cab087991a8cd8896d4366f6e5dca0913 
>   src/test/java/org/apache/aurora/scheduler/app/SchedulerIT.java 
> f5799751489a2773d116375ee17ca9e24fc3b134 
>   src/test/java/org/apache/aurora/scheduler/app/local/LocalSchedulerMain.java 
> 7151b81ce23973437aca96d92be7e99948172fb6 
>   
> src/test/java/org/apache/aurora/scheduler/mesos/FrameworkInfoFactoryImplTest.java
>  PRE-CREATION 
>   
> src/test/java/org/apache/aurora/scheduler/mesos/SchedulerDriverServiceTest.java
>  38e913570dce06359ab2fcc56778073c3ba17277 
>   
> src/test/java/org/apache/aurora/scheduler/mesos/VersionedMesosSchedulerImplTest.java
>  988ec501e62c0cf65114f4ee4d10cbc0bc85c2d7 
>   
> src/test/java/org/apache/aurora/scheduler/mesos/VersionedSchedulerDriverServiceTest.java
>  72aede85829f087bc88760e8b564d25aceb8aed8 
>   src/test/java/org/apache/aurora/scheduler/thrift/ThriftIT.java 
> 14218213bc92fe8c6f981003996c70ebb9370902 
> 
> 
> Diff: https://reviews.apache.org/r/57708/diff/3/
> 
> 
> Testing
> ---
> 
> e2e tests.
> 
> 
> File Attachments
> 
> 
> Screenshot
>   
> https://reviews.apache.org/media/uploaded/files/2017/03/16/1e989156-ea88-4e63-be72-bcca1e45b24e__Screen_Shot_2017-03-16_at_3.41.04_PM.png
> 
> 
> Thanks,
> 
> Zameer Manji
> 
>



Re: Review Request 57708: Populate `host` and `webURL`fields of FrameworkInfo.

2017-03-17 Thread Aurora ReviewBot

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


Ship it!




Master (e1504a7) 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 March 17, 2017, 11:36 p.m., Zameer Manji wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/57708/
> ---
> 
> (Updated March 17, 2017, 11:36 p.m.)
> 
> 
> Review request for Aurora, Mehrdad Nurolahzade and Stephan Erb.
> 
> 
> Bugs: AURORA-1905
> https://issues.apache.org/jira/browse/AURORA-1905
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> This patch extracts out `FrameworkInfo` construction from the 
> `DriverSettings` data class to a factory class. This factory class combines 
> the base info constructed via CLI arguments with the HTTP server's host and 
> port information. This allows us to populate the `host` and `weburl` fields 
> of framework info, which enhance the Mesos UI.
> 
> This is necessary for users of the `V1_DRIVER` as the new driver does not 
> automatically populate the `host` field. Further, by using our own host and 
> port information, we ensure the information in ZooKeeper, the information 
> used for HTTP redirects and the information in the Mesos UI are all in sync.
> 
> Note that in vagrant, the hostname and URL are `aurora.local` because we set 
> the `--hostname` argument of the scheduler. By default Java will set it to 
> the FQDN or IP address of the host.
> 
> 
> Diffs
> -
> 
>   src/jmh/java/org/apache/aurora/benchmark/StatusUpdateBenchmark.java 
> 95496c1520413269ecb6237427720cc78f176a2d 
>   src/main/java/org/apache/aurora/scheduler/app/SchedulerMain.java 
> 3665c4d45f1dd29b4f5c8d3bcaed4b0bf3225f69 
>   
> src/main/java/org/apache/aurora/scheduler/mesos/CommandLineDriverSettingsModule.java
>  ad6110a7d42ef37023a362e6da4ce35977a5ff69 
>   src/main/java/org/apache/aurora/scheduler/mesos/DriverSettings.java 
> f477404268f96e60dba21d58e90127dcaa0122aa 
>   src/main/java/org/apache/aurora/scheduler/mesos/FrameworkInfoFactory.java 
> PRE-CREATION 
>   src/main/java/org/apache/aurora/scheduler/mesos/SchedulerDriverService.java 
> f65a29d7ad8bc49784e324e674f30a6728a9d4ae 
>   
> src/main/java/org/apache/aurora/scheduler/mesos/VersionedMesosSchedulerImpl.java
>  84e3f47636d95521600e9a4c4d5b8bc8bbbff8cf 
>   
> src/main/java/org/apache/aurora/scheduler/mesos/VersionedSchedulerDriverService.java
>  d928d02cab087991a8cd8896d4366f6e5dca0913 
>   src/test/java/org/apache/aurora/scheduler/app/SchedulerIT.java 
> f5799751489a2773d116375ee17ca9e24fc3b134 
>   src/test/java/org/apache/aurora/scheduler/app/local/LocalSchedulerMain.java 
> 7151b81ce23973437aca96d92be7e99948172fb6 
>   
> src/test/java/org/apache/aurora/scheduler/mesos/FrameworkInfoFactoryImplTest.java
>  PRE-CREATION 
>   
> src/test/java/org/apache/aurora/scheduler/mesos/SchedulerDriverServiceTest.java
>  38e913570dce06359ab2fcc56778073c3ba17277 
>   
> src/test/java/org/apache/aurora/scheduler/mesos/VersionedMesosSchedulerImplTest.java
>  988ec501e62c0cf65114f4ee4d10cbc0bc85c2d7 
>   
> src/test/java/org/apache/aurora/scheduler/mesos/VersionedSchedulerDriverServiceTest.java
>  72aede85829f087bc88760e8b564d25aceb8aed8 
>   src/test/java/org/apache/aurora/scheduler/thrift/ThriftIT.java 
> 14218213bc92fe8c6f981003996c70ebb9370902 
> 
> 
> Diff: https://reviews.apache.org/r/57708/diff/3/
> 
> 
> Testing
> ---
> 
> e2e tests.
> 
> 
> File Attachments
> 
> 
> Screenshot
>   
> https://reviews.apache.org/media/uploaded/files/2017/03/16/1e989156-ea88-4e63-be72-bcca1e45b24e__Screen_Shot_2017-03-16_at_3.41.04_PM.png
> 
> 
> Thanks,
> 
> Zameer Manji
> 
>



Re: Review Request 57708: Populate `host` and `webURL`fields of FrameworkInfo.

2017-03-17 Thread Zameer Manji

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

(Updated March 17, 2017, 4:36 p.m.)


Review request for Aurora, Mehrdad Nurolahzade and Stephan Erb.


Changes
---

Fix style issues.


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


Repository: aurora


Description
---

This patch extracts out `FrameworkInfo` construction from the `DriverSettings` 
data class to a factory class. This factory class combines the base info 
constructed via CLI arguments with the HTTP server's host and port information. 
This allows us to populate the `host` and `weburl` fields of framework info, 
which enhance the Mesos UI.

This is necessary for users of the `V1_DRIVER` as the new driver does not 
automatically populate the `host` field. Further, by using our own host and 
port information, we ensure the information in ZooKeeper, the information used 
for HTTP redirects and the information in the Mesos UI are all in sync.

Note that in vagrant, the hostname and URL are `aurora.local` because we set 
the `--hostname` argument of the scheduler. By default Java will set it to the 
FQDN or IP address of the host.


Diffs (updated)
-

  src/jmh/java/org/apache/aurora/benchmark/StatusUpdateBenchmark.java 
95496c1520413269ecb6237427720cc78f176a2d 
  src/main/java/org/apache/aurora/scheduler/app/SchedulerMain.java 
3665c4d45f1dd29b4f5c8d3bcaed4b0bf3225f69 
  
src/main/java/org/apache/aurora/scheduler/mesos/CommandLineDriverSettingsModule.java
 ad6110a7d42ef37023a362e6da4ce35977a5ff69 
  src/main/java/org/apache/aurora/scheduler/mesos/DriverSettings.java 
f477404268f96e60dba21d58e90127dcaa0122aa 
  src/main/java/org/apache/aurora/scheduler/mesos/FrameworkInfoFactory.java 
PRE-CREATION 
  src/main/java/org/apache/aurora/scheduler/mesos/SchedulerDriverService.java 
f65a29d7ad8bc49784e324e674f30a6728a9d4ae 
  
src/main/java/org/apache/aurora/scheduler/mesos/VersionedMesosSchedulerImpl.java
 84e3f47636d95521600e9a4c4d5b8bc8bbbff8cf 
  
src/main/java/org/apache/aurora/scheduler/mesos/VersionedSchedulerDriverService.java
 d928d02cab087991a8cd8896d4366f6e5dca0913 
  src/test/java/org/apache/aurora/scheduler/app/SchedulerIT.java 
f5799751489a2773d116375ee17ca9e24fc3b134 
  src/test/java/org/apache/aurora/scheduler/app/local/LocalSchedulerMain.java 
7151b81ce23973437aca96d92be7e99948172fb6 
  
src/test/java/org/apache/aurora/scheduler/mesos/FrameworkInfoFactoryImplTest.java
 PRE-CREATION 
  
src/test/java/org/apache/aurora/scheduler/mesos/SchedulerDriverServiceTest.java 
38e913570dce06359ab2fcc56778073c3ba17277 
  
src/test/java/org/apache/aurora/scheduler/mesos/VersionedMesosSchedulerImplTest.java
 988ec501e62c0cf65114f4ee4d10cbc0bc85c2d7 
  
src/test/java/org/apache/aurora/scheduler/mesos/VersionedSchedulerDriverServiceTest.java
 72aede85829f087bc88760e8b564d25aceb8aed8 
  src/test/java/org/apache/aurora/scheduler/thrift/ThriftIT.java 
14218213bc92fe8c6f981003996c70ebb9370902 


Diff: https://reviews.apache.org/r/57708/diff/3/

Changes: https://reviews.apache.org/r/57708/diff/2-3/


Testing
---

e2e tests.


File Attachments


Screenshot
  
https://reviews.apache.org/media/uploaded/files/2017/03/16/1e989156-ea88-4e63-be72-bcca1e45b24e__Screen_Shot_2017-03-16_at_3.41.04_PM.png


Thanks,

Zameer Manji



Re: Review Request 57708: Populate `host` and `webURL`fields of FrameworkInfo.

2017-03-17 Thread Aurora ReviewBot

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



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

: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] [ERROR] 
/home/jenkins/jenkins-slave/workspace/AuroraBot/src/main/java/org/apache/aurora/scheduler/app/SchedulerMain.java:119:
 Line is longer than 100 characters (found 106). [LineLength]
[ant:checkstyle] [ERROR] 
/home/jenkins/jenkins-slave/workspace/AuroraBot/src/main/java/org/apache/aurora/scheduler/http/JettyServerModule.java:24:8:
 Unused import - javax.annotation.OverridingMethodsMustInvokeSuper. 
[UnusedImports]
[ant:checkstyle] [ERROR] 
/home/jenkins/jenkins-slave/workspace/AuroraBot/src/main/java/org/apache/aurora/scheduler/http/JettyServerModule.java:68:8:
 Unused import - org.apache.aurora.scheduler.app.SchedulerMain. [UnusedImports]
[ant:checkstyle] [ERROR] 
/home/jenkins/jenkins-slave/workspace/AuroraBot/src/main/java/org/apache/aurora/scheduler/mesos/FrameworkInfoFactory.java:50:
 First sentence should end with a period. [JavadocStyle]
[ant:checkstyle] [ERROR] 
/home/jenkins/jenkins-slave/workspace/AuroraBot/src/main/java/org/apache/aurora/scheduler/mesos/FrameworkInfoFactory.java:55:
 File contains a sequence of empty lines. [RegexpMultiline]
 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: 1 mins 18.951 secs


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

- Aurora ReviewBot


On March 17, 2017, 3:42 p.m., Zameer Manji wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/57708/
> ---
> 
> (Updated March 17, 2017, 3:42 p.m.)
> 
> 
> Review request for Aurora, Mehrdad Nurolahzade and Stephan Erb.
> 
> 
> Bugs: AURORA-1905
> https://issues.apache.org/jira/browse/AURORA-1905
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> This patch extracts out `FrameworkInfo` construction from the 
> `DriverSettings` data class to a factory class. This factory class combines 
> the base info constructed via CLI arguments with the HTTP server's host and 
> port information. This allows us to populate the `host` and `weburl` fields 
> of framework info, which enhance the Mesos UI.
> 
> This is necessary for users of the `V1_DRIVER` as the new driver does not 
> automatically populate the `host` field. Further, by using our own host and 
> port information, we ensure the information in ZooKeeper, the information 
> used for HTTP redirects and the information in the Mesos UI are all in sync.
> 
> Note that in vagrant, the hostname and URL are `aurora.local` because we set 
> the `--hostname` argument of the scheduler. By default Java will set it to 
> the FQDN or IP address of the host.
> 
> 
> Diffs
> -
> 
>   src/jmh/java/org/apache/aurora/benchmark/StatusUpdateBenchmark.java 
> 95496c1520413269ecb6237427720cc78f176a2d 
>   src/main/java/org/apache/aurora/scheduler/app/SchedulerMain.java 
> 3665c4d45f1dd29b4f5c8d3bcaed4b0bf3225f69 
>   src/main/java/org/apache/aurora/scheduler/http/JettyServerModule.java 
> 53ebc0b60e60a8e1800f9e8b4ddc292bb44b4330 
>   
> src/main/java/org/apache/aurora/scheduler/mesos/CommandLineDriverSettingsModule.java
>  ad6110a7d42ef37023a362e6da4ce35977a5ff69 
>   src/main/java/org/apache/aurora/scheduler/mesos/DriverSettings.java 
> f477404268f96e60dba21d58e90127dcaa0122aa 
>   

Re: Review Request 57708: Populate `host` and `webURL`fields of FrameworkInfo.

2017-03-17 Thread Zameer Manji


> On March 17, 2017, 8:02 a.m., Stephan Erb wrote:
> > src/main/java/org/apache/aurora/scheduler/mesos/FrameworkInfoFactory.java
> > Lines 64 (patched)
> > 
> >
> > Aurora can run behind an HTTPS capable reverse proxy. In that case it 
> > might only be reachable via `https` and not via `http`. I have recently 
> > added `serverset_endpoint_name` to allow to change the name of the node 
> > written into ZK, so that the Aurora client will establish an SSL connection 
> > if needed (client code was already in place). 
> > 
> > We should leverage `serverset_endpoint_name` to write `https://` into 
> > the framework URL rather than `http://` here as well. The only disadvantage 
> > is that this could break assumptions, as `serverset_endpoint_name` 
> > indicates I can put everything in there.

Done.


- Zameer


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


On March 17, 2017, 3:42 p.m., Zameer Manji wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/57708/
> ---
> 
> (Updated March 17, 2017, 3:42 p.m.)
> 
> 
> Review request for Aurora, Mehrdad Nurolahzade and Stephan Erb.
> 
> 
> Bugs: AURORA-1905
> https://issues.apache.org/jira/browse/AURORA-1905
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> This patch extracts out `FrameworkInfo` construction from the 
> `DriverSettings` data class to a factory class. This factory class combines 
> the base info constructed via CLI arguments with the HTTP server's host and 
> port information. This allows us to populate the `host` and `weburl` fields 
> of framework info, which enhance the Mesos UI.
> 
> This is necessary for users of the `V1_DRIVER` as the new driver does not 
> automatically populate the `host` field. Further, by using our own host and 
> port information, we ensure the information in ZooKeeper, the information 
> used for HTTP redirects and the information in the Mesos UI are all in sync.
> 
> Note that in vagrant, the hostname and URL are `aurora.local` because we set 
> the `--hostname` argument of the scheduler. By default Java will set it to 
> the FQDN or IP address of the host.
> 
> 
> Diffs
> -
> 
>   src/jmh/java/org/apache/aurora/benchmark/StatusUpdateBenchmark.java 
> 95496c1520413269ecb6237427720cc78f176a2d 
>   src/main/java/org/apache/aurora/scheduler/app/SchedulerMain.java 
> 3665c4d45f1dd29b4f5c8d3bcaed4b0bf3225f69 
>   src/main/java/org/apache/aurora/scheduler/http/JettyServerModule.java 
> 53ebc0b60e60a8e1800f9e8b4ddc292bb44b4330 
>   
> src/main/java/org/apache/aurora/scheduler/mesos/CommandLineDriverSettingsModule.java
>  ad6110a7d42ef37023a362e6da4ce35977a5ff69 
>   src/main/java/org/apache/aurora/scheduler/mesos/DriverSettings.java 
> f477404268f96e60dba21d58e90127dcaa0122aa 
>   src/main/java/org/apache/aurora/scheduler/mesos/FrameworkInfoFactory.java 
> PRE-CREATION 
>   src/main/java/org/apache/aurora/scheduler/mesos/SchedulerDriverService.java 
> f65a29d7ad8bc49784e324e674f30a6728a9d4ae 
>   
> src/main/java/org/apache/aurora/scheduler/mesos/VersionedMesosSchedulerImpl.java
>  84e3f47636d95521600e9a4c4d5b8bc8bbbff8cf 
>   
> src/main/java/org/apache/aurora/scheduler/mesos/VersionedSchedulerDriverService.java
>  d928d02cab087991a8cd8896d4366f6e5dca0913 
>   src/test/java/org/apache/aurora/scheduler/app/SchedulerIT.java 
> f5799751489a2773d116375ee17ca9e24fc3b134 
>   src/test/java/org/apache/aurora/scheduler/app/local/LocalSchedulerMain.java 
> 7151b81ce23973437aca96d92be7e99948172fb6 
>   
> src/test/java/org/apache/aurora/scheduler/mesos/FrameworkInfoFactoryImplTest.java
>  PRE-CREATION 
>   
> src/test/java/org/apache/aurora/scheduler/mesos/SchedulerDriverServiceTest.java
>  38e913570dce06359ab2fcc56778073c3ba17277 
>   
> src/test/java/org/apache/aurora/scheduler/mesos/VersionedMesosSchedulerImplTest.java
>  988ec501e62c0cf65114f4ee4d10cbc0bc85c2d7 
>   
> src/test/java/org/apache/aurora/scheduler/mesos/VersionedSchedulerDriverServiceTest.java
>  72aede85829f087bc88760e8b564d25aceb8aed8 
>   src/test/java/org/apache/aurora/scheduler/thrift/ThriftIT.java 
> 14218213bc92fe8c6f981003996c70ebb9370902 
> 
> 
> Diff: https://reviews.apache.org/r/57708/diff/2/
> 
> 
> Testing
> ---
> 
> e2e tests.
> 
> 
> File Attachments
> 
> 
> Screenshot
>   
> https://reviews.apache.org/media/uploaded/files/2017/03/16/1e989156-ea88-4e63-be72-bcca1e45b24e__Screen_Shot_2017-03-16_at_3.41.04_PM.png
> 
> 
> Thanks,
> 
> Zameer Manji
> 
>



Re: Review Request 57708: Populate `host` and `webURL`fields of FrameworkInfo.

2017-03-17 Thread Zameer Manji

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

(Updated March 17, 2017, 3:42 p.m.)


Review request for Aurora, Mehrdad Nurolahzade and Stephan Erb.


Changes
---

Feedback.


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


Repository: aurora


Description
---

This patch extracts out `FrameworkInfo` construction from the `DriverSettings` 
data class to a factory class. This factory class combines the base info 
constructed via CLI arguments with the HTTP server's host and port information. 
This allows us to populate the `host` and `weburl` fields of framework info, 
which enhance the Mesos UI.

This is necessary for users of the `V1_DRIVER` as the new driver does not 
automatically populate the `host` field. Further, by using our own host and 
port information, we ensure the information in ZooKeeper, the information used 
for HTTP redirects and the information in the Mesos UI are all in sync.

Note that in vagrant, the hostname and URL are `aurora.local` because we set 
the `--hostname` argument of the scheduler. By default Java will set it to the 
FQDN or IP address of the host.


Diffs (updated)
-

  src/jmh/java/org/apache/aurora/benchmark/StatusUpdateBenchmark.java 
95496c1520413269ecb6237427720cc78f176a2d 
  src/main/java/org/apache/aurora/scheduler/app/SchedulerMain.java 
3665c4d45f1dd29b4f5c8d3bcaed4b0bf3225f69 
  src/main/java/org/apache/aurora/scheduler/http/JettyServerModule.java 
53ebc0b60e60a8e1800f9e8b4ddc292bb44b4330 
  
src/main/java/org/apache/aurora/scheduler/mesos/CommandLineDriverSettingsModule.java
 ad6110a7d42ef37023a362e6da4ce35977a5ff69 
  src/main/java/org/apache/aurora/scheduler/mesos/DriverSettings.java 
f477404268f96e60dba21d58e90127dcaa0122aa 
  src/main/java/org/apache/aurora/scheduler/mesos/FrameworkInfoFactory.java 
PRE-CREATION 
  src/main/java/org/apache/aurora/scheduler/mesos/SchedulerDriverService.java 
f65a29d7ad8bc49784e324e674f30a6728a9d4ae 
  
src/main/java/org/apache/aurora/scheduler/mesos/VersionedMesosSchedulerImpl.java
 84e3f47636d95521600e9a4c4d5b8bc8bbbff8cf 
  
src/main/java/org/apache/aurora/scheduler/mesos/VersionedSchedulerDriverService.java
 d928d02cab087991a8cd8896d4366f6e5dca0913 
  src/test/java/org/apache/aurora/scheduler/app/SchedulerIT.java 
f5799751489a2773d116375ee17ca9e24fc3b134 
  src/test/java/org/apache/aurora/scheduler/app/local/LocalSchedulerMain.java 
7151b81ce23973437aca96d92be7e99948172fb6 
  
src/test/java/org/apache/aurora/scheduler/mesos/FrameworkInfoFactoryImplTest.java
 PRE-CREATION 
  
src/test/java/org/apache/aurora/scheduler/mesos/SchedulerDriverServiceTest.java 
38e913570dce06359ab2fcc56778073c3ba17277 
  
src/test/java/org/apache/aurora/scheduler/mesos/VersionedMesosSchedulerImplTest.java
 988ec501e62c0cf65114f4ee4d10cbc0bc85c2d7 
  
src/test/java/org/apache/aurora/scheduler/mesos/VersionedSchedulerDriverServiceTest.java
 72aede85829f087bc88760e8b564d25aceb8aed8 
  src/test/java/org/apache/aurora/scheduler/thrift/ThriftIT.java 
14218213bc92fe8c6f981003996c70ebb9370902 


Diff: https://reviews.apache.org/r/57708/diff/2/

Changes: https://reviews.apache.org/r/57708/diff/1-2/


Testing
---

e2e tests.


File Attachments


Screenshot
  
https://reviews.apache.org/media/uploaded/files/2017/03/16/1e989156-ea88-4e63-be72-bcca1e45b24e__Screen_Shot_2017-03-16_at_3.41.04_PM.png


Thanks,

Zameer Manji



Re: Review Request 57708: Populate `host` and `webURL`fields of FrameworkInfo.

2017-03-17 Thread Stephan Erb

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




src/main/java/org/apache/aurora/scheduler/mesos/FrameworkInfoFactory.java
Lines 64 (patched)


Aurora can run behind an HTTPS capable reverse proxy. In that case it might 
only be reachable via `https` and not via `http`. I have recently added 
`serverset_endpoint_name` to allow to change the name of the node written into 
ZK, so that the Aurora client will establish an SSL connection if needed 
(client code was already in place). 

We should leverage `serverset_endpoint_name` to write `https://` into the 
framework URL rather than `http://` here as well. The only disadvantage is that 
this could break assumptions, as `serverset_endpoint_name` indicates I can put 
everything in there.


- Stephan Erb


On March 16, 2017, 11:42 p.m., Zameer Manji wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/57708/
> ---
> 
> (Updated March 16, 2017, 11:42 p.m.)
> 
> 
> Review request for Aurora, Mehrdad Nurolahzade and Stephan Erb.
> 
> 
> Bugs: AURORA-1905
> https://issues.apache.org/jira/browse/AURORA-1905
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> This patch extracts out `FrameworkInfo` construction from the 
> `DriverSettings` data class to a factory class. This factory class combines 
> the base info constructed via CLI arguments with the HTTP server's host and 
> port information. This allows us to populate the `host` and `weburl` fields 
> of framework info, which enhance the Mesos UI.
> 
> This is necessary for users of the `V1_DRIVER` as the new driver does not 
> automatically populate the `host` field. Further, by using our own host and 
> port information, we ensure the information in ZooKeeper, the information 
> used for HTTP redirects and the information in the Mesos UI are all in sync.
> 
> Note that in vagrant, the hostname and URL are `aurora.local` because we set 
> the `--hostname` argument of the scheduler. By default Java will set it to 
> the FQDN or IP address of the host.
> 
> 
> Diffs
> -
> 
>   src/jmh/java/org/apache/aurora/benchmark/StatusUpdateBenchmark.java 
> 95496c1520413269ecb6237427720cc78f176a2d 
>   
> src/main/java/org/apache/aurora/scheduler/mesos/CommandLineDriverSettingsModule.java
>  ad6110a7d42ef37023a362e6da4ce35977a5ff69 
>   src/main/java/org/apache/aurora/scheduler/mesos/DriverSettings.java 
> f477404268f96e60dba21d58e90127dcaa0122aa 
>   src/main/java/org/apache/aurora/scheduler/mesos/FrameworkInfoFactory.java 
> PRE-CREATION 
>   src/main/java/org/apache/aurora/scheduler/mesos/SchedulerDriverService.java 
> f65a29d7ad8bc49784e324e674f30a6728a9d4ae 
>   
> src/main/java/org/apache/aurora/scheduler/mesos/VersionedMesosSchedulerImpl.java
>  84e3f47636d95521600e9a4c4d5b8bc8bbbff8cf 
>   
> src/main/java/org/apache/aurora/scheduler/mesos/VersionedSchedulerDriverService.java
>  d928d02cab087991a8cd8896d4366f6e5dca0913 
>   src/test/java/org/apache/aurora/scheduler/app/SchedulerIT.java 
> f5799751489a2773d116375ee17ca9e24fc3b134 
>   src/test/java/org/apache/aurora/scheduler/app/local/LocalSchedulerMain.java 
> 7151b81ce23973437aca96d92be7e99948172fb6 
>   
> src/test/java/org/apache/aurora/scheduler/mesos/FrameworkInfoFactoryImplTest.java
>  PRE-CREATION 
>   
> src/test/java/org/apache/aurora/scheduler/mesos/SchedulerDriverServiceTest.java
>  38e913570dce06359ab2fcc56778073c3ba17277 
>   
> src/test/java/org/apache/aurora/scheduler/mesos/VersionedMesosSchedulerImplTest.java
>  988ec501e62c0cf65114f4ee4d10cbc0bc85c2d7 
>   
> src/test/java/org/apache/aurora/scheduler/mesos/VersionedSchedulerDriverServiceTest.java
>  72aede85829f087bc88760e8b564d25aceb8aed8 
>   src/test/java/org/apache/aurora/scheduler/thrift/ThriftIT.java 
> 14218213bc92fe8c6f981003996c70ebb9370902 
> 
> 
> Diff: https://reviews.apache.org/r/57708/diff/1/
> 
> 
> Testing
> ---
> 
> e2e tests.
> 
> 
> File Attachments
> 
> 
> Screenshot
>   
> https://reviews.apache.org/media/uploaded/files/2017/03/16/1e989156-ea88-4e63-be72-bcca1e45b24e__Screen_Shot_2017-03-16_at_3.41.04_PM.png
> 
> 
> Thanks,
> 
> Zameer Manji
> 
>



Re: Review Request 57708: Populate `host` and `webURL`fields of FrameworkInfo.

2017-03-16 Thread Aurora ReviewBot

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


Ship it!




Master (e1504a7) 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 March 16, 2017, 10:42 p.m., Zameer Manji wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/57708/
> ---
> 
> (Updated March 16, 2017, 10:42 p.m.)
> 
> 
> Review request for Aurora, Mehrdad Nurolahzade and Stephan Erb.
> 
> 
> Bugs: AURORA-1905
> https://issues.apache.org/jira/browse/AURORA-1905
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> This patch extracts out `FrameworkInfo` construction from the 
> `DriverSettings` data class to a factory class. This factory class combines 
> the base info constructed via CLI arguments with the HTTP server's host and 
> port information. This allows us to populate the `host` and `weburl` fields 
> of framework info, which enhance the Mesos UI.
> 
> This is necessary for users of the `V1_DRIVER` as the new driver does not 
> automatically populate the `host` field. Further, by using our own host and 
> port information, we ensure the information in ZooKeeper, the information 
> used for HTTP redirects and the information in the Mesos UI are all in sync.
> 
> Note that in vagrant, the hostname and URL are `aurora.local` because we set 
> the `--hostname` argument of the scheduler. By default Java will set it to 
> the FQDN or IP address of the host.
> 
> 
> Diffs
> -
> 
>   src/jmh/java/org/apache/aurora/benchmark/StatusUpdateBenchmark.java 
> 95496c1520413269ecb6237427720cc78f176a2d 
>   
> src/main/java/org/apache/aurora/scheduler/mesos/CommandLineDriverSettingsModule.java
>  ad6110a7d42ef37023a362e6da4ce35977a5ff69 
>   src/main/java/org/apache/aurora/scheduler/mesos/DriverSettings.java 
> f477404268f96e60dba21d58e90127dcaa0122aa 
>   src/main/java/org/apache/aurora/scheduler/mesos/FrameworkInfoFactory.java 
> PRE-CREATION 
>   src/main/java/org/apache/aurora/scheduler/mesos/SchedulerDriverService.java 
> f65a29d7ad8bc49784e324e674f30a6728a9d4ae 
>   
> src/main/java/org/apache/aurora/scheduler/mesos/VersionedMesosSchedulerImpl.java
>  84e3f47636d95521600e9a4c4d5b8bc8bbbff8cf 
>   
> src/main/java/org/apache/aurora/scheduler/mesos/VersionedSchedulerDriverService.java
>  d928d02cab087991a8cd8896d4366f6e5dca0913 
>   src/test/java/org/apache/aurora/scheduler/app/SchedulerIT.java 
> f5799751489a2773d116375ee17ca9e24fc3b134 
>   src/test/java/org/apache/aurora/scheduler/app/local/LocalSchedulerMain.java 
> 7151b81ce23973437aca96d92be7e99948172fb6 
>   
> src/test/java/org/apache/aurora/scheduler/mesos/FrameworkInfoFactoryImplTest.java
>  PRE-CREATION 
>   
> src/test/java/org/apache/aurora/scheduler/mesos/SchedulerDriverServiceTest.java
>  38e913570dce06359ab2fcc56778073c3ba17277 
>   
> src/test/java/org/apache/aurora/scheduler/mesos/VersionedMesosSchedulerImplTest.java
>  988ec501e62c0cf65114f4ee4d10cbc0bc85c2d7 
>   
> src/test/java/org/apache/aurora/scheduler/mesos/VersionedSchedulerDriverServiceTest.java
>  72aede85829f087bc88760e8b564d25aceb8aed8 
>   src/test/java/org/apache/aurora/scheduler/thrift/ThriftIT.java 
> 14218213bc92fe8c6f981003996c70ebb9370902 
> 
> 
> Diff: https://reviews.apache.org/r/57708/diff/1/
> 
> 
> Testing
> ---
> 
> e2e tests.
> 
> 
> File Attachments
> 
> 
> Screenshot
>   
> https://reviews.apache.org/media/uploaded/files/2017/03/16/1e989156-ea88-4e63-be72-bcca1e45b24e__Screen_Shot_2017-03-16_at_3.41.04_PM.png
> 
> 
> Thanks,
> 
> Zameer Manji
> 
>



Re: Review Request 57708: Populate `host` and `webURL`fields of FrameworkInfo.

2017-03-16 Thread Zameer Manji

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

(Updated March 16, 2017, 3:42 p.m.)


Review request for Aurora, Mehrdad Nurolahzade and Stephan Erb.


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


Repository: aurora


Description
---

This patch extracts out `FrameworkInfo` construction from the `DriverSettings` 
data class to a factory class. This factory class combines the base info 
constructed via CLI arguments with the HTTP server's host and port information. 
This allows us to populate the `host` and `weburl` fields of framework info, 
which enhance the Mesos UI.

This is necessary for users of the `V1_DRIVER` as the new driver does not 
automatically populate the `host` field. Further, by using our own host and 
port information, we ensure the information in ZooKeeper, the information used 
for HTTP redirects and the information in the Mesos UI are all in sync.

Note that in vagrant, the hostname and URL are `aurora.local` because we set 
the `--hostname` argument of the scheduler. By default Java will set it to the 
FQDN or IP address of the host.


Diffs
-

  src/jmh/java/org/apache/aurora/benchmark/StatusUpdateBenchmark.java 
95496c1520413269ecb6237427720cc78f176a2d 
  
src/main/java/org/apache/aurora/scheduler/mesos/CommandLineDriverSettingsModule.java
 ad6110a7d42ef37023a362e6da4ce35977a5ff69 
  src/main/java/org/apache/aurora/scheduler/mesos/DriverSettings.java 
f477404268f96e60dba21d58e90127dcaa0122aa 
  src/main/java/org/apache/aurora/scheduler/mesos/FrameworkInfoFactory.java 
PRE-CREATION 
  src/main/java/org/apache/aurora/scheduler/mesos/SchedulerDriverService.java 
f65a29d7ad8bc49784e324e674f30a6728a9d4ae 
  
src/main/java/org/apache/aurora/scheduler/mesos/VersionedMesosSchedulerImpl.java
 84e3f47636d95521600e9a4c4d5b8bc8bbbff8cf 
  
src/main/java/org/apache/aurora/scheduler/mesos/VersionedSchedulerDriverService.java
 d928d02cab087991a8cd8896d4366f6e5dca0913 
  src/test/java/org/apache/aurora/scheduler/app/SchedulerIT.java 
f5799751489a2773d116375ee17ca9e24fc3b134 
  src/test/java/org/apache/aurora/scheduler/app/local/LocalSchedulerMain.java 
7151b81ce23973437aca96d92be7e99948172fb6 
  
src/test/java/org/apache/aurora/scheduler/mesos/FrameworkInfoFactoryImplTest.java
 PRE-CREATION 
  
src/test/java/org/apache/aurora/scheduler/mesos/SchedulerDriverServiceTest.java 
38e913570dce06359ab2fcc56778073c3ba17277 
  
src/test/java/org/apache/aurora/scheduler/mesos/VersionedMesosSchedulerImplTest.java
 988ec501e62c0cf65114f4ee4d10cbc0bc85c2d7 
  
src/test/java/org/apache/aurora/scheduler/mesos/VersionedSchedulerDriverServiceTest.java
 72aede85829f087bc88760e8b564d25aceb8aed8 
  src/test/java/org/apache/aurora/scheduler/thrift/ThriftIT.java 
14218213bc92fe8c6f981003996c70ebb9370902 


Diff: https://reviews.apache.org/r/57708/diff/1/


Testing
---

e2e tests.


File Attachments (updated)


Screenshot
  
https://reviews.apache.org/media/uploaded/files/2017/03/16/1e989156-ea88-4e63-be72-bcca1e45b24e__Screen_Shot_2017-03-16_at_3.41.04_PM.png


Thanks,

Zameer Manji