Project

General

Profile

Bug #11189

Test failures reading Foreman fixtures from Katello engine root

Added by Dominic Cleal over 3 years ago. Updated 9 months ago.

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

Description

There is a high frequency of failures running Katello core tests on Jenkins with the following logs:

00:31:02.755 Organization::update an organization
00:31:02.821 /var/lib/workspace/workspace/test_katello_core/database/postgresql/ruby/1.9.3/plugin/app/lib/katello/resources/candlepin.rb:53: warning: toplevel constant Logging referenced by Katello::Foreman::Logging
00:31:02.869 /usr/local/rvm/gems/ruby-1.9.3-p392@test_katello_core-2/gems/activerecord-3.2.21/lib/active_record/fixtures/file.rb:43:in `read': No such file or directory - /var/lib/workspace/workspace/test_katello_core/database/postgresql/ruby/1.9.3/plugin/test/fixtures/models/user_roles.yml (Errno::ENOENT)
00:31:02.869     from /usr/local/rvm/gems/ruby-1.9.3-p392@test_katello_core-2/gems/activerecord-3.2.21/lib/active_record/fixtures/file.rb:43:in `rows'
00:31:02.869     from /usr/local/rvm/gems/ruby-1.9.3-p392@test_katello_core-2/gems/activerecord-3.2.21/lib/active_record/fixtures/file.rb:29:in `each'
00:31:02.869     from /usr/local/rvm/gems/ruby-1.9.3-p392@test_katello_core-2/gems/activerecord-3.2.21/lib/active_record/fixtures.rb:670:in `block (2 levels) in read_fixture_files'
00:31:02.869     from /usr/local/rvm/gems/ruby-1.9.3-p392@test_katello_core-2/gems/activerecord-3.2.21/lib/active_record/fixtures/file.rb:20:in `open'
00:31:02.869     from /usr/local/rvm/gems/ruby-1.9.3-p392@test_katello_core-2/gems/activerecord-3.2.21/lib/active_record/fixtures.rb:669:in `block in read_fixture_files'
00:31:02.869     from /usr/local/rvm/gems/ruby-1.9.3-p392@test_katello_core-2/gems/activerecord-3.2.21/lib/active_record/fixtures.rb:668:in `each'
00:31:02.869     from /usr/local/rvm/gems/ruby-1.9.3-p392@test_katello_core-2/gems/activerecord-3.2.21/lib/active_record/fixtures.rb:668:in `read_fixture_files'
00:31:02.869     from /usr/local/rvm/gems/ruby-1.9.3-p392@test_katello_core-2/gems/activerecord-3.2.21/lib/active_record/fixtures.rb:548:in `initialize'
00:31:02.869     from /usr/local/rvm/gems/ruby-1.9.3-p392@test_katello_core-2/gems/activerecord-3.2.21/lib/active_record/fixtures.rb:482:in `new'
00:31:02.869     from /usr/local/rvm/gems/ruby-1.9.3-p392@test_katello_core-2/gems/activerecord-3.2.21/lib/active_record/fixtures.rb:482:in `block (2 levels) in create_fixtures'
00:31:02.869     from /usr/local/rvm/gems/ruby-1.9.3-p392@test_katello_core-2/gems/activerecord-3.2.21/lib/active_record/fixtures.rb:479:in `map'
00:31:02.869     from /usr/local/rvm/gems/ruby-1.9.3-p392@test_katello_core-2/gems/activerecord-3.2.21/lib/active_record/fixtures.rb:479:in `block in create_fixtures'
00:31:02.869     from /usr/local/rvm/gems/ruby-1.9.3-p392@test_katello_core-2/gems/activerecord-3.2.21/lib/active_record/connection_adapters/postgresql_adapter.rb:523:in `disable_referential_integrity'
00:31:02.869     from /usr/local/rvm/gems/ruby-1.9.3-p392@test_katello_core-2/gems/activerecord-3.2.21/lib/active_record/fixtures.rb:476:in `create_fixtures'
00:31:02.869     from /usr/local/rvm/gems/ruby-1.9.3-p392@test_katello_core-2/gems/activerecord-3.2.21/lib/active_record/fixtures.rb:895:in `load_fixtures'
00:31:02.869     from /var/lib/workspace/workspace/test_katello_core/database/postgresql/ruby/1.9.3/plugin/test/katello_test_helper.rb:98:in `before_suite'
00:31:02.869     from /var/lib/workspace/workspace/test_katello_core/database/postgresql/ruby/1.9.3/plugin/test/katello_test_helper.rb:167:in `before_suite'
00:31:02.869     from /var/lib/workspace/workspace/test_katello_core/database/postgresql/ruby/1.9.3/plugin/test/katello_test_runner.rb:30:in `_run_suite'
00:31:02.869     from /usr/local/rvm/gems/ruby-1.9.3-p392@test_katello_core-2/gems/ci_reporter-1.9.3/lib/ci/reporter/minitest.rb:83:in `block in _run_suites'
00:31:02.869     from /usr/local/rvm/gems/ruby-1.9.3-p392@test_katello_core-2/gems/ci_reporter-1.9.3/lib/ci/reporter/minitest.rb:83:in `map'
00:31:02.869     from /usr/local/rvm/gems/ruby-1.9.3-p392@test_katello_core-2/gems/ci_reporter-1.9.3/lib/ci/reporter/minitest.rb:83:in `_run_suites'
00:31:02.869     from /var/lib/workspace/workspace/test_katello_core/database/postgresql/ruby/1.9.3/plugin/test/katello_test_runner.rb:22:in `_run_suites'
00:31:02.869     from /usr/local/rvm/gems/ruby-1.9.3-p392@test_katello_core-2/gems/ci_reporter-1.9.3/lib/ci/reporter/minitest.rb:75:in `_run_anything'
00:31:02.869     from /usr/local/rvm/gems/ruby-1.9.3-p392@test_katello_core-2/gems/minitest-4.7.5/lib/minitest/unit.rb:1085:in `run_tests'
00:31:02.869     from /usr/local/rvm/gems/ruby-1.9.3-p392@test_katello_core-2/gems/minitest-4.7.5/lib/minitest/unit.rb:1072:in `block in _run'
00:31:02.869     from /usr/local/rvm/gems/ruby-1.9.3-p392@test_katello_core-2/gems/minitest-4.7.5/lib/minitest/unit.rb:1071:in `each'
00:31:02.869     from /usr/local/rvm/gems/ruby-1.9.3-p392@test_katello_core-2/gems/minitest-4.7.5/lib/minitest/unit.rb:1071:in `_run'
00:31:02.869     from /usr/local/rvm/gems/ruby-1.9.3-p392@test_katello_core-2/gems/minitest-4.7.5/lib/minitest/unit.rb:1059:in `run'
00:31:02.869     from /usr/local/rvm/gems/ruby-1.9.3-p392@test_katello_core-2/gems/minitest-4.7.5/lib/minitest/unit.rb:795:in `block in autorun'
00:31:03.003 #<SystemExit: exit>

(http://ci.theforeman.org/job/test_katello_core/14566/database=postgresql,ruby=1.9.3/console)

Or during different tests:

00:30:23.746 Katello::GluePulpConsumerTestBase
00:30:24.045 /usr/local/rvm/gems/ruby-1.9.3-p392@test_katello_core-0/gems/activerecord-3.2.21/lib/active_record/fixtures/file.rb:43:in `read': No such file or directory - /var/lib/workspace/workspace/test_katello_core/database/postgresql/ruby/1.9.3/plugin/test/fixtures/models/lookup_values.yml (Errno::ENOENT)
00:30:24.045     from /usr/local/rvm/gems/ruby-1.9.3-p392@test_katello_core-0/gems/activerecord-3.2.21/lib/active_record/fixtures/file.rb:43:in `rows'
00:30:24.045     from /usr/local/rvm/gems/ruby-1.9.3-p392@test_katello_core-0/gems/activerecord-3.2.21/lib/active_record/fixtures/file.rb:29:in `each'
00:30:24.045     from /usr/local/rvm/gems/ruby-1.9.3-p392@test_katello_core-0/gems/activerecord-3.2.21/lib/active_record/fixtures.rb:670:in `block (2 levels) in read_fixture_files'
00:30:24.045     from /usr/local/rvm/gems/ruby-1.9.3-p392@test_katello_core-0/gems/activerecord-3.2.21/lib/active_record/fixtures/file.rb:20:in `open'
00:30:24.045     from /usr/local/rvm/gems/ruby-1.9.3-p392@test_katello_core-0/gems/activerecord-3.2.21/lib/active_record/fixtures.rb:669:in `block in read_fixture_files'
00:30:24.045     from /usr/local/rvm/gems/ruby-1.9.3-p392@test_katello_core-0/gems/activerecord-3.2.21/lib/active_record/fixtures.rb:668:in `each'
00:30:24.045     from /usr/local/rvm/gems/ruby-1.9.3-p392@test_katello_core-0/gems/activerecord-3.2.21/lib/active_record/fixtures.rb:668:in `read_fixture_files'
00:30:24.045     from /usr/local/rvm/gems/ruby-1.9.3-p392@test_katello_core-0/gems/activerecord-3.2.21/lib/active_record/fixtures.rb:548:in `initialize'
00:30:24.045     from /usr/local/rvm/gems/ruby-1.9.3-p392@test_katello_core-0/gems/activerecord-3.2.21/lib/active_record/fixtures.rb:482:in `new'
00:30:24.045     from /usr/local/rvm/gems/ruby-1.9.3-p392@test_katello_core-0/gems/activerecord-3.2.21/lib/active_record/fixtures.rb:482:in `block (2 levels) in create_fixtures'
00:30:24.045     from /usr/local/rvm/gems/ruby-1.9.3-p392@test_katello_core-0/gems/activerecord-3.2.21/lib/active_record/fixtures.rb:479:in `map'
00:30:24.045     from /usr/local/rvm/gems/ruby-1.9.3-p392@test_katello_core-0/gems/activerecord-3.2.21/lib/active_record/fixtures.rb:479:in `block in create_fixtures'
00:30:24.045     from /usr/local/rvm/gems/ruby-1.9.3-p392@test_katello_core-0/gems/activerecord-3.2.21/lib/active_record/connection_adapters/postgresql_adapter.rb:523:in `disable_referential_integrity'
00:30:24.045     from /usr/local/rvm/gems/ruby-1.9.3-p392@test_katello_core-0/gems/activerecord-3.2.21/lib/active_record/fixtures.rb:476:in `create_fixtures'
00:30:24.045     from /usr/local/rvm/gems/ruby-1.9.3-p392@test_katello_core-0/gems/activerecord-3.2.21/lib/active_record/fixtures.rb:895:in `load_fixtures'
00:30:24.045     from /var/lib/workspace/workspace/test_katello_core/database/postgresql/ruby/1.9.3/plugin/test/katello_test_helper.rb:98:in `before_suite'
00:30:24.045     from /var/lib/workspace/workspace/test_katello_core/database/postgresql/ruby/1.9.3/plugin/test/katello_test_helper.rb:167:in `before_suite'
00:30:24.045     from /var/lib/workspace/workspace/test_katello_core/database/postgresql/ruby/1.9.3/plugin/test/katello_test_runner.rb:30:in `_run_suite'
00:30:24.045     from /usr/local/rvm/gems/ruby-1.9.3-p392@test_katello_core-0/gems/ci_reporter-1.9.3/lib/ci/reporter/minitest.rb:83:in `block in _run_suites'
00:30:24.045     from /usr/local/rvm/gems/ruby-1.9.3-p392@test_katello_core-0/gems/ci_reporter-1.9.3/lib/ci/reporter/minitest.rb:83:in `map'
00:30:24.045     from /usr/local/rvm/gems/ruby-1.9.3-p392@test_katello_core-0/gems/ci_reporter-1.9.3/lib/ci/reporter/minitest.rb:83:in `_run_suites'
00:30:24.045     from /var/lib/workspace/workspace/test_katello_core/database/postgresql/ruby/1.9.3/plugin/test/katello_test_runner.rb:22:in `_run_suites'
00:30:24.045     from /usr/local/rvm/gems/ruby-1.9.3-p392@test_katello_core-0/gems/ci_reporter-1.9.3/lib/ci/reporter/minitest.rb:75:in `_run_anything'
00:30:24.045     from /usr/local/rvm/gems/ruby-1.9.3-p392@test_katello_core-0/gems/minitest-4.7.5/lib/minitest/unit.rb:1085:in `run_tests'
00:30:24.045     from /usr/local/rvm/gems/ruby-1.9.3-p392@test_katello_core-0/gems/minitest-4.7.5/lib/minitest/unit.rb:1072:in `block in _run'
00:30:24.045     from /usr/local/rvm/gems/ruby-1.9.3-p392@test_katello_core-0/gems/minitest-4.7.5/lib/minitest/unit.rb:1071:in `each'
00:30:24.045     from /usr/local/rvm/gems/ruby-1.9.3-p392@test_katello_core-0/gems/minitest-4.7.5/lib/minitest/unit.rb:1071:in `_run'
00:30:24.045     from /usr/local/rvm/gems/ruby-1.9.3-p392@test_katello_core-0/gems/minitest-4.7.5/lib/minitest/unit.rb:1059:in `run'
00:30:24.045     from /usr/local/rvm/gems/ruby-1.9.3-p392@test_katello_core-0/gems/minitest-4.7.5/lib/minitest/unit.rb:795:in `block in autorun'
00:30:24.616 #<SystemExit: exit>

(http://ci.theforeman.org/job/test_katello_core/14563/database=postgresql,ruby=1.9.3/console)

It appears to me that test fixtures for Foreman classes are being loaded but from the Katello engine root - see the "1.9.3/plugin/" part of the path, I think this should be "1.9.3/foreman/" for the Foreman installation. lookup_values.yml is a file we ship for a Foreman core model.

Perhaps something is changing and not restoring the current working directory or something strange? It's been going on for approximately a couple of weeks.

Associated revisions

Revision 47805116 (diff)
Added by Justin Sherrill over 3 years ago

fixes #11189 - plan org create action for org spec

running an async task here made no sense and appeared to cause issues
with fixtures

Revision 0406cd46
Added by Justin Sherrill over 3 years ago

Merge pull request #5404 from jlsherrill/11189

fixes #11189 - plan org create action for org spec

Revision c893a67f (diff)
Added by Justin Sherrill over 3 years ago

Fixes #11189 - copy and load fixtures from tmpdir

Revision 5182450a
Added by Justin Sherrill over 3 years ago

Merge pull request #5423 from jlsherrill/11189-3

Fixes #11189 - copy and load fixtures from tmpdir

History

#1 Updated by The Foreman Bot over 3 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/5370 added
  • Pull request deleted ()

#2 Updated by Eric Helms over 3 years ago

  • Pull request added
  • Pull request deleted (https://github.com/Katello/katello/pull/5370)

#3 Updated by Justin Sherrill over 3 years ago

  • Status changed from Ready For Testing to Assigned
  • Assignee set to Justin Sherrill

#4 Updated by The Foreman Bot over 3 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/5404 added
  • Pull request deleted ()

#5 Updated by Justin Sherrill over 3 years ago

I believe we have a solution for most of the errors, but I'm not 100% confident it will fix all instances. Please reopen if you see this again.

#6 Updated by Justin Sherrill over 3 years ago

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

#7 Updated by Eric Helms over 3 years ago

  • Legacy Backlogs Release (now unused) set to 70
  • Triaged changed from No to Yes

#8 Updated by Dominic Cleal over 3 years ago

  • Status changed from Closed to Assigned

Justin Sherrill wrote:

I believe we have a solution for most of the errors, but I'm not 100% confident it will fix all instances. Please reopen if you see this again.

One from today: http://ci.theforeman.org/job/test_katello_core/14833/database=postgresql,ruby=1.9.3/console

#9 Updated by Dominic Cleal over 3 years ago

http://ci.theforeman.org/job/test_katello_core/database=postgresql,ruby=1.9.3/14896/console

It does seem rarer now, I'm inclined to say there's been an improvement.

#10 Updated by The Foreman Bot over 3 years ago

  • Status changed from Assigned to Ready For Testing

#11 Updated by Dominic Cleal over 3 years ago

  • Status changed from Ready For Testing to Assigned

#12 Updated by Justin Sherrill over 3 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/5423 added
  • Pull request deleted (https://github.com/Katello/katello/pull/5404)

#13 Updated by Justin Sherrill over 3 years ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF