Skip to content
This repository was archived by the owner on Feb 8, 2021. It is now read-only.

Conversation

@gnawux
Copy link
Member

@gnawux gnawux commented Mar 22, 2017

for the issue hyperhq/hyperd#566

Signed-off-by: Wang Xu gnawux@gmail.com

@gnawux
Copy link
Member Author

gnawux commented Mar 22, 2017

service will fail

[CNL] call hyper_exec_cmd, json {"container":"hyperstart","process":{"id":"hyperstart-exec-RGxIYXHFtM","terminal":false,"stdio":1,"stderr":2,"args":["ipvsadm","-Ln"],"workdir":"/"}}, len 149

it run outside of the container....

@gnawux
Copy link
Member Author

gnawux commented Mar 22, 2017

passed, however, not as small as expected.

@gnawux
Copy link
Member Author

gnawux commented Mar 23, 2017

gnawux@shutup:~/Workspace/src/github.com/hyperhq/hyperd$ sudo ./hyperctl run -t gcr.io/google_containers/busybox:1.24 sh -c 'echo hello'
hello
gnawux@shutup:~/Workspace/src/github.com/hyperhq/hyperd$

it works

for the issue hyperhq/hyperd#566

Signed-off-by: Wang Xu <gnawux@gmail.com>
int i, ret = 0;
struct env *env;
if (setPATH) {
ret = setenv("PATH", "/usr/local/bin:/usr/bin:/bin:.", 1);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we also need /sbin and /usr/sbin?

Copy link
Member Author

@gnawux gnawux Mar 23, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a good question, if the user is root, it's better to include them, otherwise sbin shouldn't be here. The problem is it is not easy to know who is the user at this position. That's part of what I said it is not as simple as I thought.

Copy link
Contributor

@gao-feng gao-feng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@gao-feng gao-feng merged commit 4032903 into hyperhq:master Mar 23, 2017
@gnawux gnawux deleted the default_PATH branch March 23, 2017 04:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants