You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by Till Toenshoff <to...@me.com> on 2015/03/09 01:54:43 UTC

Re: Review Request 31838: Fixed authentication failure triggered slave crash.

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

(Updated March 9, 2015, 12:54 a.m.)


Review request for mesos, Adam B, Alexander Rojas, Joerg Schad, and Vinod Kone.


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


Repository: mesos-incubating


Description
-------

see summary.


Diffs (updated)
-----

  src/slave/slave.cpp 364d911 

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


Testing
-------

make check && functional testing with failed authentication


Thanks,

Till Toenshoff


Re: Review Request 31838: Fixed authentication failure triggered slave crash.

Posted by Adam B <ad...@mesosphere.io>.

> On March 30, 2015, 10:58 a.m., Vinod Kone wrote:
> > I think the bigger problem here is that slave shuts down all the running tasks and executors if authentication fails. I think that is dangerous. For example if the master is misconfigured with wrong credentials, this could potentially shut down the whole cluster! I think the safer thing to do is to EXIT(1) in _authenticate() instead of shutdown().

Excellent idea. Till has implemented this in a separate patch: https://reviews.apache.org/r/35583/diff


- Adam


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


On March 8, 2015, 5:54 p.m., Till Toenshoff wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/31838/
> -----------------------------------------------------------
> 
> (Updated March 8, 2015, 5:54 p.m.)
> 
> 
> Review request for mesos, Adam B, Alexander Rojas, Joerg Schad, and Vinod Kone.
> 
> 
> Bugs: MESOS-2464
>     https://issues.apache.org/jira/browse/MESOS-2464
> 
> 
> Repository: mesos-incubating
> 
> 
> Description
> -------
> 
> see summary.
> 
> 
> Diffs
> -----
> 
>   src/slave/slave.cpp 364d911 
> 
> Diff: https://reviews.apache.org/r/31838/diff/
> 
> 
> Testing
> -------
> 
> make check && functional testing with failed authentication
> 
> 
> Thanks,
> 
> Till Toenshoff
> 
>


Re: Review Request 31838: Fixed authentication failure triggered slave crash.

Posted by Vinod Kone <vi...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/31838/#review78226
-----------------------------------------------------------


I think the bigger problem here is that slave shuts down all the running tasks and executors if authentication fails. I think that is dangerous. For example if the master is misconfigured with wrong credentials, this could potentially shut down the whole cluster! I think the safer thing to do is to EXIT(1) in _authenticate() instead of shutdown().

- Vinod Kone


On March 9, 2015, 12:54 a.m., Till Toenshoff wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/31838/
> -----------------------------------------------------------
> 
> (Updated March 9, 2015, 12:54 a.m.)
> 
> 
> Review request for mesos, Adam B, Alexander Rojas, Joerg Schad, and Vinod Kone.
> 
> 
> Bugs: MESOS-2464
>     https://issues.apache.org/jira/browse/MESOS-2464
> 
> 
> Repository: mesos-incubating
> 
> 
> Description
> -------
> 
> see summary.
> 
> 
> Diffs
> -----
> 
>   src/slave/slave.cpp 364d911 
> 
> Diff: https://reviews.apache.org/r/31838/diff/
> 
> 
> Testing
> -------
> 
> make check && functional testing with failed authentication
> 
> 
> Thanks,
> 
> Till Toenshoff
> 
>


Re: Review Request 31838: Fixed authentication failure triggered slave crash.

Posted by Adam B <ad...@mesosphere.io>.

> On March 13, 2015, 5:11 p.m., Alexander Rukletsov wrote:
> > src/slave/slave.cpp, lines 537-538
> > <https://reviews.apache.org/r/31838/diff/2/?file=888587#file888587line537>
> >
> >     Does it make sense to flatten this for readability? Like this:
> >     ```
> >     } else if (info.has_id()) {
> >     ...
> >     } else {
> >     ...
> >     }
> >     ```

I like the idea of flattening the else if.


- Adam


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


On March 8, 2015, 5:54 p.m., Till Toenshoff wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/31838/
> -----------------------------------------------------------
> 
> (Updated March 8, 2015, 5:54 p.m.)
> 
> 
> Review request for mesos, Adam B, Alexander Rojas, Joerg Schad, and Vinod Kone.
> 
> 
> Bugs: MESOS-2464
>     https://issues.apache.org/jira/browse/MESOS-2464
> 
> 
> Repository: mesos-incubating
> 
> 
> Description
> -------
> 
> see summary.
> 
> 
> Diffs
> -----
> 
>   src/slave/slave.cpp 364d911 
> 
> Diff: https://reviews.apache.org/r/31838/diff/
> 
> 
> Testing
> -------
> 
> make check && functional testing with failed authentication
> 
> 
> Thanks,
> 
> Till Toenshoff
> 
>


Re: Review Request 31838: Fixed authentication failure triggered slave crash.

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

Ship it!



src/slave/slave.cpp
<https://reviews.apache.org/r/31838/#comment124010>

    Does it make sense to flatten this for readability? Like this:
    ```
    } else if (info.has_id()) {
    ...
    } else {
    ...
    }
    ```


- Alexander Rukletsov


On March 9, 2015, 12:54 a.m., Till Toenshoff wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/31838/
> -----------------------------------------------------------
> 
> (Updated March 9, 2015, 12:54 a.m.)
> 
> 
> Review request for mesos, Adam B, Alexander Rojas, Joerg Schad, and Vinod Kone.
> 
> 
> Bugs: MESOS-2464
>     https://issues.apache.org/jira/browse/MESOS-2464
> 
> 
> Repository: mesos-incubating
> 
> 
> Description
> -------
> 
> see summary.
> 
> 
> Diffs
> -----
> 
>   src/slave/slave.cpp 364d911 
> 
> Diff: https://reviews.apache.org/r/31838/diff/
> 
> 
> Testing
> -------
> 
> make check && functional testing with failed authentication
> 
> 
> Thanks,
> 
> Till Toenshoff
> 
>


Re: Review Request 31838: Fixed authentication failure triggered slave crash.

Posted by Alexander Rojas <al...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/31838/#review75689
-----------------------------------------------------------


LGTM

- Alexander Rojas


On March 9, 2015, 1:54 a.m., Till Toenshoff wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/31838/
> -----------------------------------------------------------
> 
> (Updated March 9, 2015, 1:54 a.m.)
> 
> 
> Review request for mesos, Adam B, Alexander Rojas, Joerg Schad, and Vinod Kone.
> 
> 
> Bugs: MESOS-2464
>     https://issues.apache.org/jira/browse/MESOS-2464
> 
> 
> Repository: mesos-incubating
> 
> 
> Description
> -------
> 
> see summary.
> 
> 
> Diffs
> -----
> 
>   src/slave/slave.cpp 364d911 
> 
> Diff: https://reviews.apache.org/r/31838/diff/
> 
> 
> Testing
> -------
> 
> make check && functional testing with failed authentication
> 
> 
> Thanks,
> 
> Till Toenshoff
> 
>


Re: Review Request 31838: Fixed authentication failure triggered slave crash.

Posted by Joerg Schad <jo...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/31838/#review83377
-----------------------------------------------------------


is this review still active?

- Joerg Schad


On March 9, 2015, 12:54 a.m., Till Toenshoff wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/31838/
> -----------------------------------------------------------
> 
> (Updated March 9, 2015, 12:54 a.m.)
> 
> 
> Review request for mesos, Adam B, Alexander Rojas, Joerg Schad, and Vinod Kone.
> 
> 
> Bugs: MESOS-2464
>     https://issues.apache.org/jira/browse/MESOS-2464
> 
> 
> Repository: mesos-incubating
> 
> 
> Description
> -------
> 
> see summary.
> 
> 
> Diffs
> -----
> 
>   src/slave/slave.cpp 364d911 
> 
> Diff: https://reviews.apache.org/r/31838/diff/
> 
> 
> Testing
> -------
> 
> make check && functional testing with failed authentication
> 
> 
> Thanks,
> 
> Till Toenshoff
> 
>


Re: Review Request 31838: Fixed authentication failure triggered slave crash.

Posted by Mesos ReviewBot <de...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/31838/#review75647
-----------------------------------------------------------


Patch looks great!

Reviews applied: [31838]

All tests passed.

- Mesos ReviewBot


On March 9, 2015, 12:54 a.m., Till Toenshoff wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/31838/
> -----------------------------------------------------------
> 
> (Updated March 9, 2015, 12:54 a.m.)
> 
> 
> Review request for mesos, Adam B, Alexander Rojas, Joerg Schad, and Vinod Kone.
> 
> 
> Bugs: MESOS-2464
>     https://issues.apache.org/jira/browse/MESOS-2464
> 
> 
> Repository: mesos-incubating
> 
> 
> Description
> -------
> 
> see summary.
> 
> 
> Diffs
> -----
> 
>   src/slave/slave.cpp 364d911 
> 
> Diff: https://reviews.apache.org/r/31838/diff/
> 
> 
> Testing
> -------
> 
> make check && functional testing with failed authentication
> 
> 
> Thanks,
> 
> Till Toenshoff
> 
>


Re: Review Request 31838: Fixed authentication failure triggered slave crash.

Posted by Adam B <ad...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/31838/#review88636
-----------------------------------------------------------

Ship it!


LGTM, although I agree with Alex that you could clean up the if/else-if/else formatting. I could do it before committing, or you could.

- Adam B


On March 8, 2015, 5:54 p.m., Till Toenshoff wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/31838/
> -----------------------------------------------------------
> 
> (Updated March 8, 2015, 5:54 p.m.)
> 
> 
> Review request for mesos, Adam B, Alexander Rojas, Joerg Schad, and Vinod Kone.
> 
> 
> Bugs: MESOS-2464
>     https://issues.apache.org/jira/browse/MESOS-2464
> 
> 
> Repository: mesos-incubating
> 
> 
> Description
> -------
> 
> see summary.
> 
> 
> Diffs
> -----
> 
>   src/slave/slave.cpp 364d911 
> 
> Diff: https://reviews.apache.org/r/31838/diff/
> 
> 
> Testing
> -------
> 
> make check && functional testing with failed authentication
> 
> 
> Thanks,
> 
> Till Toenshoff
> 
>


Re: Review Request 31838: Fixed authentication failure triggered slave crash.

Posted by Joerg Schad <jo...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/31838/#review75674
-----------------------------------------------------------


lgtm, are there other places where we might encounter this problematic behavior?

- Joerg Schad


On March 9, 2015, 12:54 a.m., Till Toenshoff wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/31838/
> -----------------------------------------------------------
> 
> (Updated March 9, 2015, 12:54 a.m.)
> 
> 
> Review request for mesos, Adam B, Alexander Rojas, Joerg Schad, and Vinod Kone.
> 
> 
> Bugs: MESOS-2464
>     https://issues.apache.org/jira/browse/MESOS-2464
> 
> 
> Repository: mesos-incubating
> 
> 
> Description
> -------
> 
> see summary.
> 
> 
> Diffs
> -----
> 
>   src/slave/slave.cpp 364d911 
> 
> Diff: https://reviews.apache.org/r/31838/diff/
> 
> 
> Testing
> -------
> 
> make check && functional testing with failed authentication
> 
> 
> Thanks,
> 
> Till Toenshoff
> 
>


Re: Review Request 31838: Fixed authentication failure triggered slave crash.

Posted by Adam B <ad...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/31838/#review75666
-----------------------------------------------------------


Looks like a good fix. Any chance you can fashion a test or two for this behavior?

- Adam B


On March 8, 2015, 5:54 p.m., Till Toenshoff wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/31838/
> -----------------------------------------------------------
> 
> (Updated March 8, 2015, 5:54 p.m.)
> 
> 
> Review request for mesos, Adam B, Alexander Rojas, Joerg Schad, and Vinod Kone.
> 
> 
> Bugs: MESOS-2464
>     https://issues.apache.org/jira/browse/MESOS-2464
> 
> 
> Repository: mesos-incubating
> 
> 
> Description
> -------
> 
> see summary.
> 
> 
> Diffs
> -----
> 
>   src/slave/slave.cpp 364d911 
> 
> Diff: https://reviews.apache.org/r/31838/diff/
> 
> 
> Testing
> -------
> 
> make check && functional testing with failed authentication
> 
> 
> Thanks,
> 
> Till Toenshoff
> 
>