Open chengwang86 opened 7 years ago
For the container "mcrouter", if I do "docker inspect mcrouter" on regular docker, it shows:
"Path": "mcrouter",
"Args": [
"--config-str={\"pools\":{\"A\":{\"servers\":[\"mcd1:11211\"]}},\"route\":\"PoolRoute|A\"}",
"-p",
"5000"
],
... ...
"Config": {
... ...
"Cmd": [
"mcrouter",
"--config-str={\"pools\":{\"A\":{\"servers\":[\"mcd1:11211\"]}},\"route\":\"PoolRoute|A\"}",
"-p",
"5000"
],
However, on vic, it shows:
"Path": "mcrouter",
"Args": [
"--config-str={\"pools\":{\"A\":{\"servers\":[\"mcd1:11211\"]}},\"route\":\"PoolRoute",
"A\"}",
"-p"
],
... ...
"Config": {
... ...
"Cmd": [
"mcrouter",
"--config-str={\"pools\":{\"A\":{\"servers\":[\"mcd1:11211\"]}},\"route\":\"PoolRoute|A\"}",
"-p",
"5000"
],
So the "Args" is not resolved correctly on vic due to the special character "|".
Agree with @hmahmood that this is a bug - it derives from the usage of clear text arguments in guestinfo and the need for a separator character. I believe @caglar10ur had tried using other characters for argument separation but don't recall the end result. Regardless we need to be able to handle almost arbitrary arguments so switching to an encoded form may be needed - would degrade diagnostics ability a little, but args are sensitive so are no logged except at high debug levels anyway.
Bumping to medium as it might be rare, but it's hard to justify and going to cause consternation in use given it's leaking a very internal implementation detail.
I tried using unicode characters (like unicode dot, pi sign etc.) thinking that they won't collide with daily usage but learned that guestinfo keys can be ASCII only.
Suggest adding a mime type prefix or similar with text/plain
being the default, and adding support for an encoding such as application/base64
for strings that guestinfo cannot support.
It's hard to justify this as a "must fix" for 1.2, but given that there's no workaround, this could be the cause of a significant limitation for some customers. @hickeng is it time we revisited this?
VIC version: 0.8
Deployment details:
What was the vic-machine create command used to deploy the VCH?
bin/vic-machine-linux create --name vch-test --target=root:pwd@192.168.60.162 --no-tlsverify --no-tls --appliance-memory 4096 --thumbprint=…
Steps to reproduce:
I got this issue when I tried to deploy a memcached container and a mcrouter container. There is a special character "|" in the command line argument of the mcrouter container.
Actual behavior: After step 3, the output is:
Expected behavior:
Logs:
container-logs.zip
Additional comment:
An easier way to reproduce it is to run
docker run -it busybox echo "A|B"
On vic it outputs "A" whereas it outputs "A|B" on regular docker.