Hide Forgot
Description of problem: In Satellite upgrade,installer failed with exit status 6 in the db:migrate stage. Version-Release number of selected component (if applicable): 6.10 Snap21 How reproducible: always Steps to Reproduce: 1. Prepare the 6.9.z setup using the upgrade template. 2. Run the pre-migration steps before running the upgrade for 6.10 snap21. 3. Pulp migration completes successfully. 4. Run the upgrade, with BZ#2009630 workaround. 5. In the upgrade, satellite-installer failed in the db:migrate stage. stage.the/Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: change from 'notrun' to ['0'] failed: '/usr/sbin/foreman-rake db:migrate' returned 1 instead of one of [0] Actual results: foreman-rake-db:migrate failed in the installer Expected results: foreman-rake-db:migrate should be completed successfully. Additional info:
the backtrace in the installer log looks like this: 2021-10-04 04:40:23 [INFO ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: undefined method `upstream_authentication_token=' for #<Katello::RootRepository:0x00000000145d 2cd0> 2021-10-04 04:40:23 [INFO ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: Did you mean? upstream_authentication_token 2021-10-04 04:40:23 [INFO ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: upstream_authentication_token_in_db 2021-10-04 04:40:23 [INFO ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: /opt/theforeman/tfm/root/usr/share/gems/gems/activemodel-6.0.3.7/lib/active_model/attribute_me thods.rb:432:in `method_missing' 2021-10-04 04:40:23 [INFO ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: /opt/theforeman/tfm/root/usr/share/gems/gems/audited-4.9.0/lib/audited/auditor.rb:99:in `metho d_missing' 2021-10-04 04:40:23 [INFO ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: /opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.1.1.29/app/models/katello/root_reposito ry.rb:304:in `ensure_valid_authentication_token' this points at this commit: https://gitlab.sat.engineering.redhat.com/satellite6/katello/-/commit/7b226bb1f4b361b960cd94269520a1e611919fb7
Is the problem that it's failing during "20210512192745 FixRedHatRootRepositoryArch" migration, but the token is only added in 20210831161843 "AddUpstreamAuthTokenToRootRepository"? (I missed the following line from aboves paste: 2021-10-04 04:40:23 [INFO ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: /opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.1.1.29/db/migrate/20210512192745_fix_red_hat_root_repository_arch.rb:5:in `up' )
Funny. If I execute that migration manually, I can then migrate all: [root@dhcp-3-75 ~]# foreman-rake db:migrate:up VERSION=20210831161843 API controllers newer than Apipie cache! Run apipie:cache rake task to regenerate cache. == 20210831161843 AddUpstreamAuthTokenToRootRepository: migrating ============= -- add_column(:katello_root_repositories, :upstream_authentication_token, :string, {:limit=>1024}) -> 0.0022s == 20210831161843 AddUpstreamAuthTokenToRootRepository: migrated (0.0023s) ==== [root@dhcp-3-75 ~]# foreman-rake db:migrate API controllers newer than Apipie cache! Run apipie:cache rake task to regenerate cache. == 20210512192745 FixRedHatRootRepositoryArch: migrating ====================== == 20210512192745 FixRedHatRootRepositoryArch: migrated (0.1125s) ============= == 20210525144427 EnforceUniqueTemplates: migrating =========================== -- add_index(:templates, [:type, :name], {:unique=>true}) -> 0.0072s == 20210525144427 EnforceUniqueTemplates: migrated (0.0169s) ================== == 20210608100743 DeleteRhevmProfiles: migrating ============================== == 20210608100743 DeleteRhevmProfiles: migrated (0.0140s) ===================== == 20210609093404 DropOverrideTaxonomiesFromFilter: migrating ================= == 20210609093404 DropOverrideTaxonomiesFromFilter: migrated (0.0502s) ======== == 20210610131920 RestrictSendmailLocation: migrating ========================= == 20210610131920 RestrictSendmailLocation: migrated (0.0030s) ================ == 20210909140337 AddLastIndexedToRepos: migrating ============================ -- add_column(:katello_repositories, :last_indexed, :datetime, {:default=>Wed, 31 Dec 1969 19:00:00 -0500}) -> 0.0028s == 20210909140337 AddLastIndexedToRepos: migrated (0.0031s) =================== == 20210910190324 MoveBackgroundSettingsToImmediate: migrating ================ == 20210910190324 MoveBackgroundSettingsToImmediate: migrated (0.0327s) ======= This is obviously not how it should be fixed, but interesting…
Created redmine issue https://projects.theforeman.org/issues/33629 from this bug
- rhel-7-server-ansible-2.9-rpms - rhel-7-server-ansible-2-rpms you seem to have/had conflicting Ansible repos enabled, which messed up your system
(In reply to Evgeni Golov from comment #9) > - rhel-7-server-ansible-2.9-rpms > - rhel-7-server-ansible-2-rpms > > you seem to have/had conflicting Ansible repos enabled, which messed up your > system right, so dogfood CVs and activation keys --
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Moderate: Satellite 6.10 Release), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2021:4702