Project

General

Profile

Actions

Bug #26022

closed

intermittent host_js integeration test failure

Added by Tomer Brisker over 5 years ago. Updated about 5 years ago.

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

Description

Seems to be failing more often on the new test_develop pipeline for some reason:

[MinitestRetry] retry 'test_0007_enables changing vm disk size' count: 1,  msg: SocketError: Failed to open TCP connection to 1.example.com:443 (getaddrinfo: Name or service not known)

    app/models/compute_resources/foreman/model/vmware.rb:698:in `client'

    app/models/compute_resource.rb:181:in `find_vm_by_uuid'

    app/controllers/hosts_controller.rb:283:in `vm'

    app/controllers/concerns/application_shared.rb:15:in `set_timezone'

    app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'

    app/controllers/concerns/foreman/controller/topbar_sweeper.rb:12:in `set_topbar_sweeper_controller'

    lib/foreman/middleware/telemetry.rb:10:in `call'

    lib/foreman/middleware/catch_json_parse_errors.rb:9:in `call'

    lib/foreman/middleware/logging_context_session.rb:22:in `call'

    lib/foreman/middleware/logging_context_request.rb:11:in `call'

[MinitestRetry] retry 'test_0007_enables changing vm disk size' count: 2,  msg: ActiveRecord::RecordInvalid: Validation failed: Uuid has already been taken

    test/factories/disable_auditing.rb:13:in `block (3 levels) in <top (required)>'

    test/factories/disable_auditing.rb:13:in `block (2 levels) in <top (required)>'

    test/integration/host_js_test.rb:533:in `block (2 levels) in <class:HostJSTest>'

[MinitestRetry] retry 'test_0007_enables changing vm disk size' count: 3,  msg: SocketError: Failed to open TCP connection to 3.example.com:443 (getaddrinfo: Name or service not known)

    app/models/compute_resources/foreman/model/vmware.rb:698:in `client'

    app/models/compute_resource.rb:181:in `find_vm_by_uuid'

    app/controllers/hosts_controller.rb:283:in `vm'

    app/controllers/concerns/application_shared.rb:15:in `set_timezone'

    app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'

    app/controllers/concerns/foreman/controller/topbar_sweeper.rb:12:in `set_topbar_sweeper_controller'

    lib/foreman/middleware/telemetry.rb:10:in `call'

    lib/foreman/middleware/catch_json_parse_errors.rb:9:in `call'

    lib/foreman/middleware/logging_context_session.rb:22:in `call'

    lib/foreman/middleware/logging_context_request.rb:11:in `call'

HostJSTest::edit page#test_0007_enables changing vm disk size = 1.59 s = E

Error:

HostJSTest::edit page#test_0007_enables changing vm disk size:

ActiveRecord::RecordInvalid: Validation failed: Uuid has already been taken

    test/factories/disable_auditing.rb:13:in `block (3 levels) in <top (required)>'

    test/factories/disable_auditing.rb:13:in `block (2 levels) in <top (required)>'

    test/integration/host_js_test.rb:533:in `block (2 levels) in <class:HostJSTest>'

bin/rails test test/integration/host_js_test.rb:524

Actions #1

Updated by Ewoud Kohl van Wijngaarden over 5 years ago

I suspect this is an issue because the integration test is a separate ruby process that can't mock fog on the running Foreman server. Hardcoding the UUID is probably also not a good idea either.

Actions #2

Updated by The Foreman Bot over 5 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Tomer Brisker
  • Pull request https://github.com/theforeman/foreman/pull/6474 added
Actions #3

Updated by Tomer Brisker over 5 years ago

  • Status changed from Ready For Testing to New
  • Assignee deleted (Tomer Brisker)

The uuid comes from Fog mock data, but the .client method in the compute resource seems to not use the mocked data due to the factory setup.

Actions #4

Updated by The Foreman Bot over 5 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/6532 added
Actions #5

Updated by Ondřej Ezr over 5 years ago

  • Status changed from Ready For Testing to Closed
Actions #6

Updated by Tomer Brisker about 5 years ago

  • Pull request deleted (https://github.com/theforeman/foreman/pull/6474)
  • Fixed in Releases 1.22.0 added
Actions #7

Updated by Tomer Brisker about 5 years ago

  • Assignee set to Ondřej Ezr
Actions

Also available in: Atom PDF