katello:upgrade_check failing with error "Expect initializer to return hash if a group of attributes is defined by lazy_accessor" on Red Hat Satellite 6

Solution Verified - Updated -

Environment

  • Red Hat Satellite 6.1

Issue

  • Red Hat Satellite 6.1 to 6.2 upgrade failing on upgrade check:
Checking content hosts...
Calculating Host changes on upgrade.  This may take a few minutes.
rake aborted!
Expect initializer to return hash if a group of attributes is defined by lazy_accessor
Tasks: TOP => katello:preupgrade_content_host_check
(See full trace by running task with --trace)

Resolution

  • Check whether there are any systems exist without the UUIDs:
# su - postgres -c "echo \"select * from katello_systems where uuid is null\" | psql foreman"
  • If the result is non-zero, delete those systems from database(use the system ID from above command):
# su - postgres -c "echo \"delete from katello_system_activation_keys where system_id=1000\" | psql foreman"
# su - postgres -c "echo \"delete from katello_system_repositories where system_id=1000\" | psql foreman"
# su - postgres -c "echo \"delete from katello_systems where id=1000\" | psql foreman"

Root Cause

  • This is a known Bug and manually removing those systems will fix the issue.

Diagnostic Steps

  • Complete traceback:
# foreman-rake katello:upgrade_check
This script makes no modifications and can be re-run multiple times for the most up to date results.
Checking upgradeability...
Checking for running tasks...
[PASS] - There are 0 active tasks.
Checking the current version...
[PASS] - Current version of the Katello Ruby RPM is 2.2.0.95 and needs to greater than or equal to 2.2.0.90
Checking content hosts...
Calculating Host changes on upgrade.  This may take a few minutes.
rake aborted!
Expect initializer to return hash if a group of attributes is defined by lazy_accessor
Tasks: TOP => katello:preupgrade_content_host_check
(See full trace by running task with --trace)

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments