Open tdooner opened 9 years ago
Agree, If you get any quick resolution for the same, please post it. This is deal breaker for us.
Agree with the second point too, put arguments as part of Task ID value is useless.
@Saurabh2004in I'm hacking around it by simply not using the arguments
array, and instead putting them as part of the command, e.g.:
"shell": true, // (the default)
"command": "cat /etc/passwd"
However, this breaks when your Docker image has a custom entrypoint. In that case, I have no good resolution.
@tdooner @Saurabh2004in arguments should be used when you use entrypoint in your docker container.
Arguments are also incredibly useful when you want to avoid having a shell as pid1 inside your container (making it difficult to respond to signals). Seems the default is to run sh -c '{command}'
. We're currently working around with command: "exec dumb-init ..."
but this is non-ideal...
Has anyone found a workaround for the cases where I need to pass the arguments to the Docker entrypoint?
@pbnsilva I think most people are just calling the real entrypoint via bash as a temporary workaround.
I'm using @tdooner's solution:
"shell": true, // (the default)
"command": "cat /etc/passwd"
The problem is that Chronos concatenates job arguments with space in Mesos task ID, which is not allowed. To workaround the issue, you can change the taskIdTemplate
in src/main/scala/org/apache/mesos/chronos/scheduler/jobs/TaskUtils.scala
to discard arguments in the task ID.
The
TaskUtils.getTaskId
method adds the values of the arguments array to the end of the task ID.This makes for more-readable IDs in the case of common arguments like
-v
, but Mesos considers/
to be an invalid character in Task ID. This prevents me from a job configuration like:Mesos master (0.23.0) logs the following:
In my opinion, Chronos should either:
Since I don't see the benefit from adding the arguments, and the arguments can be quite long, I would prefer the second option. But whatever, I'd be happy with simply being able to use slashes in the arguments array. Thanks.