katello-nightly-rpm-pipeline 1516 failed

Katello nightly pipeline failed:

https://ci.theforeman.org/job/katello-nightly-rpm-pipeline/1516/

foreman-pipeline-katello-rpm-nightly (failed) (remote job)

Nice, the Installer related issues are gone, but I am afraid @jeremylenz is not yet fully off the hook.

Deleting organizations fail:

  not ok 1 Delete an Organization
  # (in test file fb-destroy-organization.bats, line 11)
  #   `hammer organization delete --name="${ORGANIZATION}"' failed with status 70
  # Could not delete the organization:
  #   Cannot modify association 'Katello::KTEnvironment#hosts' because it goes through more than one other association.
  not ok 2 Delete Import Organization
  # (in test file fb-destroy-organization.bats, line 16)
  #   `hammer organization delete --name="${IMPORT_ORG}"' failed with status 70
  # Could not delete the organization:
  #   Cannot modify association 'Katello::KTEnvironment#hosts' because it goes through more than one other association.
  not ok 3 Delete Library Import Organization
  # (in test file fb-destroy-organization.bats, line 21)
  #   `hammer organization delete --name="${LIBRARY_IMPORT_ORG}"' failed with status 70
  # Could not delete the organization:
  #   Cannot modify association 'Katello::KTEnvironment#hosts' because it goes through more than one other association.

And in production.log you see smth like this:

2022-12-12T23:27:28 [I|app|35e93c06] Started DELETE "/katello/api/organizations/4" for 192.168.122.85 at 2022-12-12 23:27:28 +0000
2022-12-12T23:27:28 [I|app|35e93c06] Processing by Katello::Api::V2::OrganizationsController#destroy as JSON
2022-12-12T23:27:28 [I|app|35e93c06]   Parameters: {"api_version"=>"v2", "id"=>"4", "organization"=>{}}
2022-12-12T23:27:28 [I|app|35e93c06] Authorized user admin(Admin User)
2022-12-12T23:27:28 [I|bac|35e93c06] Task {label: , execution_plan_id: ecb6fbbf-6319-4c27-9bec-cb746daab695} state changed: pending 
2022-12-12T23:27:28 [I|bac|35e93c06] Task {label: Actions::Katello::Organization::Destroy, id: 1a26c4b5-b59c-478a-8dcc-2999b05f32e9, execution_plan_id: ecb6fbbf-6319-4c27-9b
ec-cb746daab695} state changed: planning 
2022-12-12T23:27:30 [E|bac|35e93c06] Cannot modify association 'Katello::KTEnvironment#hosts' because it goes through more than one other association. (ActiveRecord::HasManyThroughNestedAssociationsAreReadonly)
 35e93c06 | /usr/share/gems/gems/activerecord-6.1.7/lib/active_record/associations/through_association.rb:104:in `ensure_not_nested'
 35e93c06 | /usr/share/gems/gems/activerecord-6.1.7/lib/active_record/associations/has_many_through_association.rb:131:in `delete_records'
 35e93c06 | /usr/share/gems/gems/activerecord-6.1.7/lib/active_record/associations/has_many_through_association.rb:127:in `delete_or_nullify_all_records'
 35e93c06 | /usr/share/gems/gems/activerecord-6.1.7/lib/active_record/associations/collection_association.rb:166:in `delete_all'
 35e93c06 | /usr/share/gems/gems/activerecord-6.1.7/lib/active_record/associations/collection_proxy.rb:473:in `delete_all'
 35e93c06 | /usr/share/gems/gems/activerecord-6.1.7/lib/active_record/associations/collection_proxy.rb:1044:in `clear'
 35e93c06 | /usr/share/gems/gems/katello-4.8.0.pre.master/app/lib/actions/katello/environment/destroy.rb:28:in `block in plan'

Seems this needs a fix similar to what I did here in the original, but I just missed this one.

And this made katello-nightly-rpm-pipeline #1518 [Jenkins] green, thanks!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.