You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Armand Grillet <ag...@mesosphere.io> on 2017/08/23 14:21:38 UTC

Review Request 61849: Improved consistency of cout/cerr and glog usage in main functions.

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

Review request for mesos, Andrei Budnik and Alexander Rukletsov.


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


Repository: mesos


Description
-------

The main functions now have a common pattern, in 6 steps:
  1. Load flags.
  2. Check if the --help flag has been passed.
  3. Check if the flags are correct.
  4. Catch signals.
  5. Parse and setup the environment variables.
  6. `process::initialize();`.

This change reduces the number of messages "WARNING: Logging
before InitGoogleLogging() is written to STDERR".


Diffs
-----

  src/docker/executor.cpp 99a62244b7805d25b926d0293cb62574981d2878 
  src/launcher/default_executor.cpp 30bae5c931c81b81ff9590eea8051b2232388813 
  src/launcher/executor.cpp 65b9a2c52ba5a5a514fff992018e356f388468fc 
  src/local/main.cpp f0d7e8ca1a64b5409632ea0c0894a1dc84f9796e 
  src/master/main.cpp 1a78a55fd52c5eebad689c2a7f16c95979260d79 
  src/slave/main.cpp a4a8ced6825ece1b25003824d987ff83fb799ad7 


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


Testing
-------

```
$ make check
```


Thanks,

Armand Grillet


Re: Review Request 61849: Improved consistency of cout/cerr and glog usage in main functions.

Posted by Mesos Reviewbot Windows <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61849/#review183970
-----------------------------------------------------------



Patch looks great!

Reviews applied: [61849]

Logs available here: http://104.210.40.105/logs/master/61849

- Mesos Reviewbot Windows


On Aug. 25, 2017, 10:34 a.m., Armand Grillet wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61849/
> -----------------------------------------------------------
> 
> (Updated Aug. 25, 2017, 10:34 a.m.)
> 
> 
> Review request for mesos, Andrei Budnik and Alexander Rukletsov.
> 
> 
> Bugs: MESOS-7586
>     https://issues.apache.org/jira/browse/MESOS-7586
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The main functions now have a common initialization pattern:
>   1. Load flags.
>   2. Check if the --help flag has been passed.
>   3. Check if the flags are correct.
>   4. Initialize logging.
>   5. Parse and setup the environment variables.
>   6. Initialize libprocess.
> 
> This change reduces the number of messages "WARNING: Logging before
> InitGoogleLogging() is written to STDERR" as we now use glog only after
> the fourth step. This forces all glog messages to end up in a logdir.
> 
> 
> Diffs
> -----
> 
>   src/docker/executor.cpp aff97939b088e3747111ca6ec00fe76c59e9b396 
>   src/launcher/default_executor.cpp 30bae5c931c81b81ff9590eea8051b2232388813 
>   src/launcher/executor.cpp 65b9a2c52ba5a5a514fff992018e356f388468fc 
>   src/local/main.cpp f0d7e8ca1a64b5409632ea0c0894a1dc84f9796e 
>   src/master/main.cpp 1a78a55fd52c5eebad689c2a7f16c95979260d79 
>   src/slave/main.cpp a4a8ced6825ece1b25003824d987ff83fb799ad7 
> 
> 
> Diff: https://reviews.apache.org/r/61849/diff/4/
> 
> 
> Testing
> -------
> 
> ```
> $ make check
> ```
> 
> 
> Thanks,
> 
> Armand Grillet
> 
>


Re: Review Request 61849: Improved consistency of cout/cerr and glog usage in main functions.

Posted by Mesos Reviewbot <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61849/#review183886
-----------------------------------------------------------



Patch looks great!

Reviews applied: [61849]

Passed command: export OS='ubuntu:14.04' BUILDTOOL='autotools' COMPILER='gcc' CONFIGURATION='--verbose' ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1'; ./support/docker-build.sh

- Mesos Reviewbot


On Aug. 25, 2017, 5:34 p.m., Armand Grillet wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61849/
> -----------------------------------------------------------
> 
> (Updated Aug. 25, 2017, 5:34 p.m.)
> 
> 
> Review request for mesos, Andrei Budnik and Alexander Rukletsov.
> 
> 
> Bugs: MESOS-7586
>     https://issues.apache.org/jira/browse/MESOS-7586
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The main functions now have a common initialization pattern:
>   1. Load flags.
>   2. Check if the --help flag has been passed.
>   3. Check if the flags are correct.
>   4. Initialize logging.
>   5. Parse and setup the environment variables.
>   6. Initialize libprocess.
> 
> This change reduces the number of messages "WARNING: Logging
> before InitGoogleLogging() is written to STDERR" as we use
> glog only after the fourth step in the modified files.
> 
> 
> Diffs
> -----
> 
>   src/docker/executor.cpp aff97939b088e3747111ca6ec00fe76c59e9b396 
>   src/launcher/default_executor.cpp 30bae5c931c81b81ff9590eea8051b2232388813 
>   src/launcher/executor.cpp 65b9a2c52ba5a5a514fff992018e356f388468fc 
>   src/local/main.cpp f0d7e8ca1a64b5409632ea0c0894a1dc84f9796e 
>   src/master/main.cpp 1a78a55fd52c5eebad689c2a7f16c95979260d79 
>   src/slave/main.cpp a4a8ced6825ece1b25003824d987ff83fb799ad7 
> 
> 
> Diff: https://reviews.apache.org/r/61849/diff/3/
> 
> 
> Testing
> -------
> 
> ```
> $ make check
> ```
> 
> 
> Thanks,
> 
> Armand Grillet
> 
>


Re: Review Request 61849: Improved consistency of cout/cerr and glog usage in main functions.

Posted by Andrei Budnik <ab...@mesosphere.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61849/#review183930
-----------------------------------------------------------


Ship it!




- Andrei Budnik


On Aug. 25, 2017, 5:34 p.m., Armand Grillet wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61849/
> -----------------------------------------------------------
> 
> (Updated Aug. 25, 2017, 5:34 p.m.)
> 
> 
> Review request for mesos, Andrei Budnik and Alexander Rukletsov.
> 
> 
> Bugs: MESOS-7586
>     https://issues.apache.org/jira/browse/MESOS-7586
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The main functions now have a common initialization pattern:
>   1. Load flags.
>   2. Check if the --help flag has been passed.
>   3. Check if the flags are correct.
>   4. Initialize logging.
>   5. Parse and setup the environment variables.
>   6. Initialize libprocess.
> 
> This change reduces the number of messages "WARNING: Logging before
> InitGoogleLogging() is written to STDERR" as we now use glog only after
> the fourth step. This forces all glog messages to end up in a logdir.
> 
> 
> Diffs
> -----
> 
>   src/docker/executor.cpp aff97939b088e3747111ca6ec00fe76c59e9b396 
>   src/launcher/default_executor.cpp 30bae5c931c81b81ff9590eea8051b2232388813 
>   src/launcher/executor.cpp 65b9a2c52ba5a5a514fff992018e356f388468fc 
>   src/local/main.cpp f0d7e8ca1a64b5409632ea0c0894a1dc84f9796e 
>   src/master/main.cpp 1a78a55fd52c5eebad689c2a7f16c95979260d79 
>   src/slave/main.cpp a4a8ced6825ece1b25003824d987ff83fb799ad7 
> 
> 
> Diff: https://reviews.apache.org/r/61849/diff/4/
> 
> 
> Testing
> -------
> 
> ```
> $ make check
> ```
> 
> 
> Thanks,
> 
> Armand Grillet
> 
>


Re: Review Request 61849: Improved consistency of cout/cerr and glog usage in main functions.

Posted by Mesos Reviewbot Windows <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61849/#review183925
-----------------------------------------------------------



Patch looks great!

Reviews applied: [61849]

Logs available here: http://104.210.40.105/logs/master/61849

- Mesos Reviewbot Windows


On Aug. 25, 2017, 5:34 p.m., Armand Grillet wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61849/
> -----------------------------------------------------------
> 
> (Updated Aug. 25, 2017, 5:34 p.m.)
> 
> 
> Review request for mesos, Andrei Budnik and Alexander Rukletsov.
> 
> 
> Bugs: MESOS-7586
>     https://issues.apache.org/jira/browse/MESOS-7586
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The main functions now have a common initialization pattern:
>   1. Load flags.
>   2. Check if the --help flag has been passed.
>   3. Check if the flags are correct.
>   4. Initialize logging.
>   5. Parse and setup the environment variables.
>   6. Initialize libprocess.
> 
> This change reduces the number of messages "WARNING: Logging
> before InitGoogleLogging() is written to STDERR" as we use
> glog only after the fourth step in the modified files.
> 
> 
> Diffs
> -----
> 
>   src/docker/executor.cpp aff97939b088e3747111ca6ec00fe76c59e9b396 
>   src/launcher/default_executor.cpp 30bae5c931c81b81ff9590eea8051b2232388813 
>   src/launcher/executor.cpp 65b9a2c52ba5a5a514fff992018e356f388468fc 
>   src/local/main.cpp f0d7e8ca1a64b5409632ea0c0894a1dc84f9796e 
>   src/master/main.cpp 1a78a55fd52c5eebad689c2a7f16c95979260d79 
>   src/slave/main.cpp a4a8ced6825ece1b25003824d987ff83fb799ad7 
> 
> 
> Diff: https://reviews.apache.org/r/61849/diff/3/
> 
> 
> Testing
> -------
> 
> ```
> $ make check
> ```
> 
> 
> Thanks,
> 
> Armand Grillet
> 
>


Re: Review Request 61849: Improved consistency of cout/cerr and glog usage in main functions.

Posted by Mesos Reviewbot <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61849/#review184077
-----------------------------------------------------------



Patch looks great!

Reviews applied: [61849]

Passed command: export OS='ubuntu:14.04' BUILDTOOL='autotools' COMPILER='gcc' CONFIGURATION='--verbose' ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1'; ./support/docker-build.sh

- Mesos Reviewbot


On Aug. 29, 2017, 3:56 p.m., Armand Grillet wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61849/
> -----------------------------------------------------------
> 
> (Updated Aug. 29, 2017, 3:56 p.m.)
> 
> 
> Review request for mesos, Andrei Budnik and Alexander Rukletsov.
> 
> 
> Bugs: MESOS-7586
>     https://issues.apache.org/jira/browse/MESOS-7586
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The main functions now have a common initialization pattern:
>   1. Load flags.
>   2. Check if the --help flag has been passed.
>   3. Check if the flags are correct.
>   4. Initialize logging.
>   5. Parse and setup the environment variables.
>   6. Initialize libprocess.
> 
> This change reduces the number of messages "WARNING: Logging before
> InitGoogleLogging() is written to STDERR" as we now use glog only after
> the fourth step. This forces all glog messages to end up in a logdir.
> 
> 
> Diffs
> -----
> 
>   src/docker/executor.cpp aff97939b088e3747111ca6ec00fe76c59e9b396 
>   src/launcher/default_executor.cpp 30bae5c931c81b81ff9590eea8051b2232388813 
>   src/launcher/executor.cpp 65b9a2c52ba5a5a514fff992018e356f388468fc 
>   src/local/main.cpp f0d7e8ca1a64b5409632ea0c0894a1dc84f9796e 
>   src/master/main.cpp 1a78a55fd52c5eebad689c2a7f16c95979260d79 
>   src/slave/main.cpp a4a8ced6825ece1b25003824d987ff83fb799ad7 
> 
> 
> Diff: https://reviews.apache.org/r/61849/diff/5/
> 
> 
> Testing
> -------
> 
> ```
> $ make check
> ```
> 
> 
> Thanks,
> 
> Armand Grillet
> 
>


Re: Review Request 61849: Improved consistency of cout/cerr and glog usage in main functions.

Posted by Mesos Reviewbot <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61849/#review184327
-----------------------------------------------------------



Patch looks great!

Reviews applied: [61849]

Passed command: export OS='ubuntu:14.04' BUILDTOOL='autotools' COMPILER='gcc' CONFIGURATION='--verbose' ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1'; ./support/docker-build.sh

- Mesos Reviewbot


On Aug. 31, 2017, 9:39 a.m., Armand Grillet wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61849/
> -----------------------------------------------------------
> 
> (Updated Aug. 31, 2017, 9:39 a.m.)
> 
> 
> Review request for mesos, Andrei Budnik and Alexander Rukletsov.
> 
> 
> Bugs: MESOS-7586
>     https://issues.apache.org/jira/browse/MESOS-7586
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The main functions now have a common initialization pattern:
>   1. Load flags.
>   2. Check if the --help flag has been passed.
>   3. Check if the flags are correct.
>   4. Initialize logging.
>   5. Parse and setup the environment variables.
>   6. Initialize libprocess.
> 
> This change reduces the number of messages "WARNING: Logging before
> InitGoogleLogging() is written to STDERR" as we now use glog only after
> the fourth step. This forces all glog messages to end up in a logdir.
> 
> 
> Diffs
> -----
> 
>   src/docker/executor.cpp aff97939b088e3747111ca6ec00fe76c59e9b396 
>   src/launcher/default_executor.cpp 30bae5c931c81b81ff9590eea8051b2232388813 
>   src/launcher/executor.cpp 65b9a2c52ba5a5a514fff992018e356f388468fc 
>   src/local/main.cpp f0d7e8ca1a64b5409632ea0c0894a1dc84f9796e 
>   src/master/main.cpp 1a78a55fd52c5eebad689c2a7f16c95979260d79 
>   src/slave/main.cpp a4a8ced6825ece1b25003824d987ff83fb799ad7 
> 
> 
> Diff: https://reviews.apache.org/r/61849/diff/6/
> 
> 
> Testing
> -------
> 
> ```
> $ make check
> ```
> 
> 
> Thanks,
> 
> Armand Grillet
> 
>


Re: Review Request 61849: Improved consistency of cout/cerr and glog usage in main functions.

Posted by Mesos Reviewbot Windows <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61849/#review184306
-----------------------------------------------------------



Bad patch!

Reviews applied: [61849]

Logs available here: http://104.210.40.105/logs/master/61849

- Mesos Reviewbot Windows


On Aug. 31, 2017, 4:39 p.m., Armand Grillet wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61849/
> -----------------------------------------------------------
> 
> (Updated Aug. 31, 2017, 4:39 p.m.)
> 
> 
> Review request for mesos, Andrei Budnik and Alexander Rukletsov.
> 
> 
> Bugs: MESOS-7586
>     https://issues.apache.org/jira/browse/MESOS-7586
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The main functions now have a common initialization pattern:
>   1. Load flags.
>   2. Check if the --help flag has been passed.
>   3. Check if the flags are correct.
>   4. Initialize logging.
>   5. Parse and setup the environment variables.
>   6. Initialize libprocess.
> 
> This change reduces the number of messages "WARNING: Logging before
> InitGoogleLogging() is written to STDERR" as we now use glog only after
> the fourth step. This forces all glog messages to end up in a logdir.
> 
> 
> Diffs
> -----
> 
>   src/docker/executor.cpp aff97939b088e3747111ca6ec00fe76c59e9b396 
>   src/launcher/default_executor.cpp 30bae5c931c81b81ff9590eea8051b2232388813 
>   src/launcher/executor.cpp 65b9a2c52ba5a5a514fff992018e356f388468fc 
>   src/local/main.cpp f0d7e8ca1a64b5409632ea0c0894a1dc84f9796e 
>   src/master/main.cpp 1a78a55fd52c5eebad689c2a7f16c95979260d79 
>   src/slave/main.cpp a4a8ced6825ece1b25003824d987ff83fb799ad7 
> 
> 
> Diff: https://reviews.apache.org/r/61849/diff/6/
> 
> 
> Testing
> -------
> 
> ```
> $ make check
> ```
> 
> 
> Thanks,
> 
> Armand Grillet
> 
>


Re: Review Request 61849: Improved consistency of cout/cerr and glog usage in main functions.

Posted by Till Toenshoff <to...@me.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61849/#review184345
-----------------------------------------------------------


Ship it!




Ship It!

- Till Toenshoff


On Aug. 31, 2017, 4:39 p.m., Armand Grillet wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61849/
> -----------------------------------------------------------
> 
> (Updated Aug. 31, 2017, 4:39 p.m.)
> 
> 
> Review request for mesos, Andrei Budnik and Alexander Rukletsov.
> 
> 
> Bugs: MESOS-7586
>     https://issues.apache.org/jira/browse/MESOS-7586
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The main functions now have a common initialization pattern:
>   1. Load flags.
>   2. Check if the --help flag has been passed.
>   3. Check if the flags are correct.
>   4. Initialize logging.
>   5. Parse and setup the environment variables.
>   6. Initialize libprocess.
> 
> This change reduces the number of messages "WARNING: Logging before
> InitGoogleLogging() is written to STDERR" as we now use glog only after
> the fourth step. This forces all glog messages to end up in a logdir.
> 
> 
> Diffs
> -----
> 
>   src/docker/executor.cpp aff97939b088e3747111ca6ec00fe76c59e9b396 
>   src/launcher/default_executor.cpp 30bae5c931c81b81ff9590eea8051b2232388813 
>   src/launcher/executor.cpp 65b9a2c52ba5a5a514fff992018e356f388468fc 
>   src/local/main.cpp f0d7e8ca1a64b5409632ea0c0894a1dc84f9796e 
>   src/master/main.cpp 1a78a55fd52c5eebad689c2a7f16c95979260d79 
>   src/slave/main.cpp a4a8ced6825ece1b25003824d987ff83fb799ad7 
> 
> 
> Diff: https://reviews.apache.org/r/61849/diff/6/
> 
> 
> Testing
> -------
> 
> ```
> $ make check
> ```
> 
> 
> Thanks,
> 
> Armand Grillet
> 
>


Re: Review Request 61849: Improved consistency of cout/cerr and glog usage in main functions.

Posted by Armand Grillet <ag...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61849/
-----------------------------------------------------------

(Updated Aug. 31, 2017, 4:39 p.m.)


Review request for mesos, Andrei Budnik and Alexander Rukletsov.


Changes
-------

Resolved issues.


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


Repository: mesos


Description
-------

The main functions now have a common initialization pattern:
  1. Load flags.
  2. Check if the --help flag has been passed.
  3. Check if the flags are correct.
  4. Initialize logging.
  5. Parse and setup the environment variables.
  6. Initialize libprocess.

This change reduces the number of messages "WARNING: Logging before
InitGoogleLogging() is written to STDERR" as we now use glog only after
the fourth step. This forces all glog messages to end up in a logdir.


Diffs (updated)
-----

  src/docker/executor.cpp aff97939b088e3747111ca6ec00fe76c59e9b396 
  src/launcher/default_executor.cpp 30bae5c931c81b81ff9590eea8051b2232388813 
  src/launcher/executor.cpp 65b9a2c52ba5a5a514fff992018e356f388468fc 
  src/local/main.cpp f0d7e8ca1a64b5409632ea0c0894a1dc84f9796e 
  src/master/main.cpp 1a78a55fd52c5eebad689c2a7f16c95979260d79 
  src/slave/main.cpp a4a8ced6825ece1b25003824d987ff83fb799ad7 


Diff: https://reviews.apache.org/r/61849/diff/6/

Changes: https://reviews.apache.org/r/61849/diff/5-6/


Testing
-------

```
$ make check
```


Thanks,

Armand Grillet


Re: Review Request 61849: Improved consistency of cout/cerr and glog usage in main functions.

Posted by Alexander Rukletsov <ru...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61849/#review184269
-----------------------------------------------------------


Fix it, then Ship it!





src/launcher/default_executor.cpp
Line 1472 (original), 1470 (patched)
<https://reviews.apache.org/r/61849/#comment260399>

    I see you moved this closer to `flags.load()` in the command executor. Let's do the same here for consistency.



src/local/main.cpp
Lines 84-92 (original), 84-92 (patched)
<https://reviews.apache.org/r/61849/#comment260398>

    These should be swapped according to your pattern.



src/local/main.cpp
Lines 94-99 (original), 94-99 (patched)
<https://reviews.apache.org/r/61849/#comment260400>

    This is part of the libprocess initialization, should be moved together with `process::initialize()`



src/master/main.cpp
Lines 258-261 (original), 257-260 (patched)
<https://reviews.apache.org/r/61849/#comment260402>

    This is done right after initializing logging. Let's do the same here for consistency.


- Alexander Rukletsov


On Aug. 29, 2017, 3:56 p.m., Armand Grillet wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61849/
> -----------------------------------------------------------
> 
> (Updated Aug. 29, 2017, 3:56 p.m.)
> 
> 
> Review request for mesos, Andrei Budnik and Alexander Rukletsov.
> 
> 
> Bugs: MESOS-7586
>     https://issues.apache.org/jira/browse/MESOS-7586
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The main functions now have a common initialization pattern:
>   1. Load flags.
>   2. Check if the --help flag has been passed.
>   3. Check if the flags are correct.
>   4. Initialize logging.
>   5. Parse and setup the environment variables.
>   6. Initialize libprocess.
> 
> This change reduces the number of messages "WARNING: Logging before
> InitGoogleLogging() is written to STDERR" as we now use glog only after
> the fourth step. This forces all glog messages to end up in a logdir.
> 
> 
> Diffs
> -----
> 
>   src/docker/executor.cpp aff97939b088e3747111ca6ec00fe76c59e9b396 
>   src/launcher/default_executor.cpp 30bae5c931c81b81ff9590eea8051b2232388813 
>   src/launcher/executor.cpp 65b9a2c52ba5a5a514fff992018e356f388468fc 
>   src/local/main.cpp f0d7e8ca1a64b5409632ea0c0894a1dc84f9796e 
>   src/master/main.cpp 1a78a55fd52c5eebad689c2a7f16c95979260d79 
>   src/slave/main.cpp a4a8ced6825ece1b25003824d987ff83fb799ad7 
> 
> 
> Diff: https://reviews.apache.org/r/61849/diff/5/
> 
> 
> Testing
> -------
> 
> ```
> $ make check
> ```
> 
> 
> Thanks,
> 
> Armand Grillet
> 
>


Re: Review Request 61849: Improved consistency of cout/cerr and glog usage in main functions.

Posted by Mesos Reviewbot Windows <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61849/#review184072
-----------------------------------------------------------



Patch looks great!

Reviews applied: [61849]

Logs available here: http://104.210.40.105/logs/master/61849

- Mesos Reviewbot Windows


On Aug. 29, 2017, 3:56 p.m., Armand Grillet wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61849/
> -----------------------------------------------------------
> 
> (Updated Aug. 29, 2017, 3:56 p.m.)
> 
> 
> Review request for mesos, Andrei Budnik and Alexander Rukletsov.
> 
> 
> Bugs: MESOS-7586
>     https://issues.apache.org/jira/browse/MESOS-7586
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The main functions now have a common initialization pattern:
>   1. Load flags.
>   2. Check if the --help flag has been passed.
>   3. Check if the flags are correct.
>   4. Initialize logging.
>   5. Parse and setup the environment variables.
>   6. Initialize libprocess.
> 
> This change reduces the number of messages "WARNING: Logging before
> InitGoogleLogging() is written to STDERR" as we now use glog only after
> the fourth step. This forces all glog messages to end up in a logdir.
> 
> 
> Diffs
> -----
> 
>   src/docker/executor.cpp aff97939b088e3747111ca6ec00fe76c59e9b396 
>   src/launcher/default_executor.cpp 30bae5c931c81b81ff9590eea8051b2232388813 
>   src/launcher/executor.cpp 65b9a2c52ba5a5a514fff992018e356f388468fc 
>   src/local/main.cpp f0d7e8ca1a64b5409632ea0c0894a1dc84f9796e 
>   src/master/main.cpp 1a78a55fd52c5eebad689c2a7f16c95979260d79 
>   src/slave/main.cpp a4a8ced6825ece1b25003824d987ff83fb799ad7 
> 
> 
> Diff: https://reviews.apache.org/r/61849/diff/5/
> 
> 
> Testing
> -------
> 
> ```
> $ make check
> ```
> 
> 
> Thanks,
> 
> Armand Grillet
> 
>


Re: Review Request 61849: Improved consistency of cout/cerr and glog usage in main functions.

Posted by Armand Grillet <ag...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61849/
-----------------------------------------------------------

(Updated Aug. 29, 2017, 3:56 p.m.)


Review request for mesos, Andrei Budnik and Alexander Rukletsov.


Changes
-------

Fixed issue and rebased.


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


Repository: mesos


Description
-------

The main functions now have a common initialization pattern:
  1. Load flags.
  2. Check if the --help flag has been passed.
  3. Check if the flags are correct.
  4. Initialize logging.
  5. Parse and setup the environment variables.
  6. Initialize libprocess.

This change reduces the number of messages "WARNING: Logging before
InitGoogleLogging() is written to STDERR" as we now use glog only after
the fourth step. This forces all glog messages to end up in a logdir.


Diffs (updated)
-----

  src/docker/executor.cpp aff97939b088e3747111ca6ec00fe76c59e9b396 
  src/launcher/default_executor.cpp 30bae5c931c81b81ff9590eea8051b2232388813 
  src/launcher/executor.cpp 65b9a2c52ba5a5a514fff992018e356f388468fc 
  src/local/main.cpp f0d7e8ca1a64b5409632ea0c0894a1dc84f9796e 
  src/master/main.cpp 1a78a55fd52c5eebad689c2a7f16c95979260d79 
  src/slave/main.cpp a4a8ced6825ece1b25003824d987ff83fb799ad7 


Diff: https://reviews.apache.org/r/61849/diff/5/

Changes: https://reviews.apache.org/r/61849/diff/4-5/


Testing
-------

```
$ make check
```


Thanks,

Armand Grillet


Re: Review Request 61849: Improved consistency of cout/cerr and glog usage in main functions.

Posted by Till Toenshoff <to...@me.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61849/#review184045
-----------------------------------------------------------


Fix it, then Ship it!




Thanks for this cleanup.

We should consider cleaning up the examples as well. Also we should consider adding propper logging-flags to the logrotate runnable as it uses GLOG as well. However, that is kinda out of scope of this patch and can be solved successively, I feel. Could you please create a JIRA for the logrotate runnable and maybe another one for cleaning up the examples? The latter should be marked with lowest possible priority ;).


src/launcher/default_executor.cpp
Lines 1476 (patched)
<https://reviews.apache.org/r/61849/#comment260051>

    You moved the Flags down to their first use, but left the other prematurely instantiated objects up - can you elaborate this preference?


- Till Toenshoff


On Aug. 25, 2017, 5:34 p.m., Armand Grillet wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61849/
> -----------------------------------------------------------
> 
> (Updated Aug. 25, 2017, 5:34 p.m.)
> 
> 
> Review request for mesos, Andrei Budnik and Alexander Rukletsov.
> 
> 
> Bugs: MESOS-7586
>     https://issues.apache.org/jira/browse/MESOS-7586
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The main functions now have a common initialization pattern:
>   1. Load flags.
>   2. Check if the --help flag has been passed.
>   3. Check if the flags are correct.
>   4. Initialize logging.
>   5. Parse and setup the environment variables.
>   6. Initialize libprocess.
> 
> This change reduces the number of messages "WARNING: Logging before
> InitGoogleLogging() is written to STDERR" as we now use glog only after
> the fourth step. This forces all glog messages to end up in a logdir.
> 
> 
> Diffs
> -----
> 
>   src/docker/executor.cpp aff97939b088e3747111ca6ec00fe76c59e9b396 
>   src/launcher/default_executor.cpp 30bae5c931c81b81ff9590eea8051b2232388813 
>   src/launcher/executor.cpp 65b9a2c52ba5a5a514fff992018e356f388468fc 
>   src/local/main.cpp f0d7e8ca1a64b5409632ea0c0894a1dc84f9796e 
>   src/master/main.cpp 1a78a55fd52c5eebad689c2a7f16c95979260d79 
>   src/slave/main.cpp a4a8ced6825ece1b25003824d987ff83fb799ad7 
> 
> 
> Diff: https://reviews.apache.org/r/61849/diff/4/
> 
> 
> Testing
> -------
> 
> ```
> $ make check
> ```
> 
> 
> Thanks,
> 
> Armand Grillet
> 
>


Re: Review Request 61849: Improved consistency of cout/cerr and glog usage in main functions.

Posted by Mesos Reviewbot <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61849/#review183946
-----------------------------------------------------------



Patch looks great!

Reviews applied: [61849]

Passed command: export OS='ubuntu:14.04' BUILDTOOL='autotools' COMPILER='gcc' CONFIGURATION='--verbose' ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1'; ./support/docker-build.sh

- Mesos Reviewbot


On Aug. 25, 2017, 5:34 p.m., Armand Grillet wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61849/
> -----------------------------------------------------------
> 
> (Updated Aug. 25, 2017, 5:34 p.m.)
> 
> 
> Review request for mesos, Andrei Budnik and Alexander Rukletsov.
> 
> 
> Bugs: MESOS-7586
>     https://issues.apache.org/jira/browse/MESOS-7586
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The main functions now have a common initialization pattern:
>   1. Load flags.
>   2. Check if the --help flag has been passed.
>   3. Check if the flags are correct.
>   4. Initialize logging.
>   5. Parse and setup the environment variables.
>   6. Initialize libprocess.
> 
> This change reduces the number of messages "WARNING: Logging before
> InitGoogleLogging() is written to STDERR" as we now use glog only after
> the fourth step. This forces all glog messages to end up in a logdir.
> 
> 
> Diffs
> -----
> 
>   src/docker/executor.cpp aff97939b088e3747111ca6ec00fe76c59e9b396 
>   src/launcher/default_executor.cpp 30bae5c931c81b81ff9590eea8051b2232388813 
>   src/launcher/executor.cpp 65b9a2c52ba5a5a514fff992018e356f388468fc 
>   src/local/main.cpp f0d7e8ca1a64b5409632ea0c0894a1dc84f9796e 
>   src/master/main.cpp 1a78a55fd52c5eebad689c2a7f16c95979260d79 
>   src/slave/main.cpp a4a8ced6825ece1b25003824d987ff83fb799ad7 
> 
> 
> Diff: https://reviews.apache.org/r/61849/diff/4/
> 
> 
> Testing
> -------
> 
> ```
> $ make check
> ```
> 
> 
> Thanks,
> 
> Armand Grillet
> 
>


Re: Review Request 61849: Improved consistency of cout/cerr and glog usage in main functions.

Posted by Armand Grillet <ag...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61849/
-----------------------------------------------------------

(Updated Aug. 25, 2017, 5:34 p.m.)


Review request for mesos, Andrei Budnik and Alexander Rukletsov.


Changes
-------

Moved comments to resolve issues.


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


Repository: mesos


Description (updated)
-------

The main functions now have a common initialization pattern:
  1. Load flags.
  2. Check if the --help flag has been passed.
  3. Check if the flags are correct.
  4. Initialize logging.
  5. Parse and setup the environment variables.
  6. Initialize libprocess.

This change reduces the number of messages "WARNING: Logging
before InitGoogleLogging() is written to STDERR" as we use
glog only after the fourth step in the modified files.


Diffs (updated)
-----

  src/docker/executor.cpp aff97939b088e3747111ca6ec00fe76c59e9b396 
  src/launcher/default_executor.cpp 30bae5c931c81b81ff9590eea8051b2232388813 
  src/launcher/executor.cpp 65b9a2c52ba5a5a514fff992018e356f388468fc 
  src/local/main.cpp f0d7e8ca1a64b5409632ea0c0894a1dc84f9796e 
  src/master/main.cpp 1a78a55fd52c5eebad689c2a7f16c95979260d79 
  src/slave/main.cpp a4a8ced6825ece1b25003824d987ff83fb799ad7 


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

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


Testing
-------

```
$ make check
```


Thanks,

Armand Grillet


Re: Review Request 61849: Improved consistency of cout/cerr and glog usage in main functions.

Posted by Andrei Budnik <ab...@mesosphere.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61849/#review183858
-----------------------------------------------------------




src/master/main.cpp
Line 138 (original), 138 (patched)
<https://reviews.apache.org/r/61849/#comment259922>

    Should we update this comment?



src/slave/main.cpp
Line 231 (original), 231 (patched)
<https://reviews.apache.org/r/61849/#comment259920>

    Should we update this comment as well?


- Andrei Budnik


On Aug. 23, 2017, 2:21 p.m., Armand Grillet wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61849/
> -----------------------------------------------------------
> 
> (Updated Aug. 23, 2017, 2:21 p.m.)
> 
> 
> Review request for mesos, Andrei Budnik and Alexander Rukletsov.
> 
> 
> Bugs: MESOS-7586
>     https://issues.apache.org/jira/browse/MESOS-7586
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The main functions now have a common pattern, in 6 steps:
>   1. Load flags.
>   2. Check if the --help flag has been passed.
>   3. Check if the flags are correct.
>   4. Initialize logging.
>   5. Parse and setup the environment variables.
>   6. Initialize libprocess.
> 
> This change reduces the number of messages "WARNING: Logging
> before InitGoogleLogging() is written to STDERR" as we use
> glog only after the fourth step in the modified files.
> 
> 
> Diffs
> -----
> 
>   src/docker/executor.cpp 99a62244b7805d25b926d0293cb62574981d2878 
>   src/launcher/default_executor.cpp 30bae5c931c81b81ff9590eea8051b2232388813 
>   src/launcher/executor.cpp 65b9a2c52ba5a5a514fff992018e356f388468fc 
>   src/local/main.cpp f0d7e8ca1a64b5409632ea0c0894a1dc84f9796e 
>   src/master/main.cpp 1a78a55fd52c5eebad689c2a7f16c95979260d79 
>   src/slave/main.cpp a4a8ced6825ece1b25003824d987ff83fb799ad7 
> 
> 
> Diff: https://reviews.apache.org/r/61849/diff/2/
> 
> 
> Testing
> -------
> 
> ```
> $ make check
> ```
> 
> 
> Thanks,
> 
> Armand Grillet
> 
>