hashicorp / hashicorp/nomad

nomad alloc exec options passing works incorrectly

Open
#12,922 7 comments 4 reactions 0 assignees View on GitHub
stage/accepted theme/cli type/bug
Dominant language
Go
Stars
17k
Forks
2.1k
Avg merge
1d 9h
Merged PRs (30d)
105

Description

With any container that has `ls`.
This works as expected:

`nomad alloc exec 6659bfac /bin/ls -l`

This prints _nomad help_ instead ls help:

`nomad alloc exec 6659bfac /bin/ls -h`

Expected behaviour: nomad should pass all options after container id to program.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the issue with `nomad alloc exec 6659bfac /bin/ls -l` and `nomad alloc exec 6659bfac /bin/ls -h`, then trace the `alloc exec` argument parsing entry point. The fix is done when options after the allocation ID are passed to the container program, so `/bin/ls -h` shows ls help rather than Nomad help.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.