Skip to content

leap local start fails if node name has a dash "-"

Leap cli and platform versions:

drebs@ppto:/tmp/myprovider $ leap --version
leap 1.1.3, ruby 1.9.3
drebs@ppto:/tmp/myprovider $ git --no-pager --git-dir /tmp/leap_cli/.git log -1
commit 35de71be644343abc5f16a15e671fff8c94910ab
Author: elijah 
Date:   Wed Jul 24 13:03:02 2013 -0700

    allow provider to include country, state, and locality in the CSR.
drebs@ppto:/tmp/myprovider $ git --no-pager --git-dir /tmp/leap_platform/.git log -1
commit ca11482dd7cd4ea8ffa69407ee2fd5b5e1b7981b
Author: Micah Anderson 
Date:   Tue Jul 16 12:29:54 2013 +0100

    add .gitignore and configure it to ignore .reviewboardrc
    
    Change-Id: Id5e587f47a27c9d714d0d0b352b87e9e8f55d4a8

Steps to reproduce:

Create a new provider.

Add a local node with a dash in its name.

Run @leap local start@.

Commands output:

drebs@ppto:~ $ cd /tmp/
drebs@ppto:/tmp $ mkdir myprovider
drebs@ppto:/tmp $ cd myprovider/
drebs@ppto:/tmp/myprovider $ leap new .
The primary domain of the provider: |example.org| myprovider.org
The name of the provider: |Example| myprovider
File path of the leap_platform directory: |/tmp/leap_platform| 
Default email address contacts: |root@myprovider.org| 
 = created .gitignore
 = created provider.json
 = created common.json
 = created Leapfile
 = created nodes/
 = created services/
 = created tags/
 = completed initialization
drebs@ppto:/tmp/myprovider $ leap node --local add local-tor1
 = created nodes/local-tor1.json
drebs@ppto:/tmp/myprovider $ leap -v 2 local start
 = read /tmp/myprovider/Leapfile
 = leap command v1.1.3
 = leap platform v1.1.2 (master ca11482dd7cd4ea8ffa69407ee2fd5b5e1b7981b)
 = ran vagrant plugin list | grep sahara | cat 2>&1
 = no change test/Vagrantfile
 = run cd /tmp/myprovider/test; vagrant up ; vagrant sandbox on 
/tmp/myprovider/test/Vagrantfile:2:in `block in ': undefined local variable or method `tor1' for main:Object (NameError)
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/config/v1/loader.rb:37:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/config/v1/loader.rb:37:in `load'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/config/loader.rb:104:in `block (2 levels) in load'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/config/loader.rb:98:in `each'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/config/loader.rb:98:in `block in load'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/config/loader.rb:95:in `each'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/config/loader.rb:95:in `load'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/environment.rb:261:in `config_global'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/environment.rb:502:in `block in action_runner'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:28:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:28:in `run'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/environment.rb:274:in `hook'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/environment.rb:135:in `initialize'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/bin/vagrant:62:in `new'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/bin/vagrant:62:in `'
        from /opt/vagrant/bin/../embedded/gems/bin/vagrant:23:in `load'
        from /opt/vagrant/bin/../embedded/gems/bin/vagrant:23:in `'
/tmp/myprovider/test/Vagrantfile:2:in `block in ': undefined local variable or method `tor1' for main:Object (NameError)
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/config/v1/loader.rb:37:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/config/v1/loader.rb:37:in `load'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/config/loader.rb:104:in `block (2 levels) in load'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/config/loader.rb:98:in `each'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/config/loader.rb:98:in `block in load'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/config/loader.rb:95:in `each'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/config/loader.rb:95:in `load'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/environment.rb:261:in `config_global'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/environment.rb:502:in `block in action_runner'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:28:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:28:in `run'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/environment.rb:274:in `hook'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/environment.rb:135:in `initialize'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/bin/vagrant:62:in `new'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/bin/vagrant:62:in `'
        from /opt/vagrant/bin/../embedded/gems/bin/vagrant:23:in `load'
        from /opt/vagrant/bin/../embedded/gems/bin/vagrant:23:in `'
drebs@ppto:/tmp/myprovider $ 

(from redmine: created on 2013-07-24, closed on 2014-03-25)