- edited description
force_pull_image option doesn't works
Hi. Looks like force_pull_image option doesn't work.
# Force the pull of container image before starting it. If set to False, will pull image
# only if image is not present in slave host.
force_pull_image: True
I have checked it on mesos 1.3.0 and 1.5.0 versions, but no luck. How to repeat.
-
Pull some image from docker-hub (like alpine)
-
Push it to private docker images registry (https://github.com/vmware/harbor) with some tag, like 0.1.
-
Run job with it image, it will be cached on slave node.
-
Make changes, like add new files and push it to docker registry with the same label (0.1).
-
Run job on node with this cached image. Slave doesn't pull updated image from registry it will use cached one.
Comments (10)
-
reporter -
repo owner Used to work. Will have to check mesos interface modifications. By default, mesos doesn't pull image if already present. This flag asks mesos to force the pull (at least it should) in offer accept
-
reporter https://github.com/apache/mesos/blob/master/include/mesos/mesos.proto
Looks like it there line 2737
// With this flag set to false, the mesos containerizer will pull // the docker/appc image from the registry even if the image is // already downloaded on the agent. optional bool cached = 4 [default = true];
Need to add it there for mesos containerizer:
if self.cfg['mesos']['unified']: # Host mode only for the moment # => no port mapping or possible conflict # Need Calico or equivalent to have per task IP and network isolation # More doc: # https://github.com/projectcalico/calico-containers/blob/v0.19.0/README.md # http://mesos.apache.org/documentation/latest/networking-for-mesos-managed-containers/ task['command']['shell'] = True docker = { 'image': { 'type': 'DOCKER', 'docker': {'name': job['container']['image']} } }
-
repo owner Just had a look at code, and force is set only in docker containerizer,not unified cont. Will need to update this in mesos plugin
-
repo owner In mesos.py at unified test should update code like
task['command']['shell'] = True docker = { 'image': { 'type': 'DOCKER', 'docker': {'name': job['container']['image']} } }
If self.cfg['mesos']['force_pull_image']: docker['image']['cached'] = False
Le ven. 2 mars 2018 13:04, olivier sallou olivier.sallou@gmail.com a écrit :
[image: xriser] xriser commented on issue
#69: force_pull_image option doesn't works https://bitbucket.org/osallou/go-docker/issues/69/force_pull_image-option-doesnt-workshttps://github.com/apache/mesos/blob/master/include/mesos/mesos.proto
Looks like it there line 2737
// With this flag set to false, the mesos containerizer will pull // the docker/appc image from the registry even if the image is // already downloaded on the agent. optional bool cached = 4 [default = true];
View this issue https://bitbucket.org/osallou/go-docker/issues/69/force_pull_image-option-doesnt-works or add a comment by replying to this email. Unsubscribe from issue emails https://bitbucket.org/api/1.0/repositories/osallou/go-docker/issue/69/unsubscribe/osallou/c625acce8dc81dc9bae9eacea7771225abcd2af7/ for this repository. [image: Bitbucket] https://bitbucket.org
-
reporter yes, that's it. Now works.
Thank you!
-
repo owner As i can't access my compute machine, would you mind doing a PR on branch develop for this specific bug?
Thanks
-
reporter PR on branch develop for this specific bug?
have done
-
repo owner Thanks, will check and merge soon
-
repo owner - changed status to closed
Merged in xriser/go-docker/xriser/add-mesos-containerizer-force-pull-image-1519995209936 (pull request #1), closes
#69add mesos containerizer force pull image option
→ <<cset 5e9c7908ad57>>
- Log in to comment