Pass ttrpc address to shim via env

Because of the way go handles flags, passing a flag that is not defined
will cause an error. In our case, if we kept this as a flag, then
third-party shims would break when they see this new flag.  To fix this,
I moved this new configuration option to an env var.  We should use env
vars from here on out to avoid breaking shim compat.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby
2019-08-22 18:48:51 +00:00
parent 1be6ee5396
commit 6cf031e1e4
4 changed files with 13 additions and 8 deletions

View File

@@ -119,7 +119,6 @@ func newCommand(ctx context.Context, id, containerdBinary, containerdAddress, co
"-namespace", ns,
"-id", id,
"-address", containerdAddress,
"-ttrpc-address", containerdTTRPCAddress,
}
cmd := exec.Command(self, args...)
cmd.Dir = cwd

View File

@@ -135,7 +135,6 @@ func newCommand(ctx context.Context, id, containerdBinary, containerdAddress, co
"-namespace", ns,
"-id", id,
"-address", containerdAddress,
"-ttrpc-address", containerdTTRPCAddress,
}
cmd := exec.Command(self, args...)
cmd.Dir = cwd