Project

General

Profile

Actions

Bug #2839

closed

Openstack finish script fails to authenticate

Added by Ian Mordey over 10 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Compute resources
Target version:
Difficulty:
easy
Triaged:
Fixed in Releases:
Found in Releases:

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

Fix:
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..

Actions #1

Updated by Lukas Zapletal over 10 years ago

  • Target version set to 1.3.0
  • Difficulty set to easy

Hey Ian, thanks for the patch. We will look on this.

Actions #2

Updated by Dominic Cleal over 10 years ago

  • Category changed from Host creation to Compute resources
  • Status changed from New to Ready For Testing
Actions #3

Updated by Ian Mordey over 10 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #4

Updated by Dominic Cleal over 10 years ago

  • Target version changed from 1.3.0 to 1.2.1
Actions

Also available in: Atom PDF