Project

General

Profile

Bug #15054

503 errors accessing AWS EC2 API during host tests

Added by Dominic Cleal about 6 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Tests
Target version:
Difficulty:
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

The host tests appear to access the Amazon EC2 API during creation of hosts on compute resources with compute profiles:

Excon::Errors::ServiceUnavailable: Expected(200) <=> Actual(503 Service Unavailable)
excon.error.response
  :body          => "" 
  :cookies       => [
  ]
  :headers       => {
    "Connection"       => "close" 
    "Content-Length"   => "0" 
    "Date"             => "Mon, 16 May 16 09:35:48 GMT" 
    "x-amz-id-2"       => "Dc0HZ3kzJ+Uae17Wo69yoEFYx/gAHpVKUvtEvy5iBxou2LoVuFeA2Fw13UX53ZzXZoiuYPb6JBo1Er96TaYu0UHMk7lNVtFK" 
    "x-amz-request-id" => "B4E0CF28D5FC98F" 
  }
  :host          => "ec2.eu-west-1.amazonaws.com" 
  :local_address => "162.242.243.166" 
  :local_port    => 36477
  :path          => "/" 
  :port          => 443
  :reason_phrase => "Service Unavailable" 
  :remote_ip     => "54.239.35.17" 
  :status        => 503
  :status_line   => "HTTP/1.1 503 Service Unavailable\r\n" 

    app/models/compute_resources/foreman/model/ec2.rb:69:in `regions'
    app/models/compute_resources/foreman/model/ec2.rb:78:in `test_connection'
    app/models/compute_resource.rb:151:in `new_vm'
    app/models/compute_attribute.rb:35:in `new_vm'
    app/models/compute_attribute.rb:40:in `pretty_vm_attrs'
    app/models/compute_attribute.rb:46:in `update_name'
    test_after_commit (0.4.2) lib/test_after_commit.rb:27:in `block in transaction_with_transactional_fixtures'
    test_after_commit (0.4.2) lib/test_after_commit.rb:21:in `transaction_with_transactional_fixtures'
    test_after_commit (0.4.2) lib/test_after_commit.rb:27:in `block in transaction_with_transactional_fixtures'
    test_after_commit (0.4.2) lib/test_after_commit.rb:21:in `transaction_with_transactional_fixtures'
    test/factories/compute_resources.rb:93:in `block (4 levels) in <top (required)>'
    test/factories/host_related.rb:178:in `block (4 levels) in <top (required)>'
    test/unit/host_test.rb:3110:in `block (2 levels) in <class:HostTest>' (Excon::Errors::ServiceUnavailable)
/usr/local/rvm/gems/ruby-2.3.0@test_develop-0/gems/excon-0.49.0/lib/excon/middlewares/expects.rb:6    

(at commit d1e1d191db4b765e9edb1bae12e4f407d782eac6)

These should be stubbed out entirely.

Associated revisions

Revision 2b79099a (diff)
Added by Dominic Cleal almost 6 years ago

fixes #15054 - stub calls to CR in ComputeAttribute factory

History

#1 Updated by Dominic Cleal almost 6 years ago

  • Status changed from New to Assigned
  • Assignee set to Dominic Cleal

#2 Updated by The Foreman Bot almost 6 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/3542 added

#3 Updated by Dominic Cleal almost 6 years ago

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

#4 Updated by Dominic Cleal almost 6 years ago

  • Legacy Backlogs Release (now unused) set to 136

Also available in: Atom PDF