Pod exec issue
patriceckhart opened this issue · 2 comments
patriceckhart commented
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 commented
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 commented
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.