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 1559108 - 6.3 upgrade causes missing Templates history
Summary: 6.3 upgrade causes missing Templates history
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Provisioning Templates
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Ranjan Kumar
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-03-21 17:19 UTC by Sean O'Keeffe
Modified: 2021-06-10 15:27 UTC (History)
7 users (show)

Fixed In Version: foreman-1.15.6.41-1,foreman-1.15.6.44-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1572301 (view as bug list)
Environment:
Last Closed: 2018-06-19 20:17:00 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 22984 0 Normal Closed upgrade causes missing Templates history 2020-05-11 05:56:16 UTC
Github /theforeman foreman pull 5632 0 None None None 2020-05-11 05:56:16 UTC
Red Hat Product Errata RHBA-2018:1950 0 None None None 2018-06-19 20:17:33 UTC

Description Sean O'Keeffe 2018-03-21 17:19:32 UTC
Description of problem:

After upgrading to 6.3 i see no history for my provisioning template 


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

How reproducible:
not sure


Steps to Reproduce:
1. build 6.2
2. create custom Provisioning Template
3. makes a change to that Template
4. check history tab for you change
5. Upgrade to 6.3
6. go to the history tab and no history will be displayed

Actual results:

no history is displayed

Expected results:

All previous history is displayed

Additional info:

It seems in 6.2 they were saved in the audit table as `:auditable_type => Template` whereas 6.3 they look like they are `:auditable_type => ProvisioningTemplate` and there has been no migration.




irb(main):028:0* Audit.descending.where(:auditable_id => 111, :auditable_type => Template, :action => 'update').count
=> 82
irb(main):029:0> Audit.descending.where(:auditable_id => 111, :auditable_type => Template, :action => 'update').first.created_at
=> Fri, 16 Mar 2018 15:46:56 UTC +00:00
irb(main):030:0> Audit.descending.where(:auditable_id => 111, :auditable_type => ProvisioningTemplate, :action => 'update').count
=> 2
irb(main):031:0> Audit.descending.where(:auditable_id => 111, :auditable_type => ProvisioningTemplate, :action => 'update').first.created_at
=> Wed, 21 Mar 2018 16:27:25 UTC +00:00

We upgraded on the morning of 21 Mar 2018

Comment 2 Sean O'Keeffe 2018-03-21 17:54:40 UTC
This looks like to be caused by https://github.com/theforeman/foreman/commit/5908bf418d28c57dcdc4d2e01ccf3253c0e8a81a I'm not sure why that migration was written like that? Or if they *should* be stored as ProvisioningTemplates or Templates?

Comment 6 Satellite Program 2018-03-22 14:27:54 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/22984 has been resolved.

Comment 20 Ranjan Kumar 2018-06-12 06:01:01 UTC
Verified on satellite  6.3.2 2.0

Steps:
  1. Build Satellite 6.3.1
  2. Created new provisioning template
  3. modified the provisioning template
  4. Upgraded Satellite to 6.3.2 2.0

[root@rhel7-sat62-4 migrate]# rpm -qa | grep foreman
foreman-1.15.6.45-1.el7sat.noarch

I can see Provisioning template history after upgrade to satellite 6.3.2 2.0

Comment 22 errata-xmlrpc 2018-06-19 20:17:00 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, 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/RHBA-2018:1950


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