-
Notifications
You must be signed in to change notification settings - Fork 37
Conversation
Signed-off-by: Nathaniel Clark <nclark@whamcloud.com>
Let's use #2294 instead |
Signed-off-by: Nathaniel Clark <nclark@whamcloud.com>
docker/iml-cli-proxy.sh
Outdated
|
||
docker exec -i $TTYOPT iml_iml-manager-cli.1.$trailer iml "${@:1}" | ||
docker exec -i $TTYOPT $ENVOPT iml_iml-manager-cli.1.$trailer /usr/bin/iml "${@:1}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to specify full path here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It fixes the quote munging inside docker.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just trying this change out, I'm getting some odd behavior. iml to /usr/bin/iml gave me a "relative URL without a base" error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might be missing something, but #2294 removes the other path entirely.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to do what you want here, you need docker exec -w /usr/bin -i ... iml ${@:1}"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess the explicit full path for iml isn't required, but it doesn't hurt.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I run it by hand, it fails. So yes, it does.
Co-authored-by: Joe Grund <jgrund@whamcloud.io>
ENVOPT="" | ||
if [ -n "$RUST_LOG" ]; then | ||
ENVOPT="-e RUST_LOG=$RUST_LOG" | ||
fi | ||
|
||
docker exec -i $TTYOPT iml_iml-manager-cli.1.$trailer iml "${@:1}" | ||
docker exec -i $TTYOPT $ENVOPT iml_iml-manager-cli.1.$trailer iml "${@:1}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit.
Since we use bash anyway, to avoid any chance for problem with spaces:
ENVOPTS=()
if [ -n "$RUST_LOG" ]; then
ENVOPTS+=( -e "RUST_LOG=$RUST_LOG" )
fi
docker exec -i $TTYOPT "${ENVOPTS[@]}" iml_iml-manager-cli.1.$trailer iml "${@:1}"
Could also construct the entire docker command this way.
iml-cli-proxy: calling direct prevents argument expansion
This also adds pathrough for RUST_LOG variable
Signed-off-by: Nathaniel Clark nclark@whamcloud.com
This change is