----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/52827/#review152721 -----------------------------------------------------------
Fix it, then Ship it! Can you follow up with a test to test roll forward and backward case? src/slave/containerizer/mesos/provisioner/docker/metadata_manager.cpp (lines 178 - 188) <https://reviews.apache.org/r/52827/#comment221820> I realized that that is not necessary. In 'recover', we did the same thing. We won't save the mapping if some layers are missing. - Jie Yu On Oct. 14, 2016, 3:36 p.m., Qian Zhang wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/52827/ > ----------------------------------------------------------- > > (Updated Oct. 14, 2016, 3:36 p.m.) > > > Review request for mesos and Jie Yu. > > > Bugs: MESOS-6360 > https://issues.apache.org/jira/browse/MESOS-6360 > > > Repository: mesos > > > Description > ------- > > Previously image layer rootfs path is in the format below regardless > of which backend is used. > <image_store_dir>/layers/<layer_id>/rootfs > This introduced an issue: when agent is restarted with a different > backend, we will wrongly handle the whiteout files since different > backends(e.g., aufs and overlay) have different whiteout standard. > > In this commit, we added backend suffix to image layer rootfs path > for overlay backend like below. > <image_store_dir>/layers/<layer_id>/rootfs.overlay > For non-overlay backends, it is still in the previous format, this > is because they share the same whiteout standard (aufs standard), > and also used to handle backward compatibility. > > So the expected result of this commit is: > 1. If user switches backend from overlay to a non-overlay (or vice > versa) when restarting agent, all the image layers of the previous > backend in the store will just be ignored. > 2. In the upgrade case, if user starts a new version of Mesos agent > with overlay backend, then all the image layers in the store pulled > by the old agent will just be ignored, but if user starts the new > agent with a non-overlay backend, then all the image layers in the > store can still be used. > > > Diffs > ----- > > src/slave/containerizer/mesos/provisioner/docker/local_puller.cpp > 9b09dca5cd8f9e60a90cf574300b250eb18ede35 > src/slave/containerizer/mesos/provisioner/docker/metadata_manager.cpp > 6456d90220a4026696a04f9969763cf682464353 > src/slave/containerizer/mesos/provisioner/docker/paths.hpp > 949e0c16a361f22b00e267fcf81093690327041f > src/slave/containerizer/mesos/provisioner/docker/paths.cpp > a5cc952072274c61e8c515e8b1b7ea563344e950 > src/slave/containerizer/mesos/provisioner/docker/registry_puller.cpp > 1e2cc2dda3518d99ef1ad06e2b8ea7f78a4dcf72 > src/slave/containerizer/mesos/provisioner/docker/store.cpp > 52b9ea934a1dbe3312b8f08f5da8085e9e306de5 > src/tests/containerizer/provisioner_docker_tests.cpp > 10fbc4149ac2e7503ffe7f2746fbd0e14a2365b4 > > Diff: https://reviews.apache.org/r/52827/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Qian Zhang > >
