> On Feb. 14, 2016, 8:42 a.m., Timothy Chen wrote: > > src/tests/containerizer/docker_tests.cpp, lines 506-507 > > <https://reviews.apache.org/r/43293/diff/2/?file=1237051#file1237051line506> > > > > Is this even a valid docker inspect output? > > In what situations will we get this? > > Guangya Liu wrote: > Yes, there might be such output if the end user input some invalid env > vars. > > root@mesos002:/home/gyliu# docker run -it -e env1=xxx -e env1=xxx -e > env1+xx ubuntu:14.04 /bin/bash > root@84330a72f8b4:/# > > root@mesos002:/home/gyliu# docker inspect 84330a72f8b4 | grep env1 > "env1=xxx", > "env1=xxx", > "env1+xx"
I see, so if user manually create a container with bad -e docker doesn't filter them. But how does a user get invalid input with Mesos? We don't allow arbitrary docker runs, so can a docker image has invalid env vars? - Timothy ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/43293/#review119173 ----------------------------------------------------------- On Feb. 7, 2016, 9:40 a.m., Guangya Liu wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/43293/ > ----------------------------------------------------------- > > (Updated Feb. 7, 2016, 9:40 a.m.) > > > Review request for mesos, haosdent huang, Jie Yu, and Timothy Chen. > > > Bugs: MESOS-4607 > https://issues.apache.org/jira/browse/MESOS-4607 > > > Repository: mesos > > > Description > ------- > > Ignored invalid env vars when creating docker image. > > > Diffs > ----- > > src/docker/docker.cpp 52728707d985517e57525af7e470ccb468039373 > src/tests/containerizer/docker_tests.cpp > 620819330847a10d9dcd817968df9d2b180a9a29 > > Diff: https://reviews.apache.org/r/43293/diff/ > > > Testing > ------- > > make > make check > > $ GLOG_v=2 ./bin/mesos-tests.sh > --gtest_filter="DockerImageTest.ParseInspectonImage" --verbose > [==========] Running 1 test from 1 test case. > [----------] Global test environment set-up. > [----------] 1 test from DockerImageTest > [ RUN ] DockerImageTest.ParseInspectonImage > I0207 10:30:01.894125 2034615040 process.cpp:2489] Spawned process > [email protected]:49551 > I0207 10:30:01.894136 211529728 process.cpp:2499] Resuming > [email protected]:49551 at 2016-02-07 02:30:01.894163968+00:00 > I0207 10:30:01.894317 210456576 process.cpp:2499] Resuming > [email protected]:49551 at 2016-02-07 02:30:01.894332928+00:00 > I0207 10:30:01.898862 2034615040 docker.cpp:397] Skipping duplicate > environment variable 'JAVA_VERSION' > I0207 10:30:01.898892 2034615040 docker.cpp:390] Skipping invalid environment > variable 'JAVA_VERSION+8u66' for 'ContainerConfig.Env' > I0207 10:30:01.899473 209920000 process.cpp:2499] Resuming > AuthenticationRouter(1)@192.168.0.100:49551 at 2016-02-07 > 02:30:01.899522048+00:00 > I0207 10:30:01.899983 213139456 process.cpp:2499] Resuming > [email protected]:49551 at 2016-02-07 02:30:01.900000000+00:00 > I0207 10:30:01.900032 213139456 process.cpp:2604] Cleaning up > [email protected]:49551 > I0207 10:30:01.900244 211529728 process.cpp:2499] Resuming > [email protected]:49551 at 2016-02-07 02:30:01.900256000+00:00 > [ OK ] DockerImageTest.ParseInspectonImage (8 ms) > [----------] 1 test from DockerImageTest (8 ms total) > > [----------] Global test environment tear-down > [==========] 1 test from 1 test case ran. (18 ms total) > [ PASSED ] 1 test. > > > Thanks, > > Guangya Liu > >
