Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2139369 - can't save bootdisk settings on an upgraded Satellite 6.12
Summary: can't save bootdisk settings on an upgraded Satellite 6.12
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Bootdisk Plugin
Version: 6.12.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: 6.12.0
Assignee: Evgeni Golov
QA Contact: Roman Plevka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-11-02 10:14 UTC by Evgeni Golov
Modified: 2022-11-16 13:35 UTC (History)
3 users (show)

Fixed In Version: foreman_bootdisk-19.0.7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-11-16 13:35:51 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 35705 0 Normal New can't save bootdisk settings on an upgraded Satellite 6.12 2022-11-02 10:54:49 UTC
Red Hat Product Errata RHSA-2022:8506 0 None None None 2022-11-16 13:35:57 UTC

Description Evgeni Golov 2022-11-02 10:14:26 UTC
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.

Comment 1 Evgeni Golov 2022-11-02 10:54:49 UTC
Created redmine issue https://projects.theforeman.org/issues/35705 from this bug

Comment 2 Bryan Kearney 2022-11-02 12:03:34 UTC
Upstream bug assigned to lzap

Comment 3 Bryan Kearney 2022-11-02 12:03:37 UTC
Upstream bug assigned to lzap

Comment 5 Bryan Kearney 2022-11-02 16:03:37 UTC
Upstream bug assigned to lzap

Comment 6 Bryan Kearney 2022-11-02 16:03:38 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/35705 has been resolved.

Comment 8 Roman Plevka 2022-11-03 21:41:10 UTC
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)

Comment 11 errata-xmlrpc 2022-11-16 13:35:51 UTC
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


Note You need to log in before you can comment on or make changes to this bug.