Open laceth opened 6 years ago
I think this is a Vagrant version problem. The previous method to become root was marked as deprecated in a later version of Ansible, and we've been using Vagrant 2.X since which is probably why the error exists. We have requires Vagrant 1.8+, when Vagrant version we've been using recently have been Vagrant 2.x. Do an update and let me know if that fixes it and I'll update the README.md to reflect the correct version requirements.
I did the upgrade by installing Vagrant 2.0 over the exiting Vagrant 1.8 and got this error with triggers as seen below and did a vagrant plugin repair command:
root@test:~# dpkg -i vagrant_2.1.0_x86_64.deb (Reading database ... 152897 files and directories currently installed.) Preparing to unpack vagrant_2.1.0_x86_64.deb ... Unpacking vagrant (1:2.1.0) over (1:1.8.5) ... Setting up vagrant (1:2.1.0) ... root@test:~# vagrant version Vagrant failed to initialize at a very early stage:
The plugins failed to initialize correctly. This may be due to manual modifications made within the Vagrant home directory. Vagrant can attempt to automatically correct this issue by running:
vagrant plugin repair
If Vagrant was recently updated, this error may be due to incompatible versions of dependencies. To fix this problem please remove and re-install all plugins. Vagrant can attempt to do this automatically by running:
vagrant plugin expunge --reinstall
Or you may want to try updating the installed plugins to their latest versions:
vagrant plugin update
Error message given during initialization: Unable to resolve dependency: user requested 'vagrant-hostmanager (> 0)'
root@test:~# vagrant plugin repair
WARNING: Vagrant has detected the vagrant-triggers
plugin. This plugin conflicts
with the internal triggers implementation. Please uninstall the vagrant-triggers
plugin and run the command again if you wish to use the core trigger feature. To
uninstall the plugin, run the command shown below:
vagrant plugin uninstall vagrant-triggers
Note that the community plugin vagrant-triggers
and the core trigger feature
in Vagrant do not have compatible syntax.
To disable this warning, set the environment variable VAGRANT_USE_VAGRANT_TRIGGERS
.
Repairing currently installed plugins. This may take a few minutes...
Fetching: vagrant-hostmanager-1.8.8.gem (100%)
Fetching: bundler-1.16.1.gem (100%)
Fetching: vagrant-triggers-0.5.3.gem (100%)
Installed plugins successfully repaired!
root@test:~# vagrant version
WARNING: Vagrant has detected the vagrant-triggers
plugin. This plugin conflicts
with the internal triggers implementation. Please uninstall the vagrant-triggers
plugin and run the command again if you wish to use the core trigger feature. To
uninstall the plugin, run the command shown below:
vagrant plugin uninstall vagrant-triggers
Note that the community plugin vagrant-triggers
and the core trigger feature
in Vagrant do not have compatible syntax.
To disable this warning, set the environment variable VAGRANT_USE_VAGRANT_TRIGGERS
.
Installed Version: 2.1.0
Latest Version: 2.1.0
You're running an up-to-date version of Vagrant! root@test:~#
When I do vagrant up I get this error:
To disable this warning, set the environment variable VAGRANT_USE_VAGRANT_TRIGGERS
.
Bringing machine 'compute-01' up with 'virtualbox' provider...
Bringing machine 'controller-01' up with 'virtualbox' provider...
Bringing machine 'openstack-client' up with 'virtualbox' provider...
/opt/vagrant/embedded/gems/2.1.0/gems/vagrant-2.1.0/lib/vagrant/plugin/v2/config.rb:73:in method_missing': undefined method
before_triggers' for #fire_triggers' from /opt/vagrant/embedded/gems/2.1.0/gems/vagrant-2.1.0/lib/vagrant/machine.rb:164:in
action'
from /opt/vagrant/embedded/gems/2.1.0/gems/vagrant-2.1.0/lib/vagrant/batch_action.rb:82:in `block (2 levels) in run'
there seem to be trigger error issue using Vagrant 2.x ????
I then did vagrant uninstall plugin triggers then re-install them : vagrant install plugin triggers then set my environment variable to export VAGRANT_USE_VAGRANT_TRIGGERS=VAGRANT_USE_VAGRANT_TRIGGERS I no longer saw warning with trigger plugin when executing vagrant status or vagrant global-status or vagrant --version
However I get this error when doing vagrant up
root@test:~/vagrant-openstack# vagrant up --provider=virtualbox
Bringing machine 'compute-01' up with 'virtualbox' provider...
Bringing machine 'controller-01' up with 'virtualbox' provider...
Bringing machine 'openstack-client' up with 'virtualbox' provider...
/opt/vagrant/embedded/gems/2.1.0/gems/vagrant-2.1.0/lib/vagrant/plugin/v2/config.rb:73:in method_missing': undefined method
before_triggers' for #fire_triggers' from /opt/vagrant/embedded/gems/2.1.0/gems/vagrant-2.1.0/lib/vagrant/machine.rb:164:in
action'
from /opt/vagrant/embedded/gems/2.1.0/gems/vagrant-2.1.0/lib/vagrant/batch_action.rb:82:in `block (2 levels) in run'
ro
please advise thanks, still trying to get this working and need to for openstack testing and getting admin certification with vagrant/ansible deployment method.
velocity42/xenial64 box virtualbox 5.1.34_Ubuntu r 121010
vagrant_2.1.0_x86_64.deb vagrant --version = 2.1.0
root@test:~# lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04.4 LTS Release: 16.04 Codename: xenial
root@test:~/vagrant-openstack# ansible --version ansible 2.5.2 config file = /root/vagrant-openstack/ansible.cfg configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python2.7/dist-packages/ansible executable location = /usr/bin/ansible python version = 2.7.12 (default, Dec 4 2017, 14:50:18) [GCC 5.4.0 20160609]
Please use Vagrant version < 2.1.0 (preferably 2.0.4) - the current Vagrant file was not tested with a feature introduced in the version 2.1.0 that is
Integrate vagrant-triggers plugin functionality into core Vagrant [GH-9713]
Nice catch there. I'm currently using
openstack@vagrant:~$ vagrant --version Vagrant 2.0.2
I'm away until the end of the week to make any changes but please test a different version.
setup-hosts.log OK now currently it stuck at this playbook now and from the setup-hosts.log there an issue with pip version? see file attach. I also retried with Vagrant 2.0.4 and 2.0.2 by the way and got same results. Also what are the minimum requirements for this install with memory ? I had 6G machine and I've reduce controller-1 VM to 2096 and Compute to 1024 and client to 1024
TASK [runplaybooks : Run Setup Hosts Playbook] ***** fatal: [controller-01]: FAILED! => {"changed": true, "cmd": "openstack-ansible --forks 2 setup-hosts.yml > /vagrant/logs/setup-hosts.log", "delta": "0:07:43.746006", "end": "2018-05-07 09:03:21.284730", "msg": "non-zero return code", "rc": 2, "start": "2018-05-07 08:55:37.538724", "stderr": " [WARNING]: when statements should not include jinja2 templating delimiters\nsuch as {{ }} or {% %}. Found: {{ result.rc not in [0, 2] }}\n [WARNING]: when statements should not include jinja2 templating delimiters\nsuch as {{ }} or {% %}. Found: {{ result.rc not in [0, 2] }}", "stderr_lines": [" [WARNING]: when statements should not include jinja2 templating delimiters", "such as {{ }} or {% %}. Found: {{ result.rc not in [0, 2] }}", " [WARNING]: when statements should not include jinja2 templating delimiters", "such as {{ }} or {% %}. Found: {{ result.rc not in [0, 2] }}"], "stdout": "", "stdout_lines": []}
TASK [runplaybooks : Running openstack-ansible setup-hosts.yml] **** fatal: [controller-01]: FAILED! => {"changed": true, "cmd": "openstack-aml -v > /vagrant/logs/setup-hosts-fallback.log", "delta": "0:05:42.943345.480626", "msg": "non-zero return code", "rc": 2, "start": "2018-05-07 [WARNING]: when statements should not include jinja2 templating delimiteund: {{ result.rc not in [0, 2] }}\n [WARNING]: when statements should nelimiters\nsuch as {{ }} or {% %}. Found: {{ result.rc not in [0, 2] }}": when statements should not include jinja2 templating delimiters", "suc result.rc not in [0, 2] }}", " [WARNING]: when statements should not inters", "such as {{ }} or {% %}. Found: {{ result.rc not in [0, 2] }}"], []}
still persisting with this install . thanks guys for the help.
==> controller-01: mesg: ttyname failed: Inappropriate ioctl for device There are errors in the configuration of this machine. Please fix the following errors and try again:
ansible local provisioner:
I see in Vagrantfile provisioner point to ansible_local ??? So do I have to set this global variable on my host that is running vagrant up ?
I tried vagrant provision --provision-with ansible but still get error . On day 3 trying to get this installation working. thanks
velocity42/xenial64 box virtualbox 5.1.34_Ubuntu r 121010 vagrant 1.8.5 /vagrant_1.8.5_x86_64.deb root@test:~# lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04.4 LTS Release: 16.04 Codename: xenial
root@test:~/vagrant-openstack# ansible --version ansible 2.5.2 config file = /root/vagrant-openstack/ansible.cfg configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python2.7/dist-packages/ansible executable location = /usr/bin/ansible python version = 2.7.12 (default, Dec 4 2017, 14:50:18) [GCC 5.4.0 20160609]