Skip to content
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

Pod exec issue #68

Open
patriceckhart opened this issue Jun 22, 2020 · 2 comments
Open

Pod exec issue #68

patriceckhart opened this issue Jun 22, 2020 · 2 comments

Comments

@patriceckhart
Copy link
Contributor

This command don't work

$exec = $client->pods()->exec($pods[$i], [
                        'command' => ['updateneos </dev/null &>/dev/null &'],
                        'stdout'  => true,
                        'stderr'  => true,
                    ]);

this works fine, but the command should be executed in the background an I need </dev/null &>/dev/null &

$exec = $client->pods()->exec($pods[$i], [
                        'command' => ['updateneos'],
                        'stdout'  => true,
                        'stderr'  => true,
                    ]);

How can I do that?

@maclof
Copy link
Owner

maclof commented Jun 22, 2020

The command parameter should be an array of elements without any spaces, not an array with a single element that has spaces.

Try splitting it up like so:

'command' => [
'updateneos',
'</dev/null',
'&>/dev/null',
'&',
],

I do not know if a command like this will work how you expect though

@patriceckhart
Copy link
Contributor Author

The problem is that the commands that follow are only executed when updateneos is ready. updateneos takes a long time and the browser timed out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants