Yan Xu created MESOS-3511:
-----------------------------
Summary: Generalize fetcher to handle container image fetching
Key: MESOS-3511
URL: https://issues.apache.org/jira/browse/MESOS-3511
Project: Mesos
Issue Type: Task
Components: containerization
Reporter: Yan Xu
Currently the fetcher is designed specifically for fetching the executor.
Through some parameter hacking like below we can make it work for the
provisioner code.
{noformat:title=}
// Use the random staging name for the containerId
ContainerID containerId;
containerId.set_value(os::basename(stage).get());
// Disable caching because this is effectively done by the store.
CommandInfo::URI uri_;
uri_.set_value(uri);
uri_.set_extract(false);
uri_.set_cache(false);
CommandInfo commandInfo;
commandInfo.add_uris()->CopyFrom(uri_);
// The slaveId is only used for caching, which we disable, so just
// use "store" for it.
SlaveID slaveId;
slaveId.set_value("store");
return fetcher->fetch(
containerId,
commandInfo,
stage,
None(),
slaveId,
flags)
...
{noformat}
It would be great if we don't have to do this. We can add another fetcher
method for image fetching.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)