Bug 1375091 - Vagrant setup fails undefined method `-' for nil:NilClass (NoMethodError)
Summary: Vagrant setup fails undefined method `-' for nil:NilClass (NoMethodError)
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Ceph Storage
Classification: Red Hat Storage
Component: Container
Version: 2.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: 2.1
Assignee: Sébastien Han
QA Contact: Anoop
URL:
Whiteboard:
Depends On:
Blocks: 1315538 1371113
TreeView+ depends on / blocked
 
Reported: 2016-09-12 07:32 UTC by Bhaskarakiran
Modified: 2022-02-21 18:05 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-09-21 17:12:28 UTC
Embargoed:


Attachments (Terms of Use)

Description Bhaskarakiran 2016-09-12 07:32:42 UTC
Description of problem:
=======================
Trying to set the ceph containers using vagrant and ansible and when it fails with the below message during 'vagrant up --no-provision'

[root@dhcp43-179 ceph-ansible]# vagrant up --no-provision
/root/ceph-ansible/Vagrantfile:288:in `block in <top (required)>': undefined method `-' for nil:NilClass (NoMethodError)
        from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/config/v2/loader.rb:37:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/config/v2/loader.rb:37:in `load'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/config/loader.rb:113:in `block (2 levels) in load'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/config/loader.rb:107:in `each'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/config/loader.rb:107:in `block in load'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/config/loader.rb:104:in `each'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/config/loader.rb:104:in `load'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/vagrantfile.rb:28:in `initialize'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/environment.rb:740:in `new'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/environment.rb:740:in `vagrantfile'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/environment.rb:486:in `host'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/environment.rb:208:in `block in action_runner'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/runner.rb:33:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/runner.rb:33:in `run'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/environment.rb:473:in `hook'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/environment.rb:722:in `unload'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/bin/vagrant:177:in `ensure in <main>'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/bin/vagrant:177:in `<main>'
[root@dhcp43-179 ceph-ansible]# 

Version-Release number of selected component (if applicable):
=============================================================
2.0

How reproducible:
=================
100%

Steps to Reproduce:
1. Followed the documentation to setup the ceph container using vagrant and ansible.


Actual results:


Expected results:


Additional info:

Comment 3 seb 2016-09-13 09:32:04 UTC
Did you copy all the files? Like vagrant_variables.yml?

Comment 4 Bhaskarakiran 2016-09-14 16:01:47 UTC
I followed the below document for setting up the cluster using vagrant.

https://docs.google.com/document/d/1Ef5a_-Yjozy5Ue3C0M7mMQNn6zWZe0-514bhxKwFHI8/edit?ts=576a3d95&pli=1#

Did copy the files.

Comment 5 seb 2016-09-16 12:00:19 UTC
Does the command: "vagrant status" return the same error?

Comment 6 Bhaskarakiran 2016-09-19 11:44:50 UTC
Vagrant status output:

[root@dhcp43-179 ceph-ansible]# vagrant status
No usable default provider could be found for your system.

Vagrant relies on interactions with 3rd party systems, known as
"providers", to provide Vagrant with resources to run development
environments. Examples are VirtualBox, VMware, Hyper-V.

The easiest solution to this message is to install VirtualBox, which
is available for free on all major platforms.

If you believe you already have a provider available, make sure it
is properly installed and configured. You can see more details about
why a particular provider isn't working by forcing usage with
`vagrant up --provider=PROVIDER`, which should give you a more specific
error message for that particular provider.

This looks more to be a documentation i guess. Should we login to a hypervisor and do the vagrant provisioning ??

Comment 7 seb 2016-09-19 12:52:29 UTC
yes you need to run this command on the same node where you're trying to provision, which provider do you use?

Comment 8 Bhaskarakiran 2016-09-20 07:16:36 UTC
Okay. I am using KVM.

Comment 9 Bhaskarakiran 2016-09-20 07:17:18 UTC
libvirt.

Comment 10 seb 2016-09-20 08:47:43 UTC
So can you resend the output of the command from the node where you're trying to provision?

Comment 11 seb 2016-09-20 08:48:24 UTC
I suspect this is a setup issue with your vagrant and libvirt provider

Comment 12 Bhaskarakiran 2016-09-20 09:12:32 UTC
Will update that shortly.

Comment 13 Bhaskarakiran 2016-09-20 09:29:03 UTC
But the documentation has to be modified accordingly else wouldn't know from where to run vagrant.

Comment 14 Federico Lucifredi 2016-09-21 17:12:28 UTC
Comment #11 is correct. Error in comment #6 ("No usable default provider could be found for your system") is a Vagrant setup error.

Comment 15 Ivan Font 2016-09-22 00:17:41 UTC
This is caused by a missing variable in vagrant_variables.yml.atomic, which is used as a reference and copied into vagrant_variables.yml per the instructions in the doc linked in comment #4. I've created https://github.com/ceph/ceph-ansible/pull/990 to fix this.


Note You need to log in before you can comment on or make changes to this bug.