-
Notifications
You must be signed in to change notification settings - Fork 181
sudo wrapper is failing when vagrant started from test-kitchen #281
Comments
@AlexeyDemidov I don't have access to a Mint machine down here, are you aware of a Vagrant VBox Mint box that I can use to try debugging this issue? If you don't, would you be able to try using test-kitchen from an Ubuntu machine to check if it works? Thanks in advance. |
@fgrehm I have finally got time to debug this issue and resolved it. I have replaced call to sudo_wrapper.run("which", "lxc-create") with plain old puts |
@AlexeyDemidov you can get the commands stdout and stderr by setting |
@jefmathiot yeah, missed that somehow, even my own console output above contains suggestion to set VAGRANT_LOG=DEBUG for further information. |
:) |
I found that sudo_wrapper tries to run the command adding the wrapper_path: class SudoWrapper
#...
def run(*command)
options = command.last.is_a?(Hash) ? command.last : {}
command.unshift @wrapper_path if @wrapper_path && !options[:no_wrapper]
execute *(['sudo'] + command)
end
# run execute(["sudo", "/usr/local/bin/vagrant-lxc-wrapper-1.0.0.alpha.2", "which", "lxc-create"])
Test in Ubuntu 12.04.4, lxc 1.0.3-0ubuntu2, vagrant 1.6.2 and vagrant-lxc 1.0.0.alpha.2. The version vagrant-lxc 1.0.0.alpha.1 works fine. |
Ok, so it seems that the original issue @AlexeyDemidov reported was solved. I've added a link to this issue on our Troubleshooting wiki so that other users can find it easier on the future. @morrizon would you mind opening up a new issue so that we can keep a better track of your problem if it is still an issue for you? I've been using alpha2 with the sudoers file without problems for a while now. Thanks in advance |
I'm trying to use LXC to run test-kitchen. When I use following .kitchen.yml
kitchen-converge fails with following output
I can successfully run 'sudo which lxc-create`, I have changed my user to 'NOPASSWD' in /etc/sudoers. If I run 'vagrant up' in .kitchen/kitchen-vagrant/default-ubuntu-1204 VM starts normally, I can 'vagrant ssh' into it and can see it running with 'lxc-ls' on host system.
I have tried to dive into code and commented out temporarily ensure_lxc_installed! call in lib/vagrant-lxc/provider.rb. 'kitchen converget' failed with following message:
Environment: Linux Mint 16, kernel 3.11.0-20, vagrant 1.5.4, vagrant-lxc 0.8, test-kitchen 1.2.1, lxc 1.0.0~alpha1-0ubuntu14.1, sudo 1.8.6p3-0ubuntu3.1
Output of
kitchen diagnose --all
https://gist.github.com/AlexeyDemidov/11544964The text was updated successfully, but these errors were encountered: