Actions
Bug #2839
closedOpenstack finish script fails to authenticate
Description
Foreman 1.2.0 fails to authenticate via ssh for finish script and rolls back. I've tested this creating a Fedora 19 Host on Openstack Grizzly (from RDO). From the Fedora host logs I can see Foreman attempts to authenticate before the fedora user is actually created.
Reproduction:
1. Create new Fedora 19 Host through Foreman
2. Foreman provisions the host on Openstack
3. Foreman fails to authenticate
4. Foreman rolls back
Add this to ssh.rb:
- ssh.rb.old 2013-07-25 17:59:29.389244296 +0100
--- ssh.rb 2013-07-25 18:00:23.041063187 +0100 ******* - 89,98 **
--- 89,102 ----
retry
rescue Net::SSH::ConnectionTimeout
logger.debug "Host timed out for #{address}, retrying"
sleep(2)
retry
+ rescue Net::SSH::AuthenticationFailed
+ logger.debug "Auth failed.. retrying"
+ sleep(2)
+ retry
rescue Timeout::Error
retry
rescue => e
logger.debug "SSH error: #{e.message}\n " + e.backtrace.join("\n ")
end
I'm not sure this is a good fix but it works for me..
Updated by Lukas Zapletal about 11 years ago
- Target version set to 1.3.0
- Difficulty set to easy
Hey Ian, thanks for the patch. We will look on this.
Updated by Dominic Cleal about 11 years ago
- Category changed from Host creation to Compute resources
- Status changed from New to Ready For Testing
Updated by Ian Mordey about 11 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset f9d5655583a9a9d0309fcd4bd19ac9b43021c7d1.
Updated by Dominic Cleal about 11 years ago
- Target version changed from 1.3.0 to 1.2.1
Actions