Bug 2139369
| Summary: | can't save bootdisk settings on an upgraded Satellite 6.12 | ||
|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | Evgeni Golov <egolov> |
| Component: | Bootdisk Plugin | Assignee: | Evgeni Golov <egolov> |
| Status: | CLOSED ERRATA | QA Contact: | Roman Plevka <rplevka> |
| Severity: | high | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.12.0 | CC: | lstejska, lzap, pcreech |
| Target Milestone: | 6.12.0 | Keywords: | Triaged, Upgrades |
| Target Release: | Unused | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | foreman_bootdisk-19.0.7 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2022-11-16 13:35:51 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
Created redmine issue https://projects.theforeman.org/issues/35705 from this bug Upstream bug assigned to lzap Upstream bug assigned to lzap Upstream bug assigned to lzap Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/35705 has been resolved. VERIFIED on snap_6.12.0_16.0 bootdisk settings can be successfully changed and work also performed a regression testing for the bootdisk component. (full host image and subnet image provisioning) 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 (Important: Satellite 6.12 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-2022:8506 |
Description of problem: On a setup that has been upgraded from 6.11, one can't save any Bootdisk related settings. Version-Release number of selected component (if applicable): rubygem-foreman_bootdisk-19.0.6-1.el8sat.noarch satellite-6.12.0-4.el8sat.noarch How reproducible: 100% Steps to Reproduce: 1. install 6.11 2. upgrade to 6.12 3. go to settings → bootdisk 4. try to edit a setting, like Grub2 directory Actual results: 500 Error production log reads: 2022-11-02T06:01:22 [I|app|3956271e] Started PUT "/api/settings/bootdisk_grub2_dir" for 10.39.195.157 at 2022-11-02 06:01:22 -0400 2022-11-02T06:01:22 [I|app|3956271e] Processing by Api::V2::SettingsController#update as JSON 2022-11-02T06:01:22 [I|app|3956271e] Parameters: {"setting"=>{"value"=>"[FILTERED]"}, "apiv"=>"v2", "id"=>"bootdisk_grub2_dir"} 2022-11-02T06:01:22 [W|app|3956271e] Action failed 2022-11-02T06:01:22 [I|app|3956271e] Backtrace for 'Action failed' error (ActiveRecord::SubclassNotFound): Invalid single-table inheritance type: Setting::Bootdisk is not a subclass of Setting 3956271e | /usr/share/gems/gems/activerecord-6.0.4.7/lib/active_record/inheritance.rb:241:in `find_sti_class' 3956271e | /usr/share/gems/gems/activerecord-6.0.4.7/lib/active_record/inheritance.rb:215:in `discriminate_class_for_record' 3956271e | /usr/share/gems/gems/activerecord-6.0.4.7/lib/active_record/persistence.rb:257:in `instantiate' 3956271e | /usr/share/gems/gems/activerecord-6.0.4.7/lib/active_record/querying.rb:58:in `block (2 levels) in find_by_sql' 3956271e | /usr/share/gems/gems/activerecord-6.0.4.7/lib/active_record/result.rb:62:in `block in each' 3956271e | /usr/share/gems/gems/activerecord-6.0.4.7/lib/active_record/result.rb:62:in `each' 3956271e | /usr/share/gems/gems/activerecord-6.0.4.7/lib/active_record/result.rb:62:in `each' 3956271e | /usr/share/gems/gems/activerecord-6.0.4.7/lib/active_record/querying.rb:58:in `map' 3956271e | /usr/share/gems/gems/activerecord-6.0.4.7/lib/active_record/querying.rb:58:in `block in find_by_sql' 3956271e | /usr/share/gems/gems/activesupport-6.0.4.7/lib/active_support/notifications/instrumenter.rb:24:in `instrument' 3956271e | /usr/share/gems/gems/activerecord-6.0.4.7/lib/active_record/querying.rb:56:in `find_by_sql' 3956271e | /usr/share/gems/gems/activerecord-6.0.4.7/lib/active_record/relation.rb:824:in `block in exec_queries' 3956271e | /usr/share/gems/gems/activerecord-6.0.4.7/lib/active_record/relation.rb:842:in `skip_query_cache_if_necessary' 3956271e | /usr/share/gems/gems/activerecord-6.0.4.7/lib/active_record/relation.rb:811:in `exec_queries' 3956271e | /usr/share/gems/gems/activerecord-6.0.4.7/lib/active_record/relation.rb:626:in `load' 3956271e | /usr/share/gems/gems/activerecord-6.0.4.7/lib/active_record/relation.rb:250:in `records' 3956271e | /usr/share/gems/gems/activerecord-6.0.4.7/lib/active_record/relation/finder_methods.rb:499:in `find_take' 3956271e | /usr/share/gems/gems/activerecord-6.0.4.7/lib/active_record/relation/finder_methods.rb:98:in `take' 3956271e | /usr/share/gems/gems/activerecord-6.0.4.7/lib/active_record/relation/finder_methods.rb:81:in `find_by' 3956271e | /usr/share/gems/gems/activerecord-6.0.4.7/lib/active_record/querying.rb:21:in `find_by' 3956271e | /usr/share/gems/gems/activerecord-6.0.4.7/lib/active_record/core.rb:183:in `find_by' 3956271e | /usr/share/foreman/app/services/setting_registry.rb:181:in `_find_or_new_db_record' 3956271e | /usr/share/foreman/app/services/setting_registry.rb:82:in `set_user_value' 3956271e | /usr/share/foreman/app/controllers/api/v2/settings_controller.rb:54:in `update' Expected results: No error, setting is saved Additional info: This is because the DB was not migrated to use `Setting` instead of `Setting::Bootdisk` as the category of the settings.