audiolize / vagrant-softlayer

This is a Vagrant plugin that adds a SoftLayer provider to Vagrant, allowing Vagrant to control and provision SoftLayer CCI instances.
MIT License
42 stars 15 forks source link

Lots of errors on vagrant up #49

Closed poflynn closed 9 years ago

poflynn commented 9 years ago

I implemented the workaround in #44 and got past that error but now I seem to be in some round-robin loop of various errors. For the life of me I can't seem to get a machine created. Any ideas on what might be happening? I recently upgraded both vagrant and the SL plugin.

Thanks,

Paul

[paul.oflynn@localhost vagrant]$ vagrant --version
Vagrant 1.7.2
[paul.oflynn@localhost vagrant]$ vagrant plugin list
vagrant-share (1.1.3, system)
vagrant-softlayer (0.4.0)
[paul.oflynn@localhost vagrant]$ cat /etc/*release*
CentOS release 6.5 (Final)
LSB_VERSION=base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
cat: /etc/lsb-release.d: Is a directory
CentOS release 6.5 (Final)
CentOS release 6.5 (Final)
[paul.oflynn@localhost vagrant]$ vagrant up --provider=softlayer --no-provision

Bringing machine 'default' up with 'softlayer' provider...
==> default: Creating a new SoftLayer instance...
Vagrant returned an exception while calling the SoftLayer API.

Exception class: VagrantPlugins::SoftLayer::Errors::SLApiError
Exception message: Vagrant returned an exception while calling the SoftLayer API.

Exception class: SocketError
Exception message: getaddrinfo: Name or service not known
[paul.oflynn@localhost vagrant]$ vagrant destroy

    default: Are you sure you want to destroy the 'default' VM? [y/N] y
==> default: The SoftLayer instance does not exists.
[paul.oflynn@localhost vagrant]$ vagrant up --provider=softlayer --no-provision

Bringing machine 'default' up with 'softlayer' provider...
==> default: Creating a new SoftLayer instance...
==> default: Waiting for instance provisioning. This may take a few minutes...
==> default: SoftLayer instance successfully provisioned!
==> default: Waiting for machine to boot. This may take a few minutes...
Vagrant returned an exception while calling the SoftLayer API.

Exception class: Errno::ENETUNREACH
Exception message: Network is unreachable - connect(2)
[paul.oflynn@localhost vagrant]$ vagrant destroy

    default: Are you sure you want to destroy the 'default' VM? [y/N] y
==> default: Destroying the SoftLayer instance...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'chef_solo' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
[paul.oflynn@localhost vagrant]$ vagrant up --provider=softlayer --no-provision

Bringing machine 'default' up with 'softlayer' provider...
==> default: Creating a new SoftLayer instance...
Vagrant returned an exception while calling the SoftLayer API.

Exception class: VagrantPlugins::SoftLayer::Errors::SLApiError
Exception message: Vagrant returned an exception while calling the SoftLayer API.

Exception class: Net::ReadTimeout
Exception message: Net::ReadTimeout
[paul.oflynn@localhost vagrant]$ vagrant destroy

    default: Are you sure you want to destroy the 'default' VM? [y/N] y
==> default: The SoftLayer instance does not exists.
[paul.oflynn@localhost vagrant]$ vagrant up --provider=softlayer --no-provision

Bringing machine 'default' up with 'softlayer' provider...
==> default: Creating a new SoftLayer instance...
==> default: Waiting for instance provisioning. This may take a few minutes...
==> default: SoftLayer instance successfully provisioned!
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: <<redacted>>:22
    default: SSH username: root
    default: SSH auth method: private key
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
Vagrant returned an exception while calling the SoftLayer API.

Exception class: Net::OpenTimeout
Exception message: execution expired
[paul.oflynn@localhost vagrant]$ vagrant destroy

    default: Are you sure you want to destroy the 'default' VM? [y/N] y
==> default: Destroying the SoftLayer instance...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'chef_solo' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
[paul.oflynn@localhost vagrant]$ vagrant up --provider=softlayer --no-provision

Bringing machine 'default' up with 'softlayer' provider...
==> default: Creating a new SoftLayer instance...
==> default: Waiting for instance provisioning. This may take a few minutes...
==> default: SoftLayer instance successfully provisioned!
==> default: Waiting for machine to boot. This may take a few minutes...
Vagrant returned an exception while calling the SoftLayer API.

Exception class: SocketError
Exception message: getaddrinfo: Name or service not known
[paul.oflynn@localhost vagrant]$ vagrant destroy

    default: Are you sure you want to destroy the 'default' VM? [y/N] y
==> default: Destroying the SoftLayer instance...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'chef_solo' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
[paul.oflynn@localhost vagrant]$ vagrant up --provider=softlayer --no-provision

Bringing machine 'default' up with 'softlayer' provider...
==> default: Creating a new SoftLayer instance...
Vagrant returned an exception while calling the SoftLayer API.

Exception class: Net::ReadTimeout
Exception message: Net::ReadTimeout
[paul.oflynn@localhost vagrant]$ vagrant destroy

    default: Are you sure you want to destroy the 'default' VM? [y/N] y
==> default: The SoftLayer instance does not exists.
[paul.oflynn@localhost vagrant]$ vagrant up --provider=softlayer --no-provision

Bringing machine 'default' up with 'softlayer' provider...
==> default: Creating a new SoftLayer instance...
==> default: Waiting for instance provisioning. This may take a few minutes...
==> default: SoftLayer instance successfully provisioned!
==> default: Waiting for machine to boot. This may take a few minutes...
Vagrant returned an exception while calling the SoftLayer API.

Exception class: SocketError
Exception message: getaddrinfo: Name or service not known
[paul.oflynn@localhost vagrant]$ 
ju2wheels commented 9 years ago
  1. This one is most like an incorrectly configured /etc/hosts, /etc/sysconfig/network or /etc/resolv.conf (it should in most cases not be reporting localhost as the hostname for your machine):

    Vagrant returned an exception while calling the SoftLayer API.
    
    Exception class: SocketError
    Exception message: getaddrinfo: Name or service not known
    [paul.oflynn@localhost vagrant]$ vagrant destroy
  2. After fixing the above error, increase sl.api_timeout in your Vagrant config from the default value if you still get these errors:

    Vagrant returned an exception while calling the SoftLayer API.
    
    Exception class: Net::OpenTimeout
    Exception message: execution expired
    
    Vagrant returned an exception while calling the SoftLayer API.
    
    Exception class: Net::ReadTimeout
    Exception message: Net::ReadTimeout
ju2wheels commented 9 years ago

Closing, let us know if you are still hitting these issues.

poflynn commented 9 years ago

Hey just to follow-up: Your suggestions fixed almost everything but I am still getting some network-related errors which I am assuming are on my end only. Thanks a lot for the quick and detailed response.

ju2wheels commented 9 years ago

Not sure if its relevant to your resolv bug above, but posting here as its close enough. Depending on your /etc/resolv.conf for a machine if you customize it with ndots you may hit a resolution bug: https://bugs.ruby-lang.org/issues/10412 . The built in vagrant ruby might hit this depending on what version the latest one is at. Noticed it doc'ed in the latest RHEL ruby update.

poflynn commented 9 years ago

Hey thanks a lot for the follow-up despite the issue being closed, impressive. So if you really are morbidly curious here's my deal: My company forces me to us Windows (mostly for security reasons) so I had created a CentOS VM on it in VirtualBox and was doing my work from there. Then they rolled out OpenDNS Umbrella for Windows which appeared to cause all my DNS lookups to fail from within the VM. I worked around somewhat by hardcoding the OpenDNS server IPs in /etc/resolv.conf which allows me to browse the web etc but i was still getting errors in vagrant. I did not do any ndot stuff and in fact have nothing in resolv.conf other than the 2 OpenDNS server names. I've actually given up on it, for now at least, but will return to it when I have a chance. Thanks for all of your support.