Bug #4616

Problems provisioning hosts in EC2 with 1.4.1-2

Added by Lance Reed over 3 years ago. Updated over 3 years ago.

Status:Closed
Priority:High
Assigned To:Greg Sutcliffe
Category:Compute resources
Target version:Sprint 21
Difficulty: Bugzilla link:
Found in release:1.4.1 Pull request:
Story points-
Velocity based estimate-
Release1.5.0Release relationshipAuto

Description

Dominic Cleal said that I should file a bug for the bellow issue and that it looks like a regression from 1.4.0 due to #2270.

I am doing a test setup of Foreman 1.4.1-2 in EC2.

I am getting the following error when attempting to provision a new EC2 host.

Failed to get IP for grrr.ec2.internal: undefined method `public_ip_addresses' for #<Fog::Compute::AWS::Server:0x000000087ae3f8>

I am unclear how Foreman gets the IP address in this case, but this looks like it may be a code problem.

Logs have:
Adding Compute instance for grrr.ec2.internal

waiting for instance to acquire ip address
Failed to get IP for grrr.ec2.internal: undefined method `public_ip_addresses' for #<Fog::Compute::AWS::Server:0x000000087ae3f8>/usr/share/foreman/app/models/concerns/orchestration/compute.rb:121:in `block in setComputeIP'

RELEASE: CentOS release 6.4 (Final)
FOREMAN: 1.4.1
RUBY: ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
PUPPET: 3.4.3

foreman-debug-mcDIR.tar.xz

CODE:
foreman-selinux-1.4.0-1.el6.noarch
foreman-compute-1.4.1-2.el6.noarch
foreman-release-1.4.1-2.el6.noarch
foreman-proxy-1.4.1-1.el6.noarch
foreman-postgresql-1.4.1-2.el6.noarch
ruby193-rubygem-fog-1.19.0-1.el6.noarch
rubygem-hammer_cli_foreman-0.0.18-1.el6.noarch
rubygem-foreman_api-0.1.11-1.el6.noarch
foreman-installer-1.4.1-1.el6.noarch
foreman-1.4.1-2.el6.noarch
foreman-cli-1.4.1-2.el6.noarch


Related issues

Related to Foreman - Bug #2270: Unable to create instances on OpenStack without floating IPs Closed 03/01/2013

Associated revisions

Revision 4963a970
Added by Greg Sutcliffe over 3 years ago

Fixes #4616 - Add a Fog mixin for looking up EC2 IP addresses

Revision 97c45d66
Added by Greg Sutcliffe over 3 years ago

Fixes #4616 - Add a Fog mixin for looking up EC2 IP addresses

(cherry picked from commit 4963a970e3ee2a91835f4ab5a493179d96cdeedf)

History

#1 Updated by Dominic Cleal over 3 years ago

  • Category set to Compute resources
  • Priority changed from Normal to High
  • Release set to 1.4.2
  • Found in release set to 1.4.1

#2 Updated by Dominic Cleal over 3 years ago

  • Related to Bug #2270: Unable to create instances on OpenStack without floating IPs added

#3 Updated by Dominic Cleal over 3 years ago

  • Status changed from New to Assigned
  • Assigned To set to Greg Sutcliffe
  • Target version set to Sprint 21

#4 Updated by Greg Sutcliffe over 3 years ago

  • Status changed from Assigned to Ready For Testing

Hi Lance,

If you're happy to try experimental stuff, you can try this patch to Foreman to solve the problem. You'll need to restart Foreman after it's applied.

https://github.com/theforeman/foreman/pull/1283

#5 Updated by Greg Sutcliffe over 3 years ago

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

#6 Updated by Artur Martins over 3 years ago

Applied the changeset, restarted foreman.

Host creation fails due "ip value is blank!

#7 Updated by Dominic Cleal over 3 years ago

  • Release changed from 1.4.2 to 1.5.0

Although I'm bumping this particular fix to 1.5.0, I'm reverting the one that caused it (#2270) for Foreman 1.4.2 so this issue should become resolved.

Also available in: Atom PDF