mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [mesos] asekretenko opened a new pull request #326: MESOS-6874: Validate the match between Type and *Infos in the ContainerInfo.
Date Mon, 18 Mar 2019 12:42:37 GMT
asekretenko opened a new pull request #326: MESOS-6874: Validate the match between Type and
*Infos in the ContainerInfo.
URL: https://github.com/apache/mesos/pull/326
 
 
   To avoid situations like described in [MESOS-6874](https://issues.apache.org/jira/browse/MESOS-6874),
I'm clarifying the validity criteria for the `ContainerInfo` protobuf and adding validation
of this protobuf into the ComposingContainerizer.
   
   There basically has been three ways to validate this protobuf:
   1. hardcoded check
   2. labelling all the *Infos with protobuf options and use some protobuf reflection
   3. require exact match between the Type enum members and the *Info fields, and use a bit
more reflection.
   
   Hardcoded check will not "scale well" in case more container types are added. Protobuf
options are not a good option in our case (mesos.proto constututes a part of an external interface
and adding an option there would require to register it globally). That's why I opted for
the third option.
   
   I'm also adding a test for this validation: passing ContainerInfo with Type==MESOS and
docker set should make the ComposingContainerizer fail.
   
   After adding this validation I discovered an invalid ContainerInfo used in the test DefaultExecutorWithDockerImageCommandHealthCheck.
This PR contains a fix for this test.
   
   Testing done:
   - run make check after adding the test only: test expectedly fails
   - run make check after adding validation code and fixing the problem with the health check
 test: tests pass.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message