Closed gustavderdrache closed 8 years ago
Note that this change requires version 1.7.3 or newer of Vagrant.
Another common and cryptic error message from this issue is:
/sbin/ip -o -0 addr | grep -v LOOPBACK | awk '{print $2}' | sed 's/://'
Just adding it to improve this issue's search-ability.
@johnbburg full error:
==> default: Configuring and enabling network interfaces...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
/sbin/ip -o -0 addr | grep -v LOOPBACK | awk '{print $2}' | sed 's/://'
Stdout from the command:
Stderr from the command:
/var/tmp/sclmsonaB: line 8: -E: command not found
Seems it's just the same old sudo error from enabling software collections globally.
RedHat's
scl
scripts provide a wrapper script for thesudo
command that does not respect arguments, leading to situations like the following:Until the wrapper script is able to parse sudo flags, the solution is prevent Vagrant's SSH communicator plugin from passing flags to
sudo
when running commands. This PR addresses that by overridingconfig.ssh.sudo_command
withsudo %c
instead of the default, which issudo -E -k %c
(and the cause of the "line 8: -E" errors).