The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

Bug #8676

Bootstrap can timeout waiting for instance

Added by Carl Caum about 3 years ago. Updated 9 months ago.

Status:Merged - Pending ReleaseStart date:07/28/2011
Priority:NormalDue date:
Assignee:Kelsey Hightower% Done:

0%

Category:cloud provisioner
Target version:-
Keywords: cloud_provisioner Affected URL:
Branch:https://github.com/puppetlabs/puppetlabs-cloud-provisioner/pull/48 Affected PE version:

We've Moved!

Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com

This issue is currently not available for export. If you are experiencing the issue described below, please file a new ticket in JIRA. Once a new ticket has been created, please add a link to it that points back to this Redmine ticket.


Description

When doing a bootstrap on an instance, I got an error saying there is no route to the host. However after the error I can ssh in to the instance fine

[root@ip-10-204-65-156 .ssh]# puppet node bootstrap --image=ami-3624d65f --keypair ccaum_rsa --login root --keyfile /root/.ec2/ccaum_rsa.pem --certname puppetagent02 --type m1.small
notice: Creating new instance ...
notice: Creating new instance ... Done
notice: Creating tags for instance ...
notice: Creating tags for instance ... Done
notice: Launching server i-1f2e937e ...
############################################################################################
notice: Server i-1f2e937e is now launched
notice: Server i-1f2e937e public dns name: ec2-50-19-161-122.compute-1.amazonaws.com
notice: Waiting for SSH response ...
err: Unhandled connection robustness error: Errno::EHOSTUNREACH [#]
err: No route to host - connect(2)
err: Try 'puppet help node bootstrap' for usage

History

#1 Updated by Jon Hadfield about 3 years ago

I had the same issue and found it was due to net-scp being absent. You can try this to confirm (once the instance has been launched): puppet node install ec2-xxx-xxx-xxx-xxx.compute-1.amazonaws.com --login root --keyfile <keyfile> --install-script gems --puppet-version 2.6.9 If you get the message: “err: no such file to load — net/scp” then you’ll need to install net-scp, i.e. sudo gem install net-scp

Also, try giving AWS more time, i.e. in: modules/cloud_provisioner/lib/puppet/cloudpack.rb change: status = Timeout::timeout(10) do to status = Timeout::timeout(40) do sleep 25

#2 Updated by James Turnbull about 3 years ago

  • Description updated (diff)
  • Category set to cloudpack
  • Status changed from Unreviewed to Accepted

#3 Updated by Carl Caum about 3 years ago

I’ve managed to track down what I think is the cause. Net::SSH waits for SSH to connect, which is good. The problem is that once the ssh server starts, it immediately allows connections even though it’s not really ready. Thus the connection hangs and times out. I’ve reproduced this several times with the ssh command on the command line.

If we can have the ssh_test_connect method test to see if the server is listening instead of waiting for a login, then sleep for one second, I think it will fix the issue.

#4 Updated by Kelsey Hightower almost 3 years ago

  • Assignee set to Kelsey Hightower

This issue should be pending a merge or resolved in master. I will verify and update this ticket.

#5 Updated by Kelsey Hightower almost 3 years ago

  • Status changed from Accepted to In Topic Branch Pending Review
  • Branch set to https://github.com/kelseyhightower/puppetlabs-cloud-provisioner/commit/bae8b41d7b8098ed166d7677c9b1e9b44360f2cb

#6 Updated by Kelsey Hightower almost 3 years ago

Pull request has been submitted:

https://github.com/puppetlabs/puppetlabs-cloud-provisioner/pull/48

#7 Updated by Kelsey Hightower almost 3 years ago

  • Branch changed from https://github.com/kelseyhightower/puppetlabs-cloud-provisioner/commit/bae8b41d7b8098ed166d7677c9b1e9b44360f2cb to https://github.com/puppetlabs/puppetlabs-cloud-provisioner/pull/48

#8 Updated by Jeff McCune almost 3 years ago

  • Status changed from In Topic Branch Pending Review to Merged - Pending Release

#9 Updated by Charlie Sharpsteen 9 months ago

  • Project changed from Cloud-Provisioner to Puppet Enterprise (Public)
  • Category deleted (cloudpack)

#10 Updated by Kenn Hussey 9 months ago

  • Category set to cloud provisioner

Also available in: Atom PDF