-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid environment variables, rkt volume with dash or underscore in task name #2358
Comments
My plan is to just escape underscores with dashes in rkt volume names since we just need a task unique name. A safer approach would be to hash+base32 task names in volumes as the volume name just needs to be unique, but I'd really like to make the names human readable if possible. |
#2416 should enforce env var name compliance with the standard. |
I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues. |
If
$TASK0
is set tolog-ingester
,rkt run
will fail for the second (othertask
) task because Nomad attempts to set the environment variableNOMAD_ADDR_log-ingester_api
, and the-
is not a valid environment variable name, per the ACI spec (IEEE Std 1003.1-2001).If
$TASK0
is set tolog_ingester
(trying to work around the above problem),rkt run
will fail for the first (log_ingester
/$TASK0
) task because Nomad creates invalid volume names for the local, alloc, and secret directories:ACName must be
^[a-z0-9]+([-][a-z0-9]+)*$
The workaround for both of these is to make the task name match
^[a-z0-9]+$
. The 2nd issue is obviously rkt-specific, but unless the Docker driver does something different about the environment variables, they're of limited use with bash, for example.The text was updated successfully, but these errors were encountered: