Bug #26022
intermittent host_js integeration test failure
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
Associated revisions
History
#1
Updated by Ewoud Kohl van Wijngaarden about 4 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.
#2
Updated by The Foreman Bot about 4 years ago
- Assignee set to Tomer Brisker
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/6474 added
#3
Updated by Tomer Brisker about 4 years ago
- Assignee deleted (
Tomer Brisker) - Status changed from Ready For Testing to New
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.
#4
Updated by The Foreman Bot about 4 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/6532 added
#5
Updated by Ondřej Ezr about 4 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset 977b4f3d1dda7f45aeeef224a547fb3d5bcb935c.
#6
Updated by Tomer Brisker almost 4 years ago
- Fixed in Releases 1.22.0 added
- Pull request deleted (
https://github.com/theforeman/foreman/pull/6474)
#7
Updated by Tomer Brisker almost 4 years ago
- Assignee set to Ondřej Ezr
Fixes #26022 - Fix host test