Я пытаюсь использовать LXC для запуска тестовой кухни. Когда я использую следующий .kitchen.yml
driver:
name: vagrant
provisioner:
name: chef_solo
platforms:
- name: ubuntu-12.04
driver:
box: precise-lxc
provider: lxc
кухня-конвергенция завершается со следующим выводом:
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: Failed to complete #create action: [Expected process to exit with [0], but received '1'
---- Begin output of vagrant up --no-provision --provider=lxc ----
STDOUT:
STDERR: The `lxc` package does not seem to be installed or is not accessible on the PATH.
---- End output of vagrant up --no-provision --provider=lxc ----
Ran vagrant up --no-provision --provider=lxc returned 1]
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running `kitchen diagnose --all` for configuration
Я могу успешно запустить sudo which lxc-create
, я изменил своего пользователя на «NOPASSWD» в /etc/sudoers. Если я запускаю vagrant up
в .kitchen/kitchen-vagrant/default-ubuntu-1204, виртуальная машина запускается нормально, я могу vagrant ssh
войти в нее и видеть, как она работает с lxc-ls
в хост-системе.
Я попытался погрузиться в код vagrant-lxc
и временно закомментировал вызов ensure_lxc_installed! в lib/vagrant-lxc/provider.rb. kitchen converge
не удалось со следующим сообщением:
-----> Starting Kitchen (v1.2.1)
-----> Creating <default-ubuntu-1204>...
Bringing machine 'default' up with 'lxc' provider...
==> default: HandleBoxUrl middleware is deprecated. Use HandleBox instead.
==> default: This is a bug with the provider. Please contact the creator
==> default: of the provider you use to fix this.
==> default: Importing base box 'precise-lxc'...
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: Failed to complete #create action: [Expected process to exit with [0], but received '1'
---- Begin output of vagrant up --no-provision --provider=lxc ----
STDOUT: Bringing machine 'default' up with 'lxc' provider...
==> default: HandleBoxUrl middleware is deprecated. Use HandleBox instead.
==> default: This is a bug with the provider. Please contact the creator
==> default: of the provider you use to fix this.
==> default: Importing base box 'precise-lxc'...
STDERR: There was an error executing ["sudo", "rm", "/usr/share/lxc/templates/lxc-vagrant-tmp-default-ubuntu-1204_default_1399314523513_48531"]
For more information on the failure, enable detailed logging by setting
the environment variable VAGRANT_LOG to DEBUG.
---- End output of vagrant up --no-provision --provider=lxc ----
Ran vagrant up --no-provision --provider=lxc returned 1]
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running `kitchen diagnose --all` for configuration
Окружающая обстановка:
- Linux Mint 16, ядро 3.11.0-20
- бродяга 1.5.4
- бродяга-lxc 0,8
- тестовая кухня 1.2.1
- lxc 1.0.0~alpha1-0ubuntu14.1
- судо 1.8.6p3-0ubuntu3.1
Вывод kitchen diagnose --all
https://gist.github.com/AlexeyDemidov/11544964