Project

General

Profile

Bug #27814

Upgrade is failing on use whitelist "foreman-docker-remove-foreman-docker"

Added by Marek Hulán almost 3 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1745573

Description of problem:

Trying to upgrade satellite 6.5 to 6.6 Beta

The upgrade is failing on use whitelist "foreman-docker-remove-foreman-docker"

Version-Release number of selected component (if applicable):

  1. rpm -qa satellite
    satellite-6.6.0-5.beta.el7sat.noarch

How reproducible:

While upgrade

Steps to Reproduce:

  1. shopt -s checkhash
  2. hash -d foreman-maintain 2> /dev/null
  3. subscription-manager refresh
  4. subscription-manager repos --enable rhel-7-server-satellite-maintenance-6-beta-rpms --enable rhel-7-server-ansible-2.8-rpms
  5. yum install rubygem-foreman_maintain -y
  6. export FOREMAN_MAINTAIN_USE_BETA='1'
  7. foreman-maintain upgrade list-versions
  8. foreman-maintain upgrade check --target-version 6.6
  9. foreman-maintain upgrade run --target-version 6.6

Actual results:

Cleaning data...
... deleting records from taxable_taxonomies
... deleting filters
... deleting permissions
... deleting docker compute resources
--------------------------------------------------------------------------------
Scenario [Procedures after migrating to Satellite 6.6] failed.

The following steps ended up in failing state:

[foreman-docker-remove-foreman-docker]

Resolve the failed steps and rerun
the command. In case the failures are false positives,
use --whitelist="foreman-docker-remove-foreman-docker"

Expected results:

The upgrade should be completed successfully

Additional info:

ActiveRecord::InvalidForeignKey: PG::ForeignKeyViolation: ERROR: update or delete on table "compute_resources" violates foreign key constraint "fk_rails_61ca956e9a" on table "hostgroups"
DETAIL: Key (id)=(1) is still referenced from table "hostgroups".
: DELETE FROM "compute_resources" WHERE "compute_resources"."id" = $1

Caused by:
PG::ForeignKeyViolation: ERROR: update or delete on table "compute_resources" violates foreign key constraint "fk_rails_61ca956e9a" on table "hostgroups"
DETAIL: Key (id)=(1) is still referenced from table "hostgroups".

Associated revisions

Revision d4d2e1a8 (diff)
Added by Marek Hulán almost 3 years ago

Fixes #27814 - Cleanup hostgroup (#219)

Revision 4e3e2b58 (diff)
Added by Lukas Zapletal almost 3 years ago

Refs #27814 - cleanup remaining tables (#220)

History

#1 Updated by Marek Hulán almost 3 years ago

  • Subject changed from Upgrade is failing on use whitelist "foreman-docker-remove-foreman-docker" to Upgrade is failing on use whitelist "foreman-docker-remove-foreman-docker"

this may be related to the way we clean the docker plugin, hostgroup still pointing to compute resource that is being deleted

#2 Updated by Tomer Brisker almost 3 years ago

  • Project changed from Foreman Maintain to Docker

#3 Updated by The Foreman Bot almost 3 years ago

  • Assignee set to Marek Hulán
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman_docker/pull/219 added

#4 Updated by Anonymous almost 3 years ago

  • Status changed from Ready For Testing to Closed

#5 Updated by The Foreman Bot almost 3 years ago

  • Pull request https://github.com/theforeman/foreman_docker/pull/220 added

Also available in: Atom PDF