Project

General

Profile

Actions

Bug #22056

closed

Broken content view blocks the 6.2->6.3 upgrade and leaves the system in a broken state

Added by Kavita Gaikwad over 6 years ago. Updated about 2 months ago.

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

Description

Description of problem:

'foreman-maintain upgrade run --target-version 6.3' fails if there is an orphaned content view in the system. It leaves the system in a broken state and it's impossible to get any info from it using hammer/etc. (ERF64-6496 [Foreman::MaintenanceException]: There are migrations pending in the system.).
'foreman-maintain upgrade check --target-version 6.3' doesn't detect any problems.

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

How reproducible:
100%

Actual results: ====================================================================
$ foreman-maintain upgrade check --target-version 6.3

20170913183848 AddErrataCounts: migrating ================================
-- add_column(:katello_content_facets, :installable_security_errata_count, :integer, {:null=>false, :default=>0})
> 0.0328s
-
add_column(:katello_content_facets, :installable_enhancement_errata_count, :integer, {:null=>false, :default=>0})
> 0.0520s
-
add_column(:katello_content_facets, :installable_bugfix_errata_count, :integer, {:null=>false, :default=>0})
> 0.0316s
-
add_column(:katello_content_facets, :applicable_rpm_count, :integer, {:null=>false, :default=>0})
> 0.0338s
-
add_column(:katello_content_facets, :upgradable_rpm_count, :integer, {:null=>false, :default=>0})
> 0.0203s
foreman-rake db:migrate failed! Check the output for error!
Upgrade step migrate_foreman failed. Check logs for more information.
[FAIL]
Failed executing satellite-installer --upgrade, exit status 1
-------------------------------------------------------------------------------

Scenario [Migration scripts to Satellite 6.3] failed.

The following steps ended up in failing state:

[installer-upgrade]

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

$ hammer ping
ERF64-6496 [Foreman::MaintenanceException]: There are migrations pending in the system.

$ cat /var/log/foreman-installer/satellite.log
...
[DEBUG 2017-12-18 13:23:14 main] 20170223114114 LockSeededTemplates: migrating ============================rake aborted!
[DEBUG 2017-12-18 13:23:14 main] StandardError: An error has occurred, this and all later migrations canceled:
[DEBUG 2017-12-18 13:23:14 main]
[DEBUG 2017-12-18 13:23:14 main] Validation failed: Content view 'atomic-test' is not in environment 'Library'/opt/rh/rh-ror42/root/usr/share/gems/gems/activerecord-4.2.6/lib/active_record/validations.rb:79:in `raise_record_invalid'
[DEBUG 2017-12-18 13:23:14 main] /opt/rh/rh-ror42/root/usr/share/gems/gems/activerecord-4.2.6/lib/active_record/validations.rb:43:in `save!'
[DEBUG 2017-12-18 13:23:14 main] /opt/rh/rh-ror42/root/usr/share/gems/gems/activerecord-4.2.6/lib/active_record/attribute_methods/dirty.rb:29:in `save!'
[DEBUG 2017-12-18 13:23:14 main] /opt/rh/rh-ror42/root/usr/share/gems/gems/activerecord-4.2.6/lib/active_record/transactions.rb:291:in `block in save!'
...

====================================================================

Expected results:
foreman-maintain complains before installation.

Actions #1

Updated by Kavita Gaikwad over 6 years ago

  • Assignee set to Ashish Humbe
Actions #2

Updated by Justin Sherrill over 5 years ago

This is likely a duplicate of https://projects.theforeman.org/issues/24768

Actions #3

Updated by Eric Helms about 2 months ago

  • Status changed from New to Rejected
Actions

Also available in: Atom PDF