You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice if when clicking the 'exec' button on a task, instead of offering the last command entered as a default, allow the job to provide a default command.
Many modern containers don't contain bash and sometimes don't contain sh, it can be very confusing for an operator trying to 'exec' into a task without having full knowledge of that container.
In this proposal, we add a new parameter default_exec_command to the task:
When trying to 'exec' into the task via the web us, the command 'bash' would be auto filled in the popup:
The Nomad operator, by default, would be able to change the command(as is the case now) before entering the container, however a second parameter 'exec_command_can_not_be_changed=yes' could be set that would make the parameter read-only. In other words, if this second parameter is set, the Nomad operator running 'exec' would have no choice but to execute the command exactly as provided by the Nomad job definition.
Use-cases
Task uses docker without bash or sh, job writer wants to provide the executable path to the Nomad operator
Nomad Operator has limited access to Nomad and needs to be able to execute an interactive action. Since the action stanza doesn't allow for interactions, the job writer could set the 'default_exec_command' and 'exec_command_can_not_be_changed' parameters and give that operator the ability to gain access to the container in a limited fashion
Faster access to containers, often times when accessing a task I'll accept the default command forgetting that the container I am accessing might not have bash.
Attempted Solutions
Not really any attempted solutions, it's just manual steps that humans have to do each time an allocation's task is access through the 'exec' command.
The text was updated successfully, but these errors were encountered:
Hey, this is a neat idea. I wonder if the task level is the right place to put this, though. Jobspecs can get lengthy and are stored in raft and therefore replicated / adding more information there can cause slow-downs.
What if this were an agent config, or a user setting, settable via the UI?
Is this the sort of default you'd also expect when running nomad alloc exec via the CLI, or just in the web UI?
What if this were an agent config, or a user setting, settable via the UI?
The default command is likely to vary across tasks, especially with docker driver tasks (or similar image-isolated task drivers) where the Docker image determines whether a given shell or command is available.
Proposal
It would be nice if when clicking the 'exec' button on a task, instead of offering the last command entered as a default, allow the job to provide a default command.
Many modern containers don't contain bash and sometimes don't contain sh, it can be very confusing for an operator trying to 'exec' into a task without having full knowledge of that container.
In this proposal, we add a new parameter default_exec_command to the task:
When trying to 'exec' into the task via the web us, the command 'bash' would be auto filled in the popup:
The Nomad operator, by default, would be able to change the command(as is the case now) before entering the container, however a second parameter 'exec_command_can_not_be_changed=yes' could be set that would make the parameter read-only. In other words, if this second parameter is set, the Nomad operator running 'exec' would have no choice but to execute the command exactly as provided by the Nomad job definition.
Use-cases
Attempted Solutions
Not really any attempted solutions, it's just manual steps that humans have to do each time an allocation's task is access through the 'exec' command.
The text was updated successfully, but these errors were encountered: