Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Currently stuck with this error with provision ansible #30

Open
laceth opened this issue May 5, 2018 · 5 comments
Open

Currently stuck with this error with provision ansible #30

laceth opened this issue May 5, 2018 · 5 comments

Comments

@laceth
Copy link

laceth commented May 5, 2018

==> 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:

  • The following settings shouldn't exist: become
  • The following settings shouldn't exist: become

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]

@uksysadmin
Copy link
Contributor

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.

@laceth
Copy link
Author

laceth commented May 6, 2018

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 #VagrantPlugins::Triggers::Config::Trigger:0x000000000340d640 (NoMethodError)
from /opt/vagrant/embedded/gems/2.1.0/gems/vagrant-2.1.0/lib/vagrant/plugin/v2/trigger.rb:40:in 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 #VagrantPlugins::Triggers::Config::Trigger:0x0000000001ba8e60 (NoMethodError)
from /opt/vagrant/embedded/gems/2.1.0/gems/vagrant-2.1.0/lib/vagrant/plugin/v2/trigger.rb:40:in 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]

@it-praktyk
Copy link
Contributor

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]

@uksysadmin
Copy link
Contributor

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.

@laceth
Copy link
Author

laceth commented May 7, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants