Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1646748

Summary: Upgrade to Satellite 6.4 is failning on script 20180516103339_update_idm_params.rb
Product: Red Hat Satellite Reporter: Mike McCune <mmccune>
Component: BrandingAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Nikhil Kathole <nkathole>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.4CC: cmarinea, inecas, jjansky, mbacovsk, pcreech, pdwyer, sghai, sshtein, zhunting
Target Milestone: 6.4.1Keywords: PrioBumpGSS, Triaged, Upgrades
Target Release: Unused   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1641017 Environment:
Last Closed: 2018-12-06 22:32:53 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
pre_upgrade screenshot
none
post_upgrade screenshot none

Comment 2 Ivan Necas 2018-11-16 09:20:09 UTC
The easiest way to reproduce is via foreman-rake console in sat 63 before upgrade:

```
param = CommonParameter.new(name: 'idm_server invalid', value: 'example.com')
param.save(:validate => false)
```

This will simulate a presence of invalid parameter. The upgrade should succeed with this and its value should be 'freeipa_server invalid'/

Comment 3 Nikhil Kathole 2018-11-16 11:04:55 UTC
VERIFIED

Version tested:
Satellite 6.3.5 -> 6.4.1 upgrade

# foreman-rake console
Loading production environment (Rails 4.2.6)
irb(main):001:0> param = CommonParameter.new(name: 'idm_server invalid', value: 'example.com')
=> #<CommonParameter id: nil, name: "idm_server invalid", value: "example.com", reference_id: nil, created_at: nil, updated_at: nil, type: "CommonParameter", priority: nil, hidden_value: false>
irb(main):002:0> param.save(:validate => false)
=> true
irb(main):003:0> 



 Upgrade Step: migrate_foreman...
 /usr/share/foreman/lib/foreman.rb:8: warning: already initialized constant Foreman::UUID_REGEXP
 /usr/share/foreman/lib/foreman.rb:8: warning: previous definition of UUID_REGEXP was here
 /usr/share/foreman/lib/core_extensions.rb:182: warning: already initialized constant ActiveSupport::MessageEncryptor::DEFAULT_CIPHER
 /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.6/lib/active_support/message_encryptor.rb:22: warning: previous definition of DEFAULT_CIPHER was here
 /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0.42/app/models/katello/concerns/content_facet_host_extensions.rb:7: warning: already initialized constant Katello::Concerns::ContentFacetHostExtensions::ERRATA_STATUS_MAP
 /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0.42/app/models/katello/concerns/content_facet_host_extensions.rb:7: warning: previous definition of ERRATA_STATUS_MAP was here
 /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0.42/app/models/katello/concerns/content_facet_host_extensions.rb:14: warning: already initialized constant Katello::Concerns::ContentFacetHostExtensions::TRACE_STATUS_MAP
 /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0.42/app/models/katello/concerns/content_facet_host_extensions.rb:14: warning: previous definition of TRACE_STATUS_MAP was here
 /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0.42/app/models/katello/concerns/subscription_facet_host_extensions.rb:13: warning: already initialized constant Katello::Concerns::SubscriptionFacetHostExtensions::SUBSCRIPTION_STATUS_MAP
 /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0.42/app/models/katello/concerns/subscription_facet_host_extensions.rb:13: warning: previous definition of SUBSCRIPTION_STATUS_MAP was here
 foreman-rake db:migrate finished successfully!

Comment 4 Nikhil Kathole 2018-11-16 11:05:56 UTC
Created attachment 1506387 [details]
pre_upgrade screenshot

Comment 5 Nikhil Kathole 2018-11-16 11:06:25 UTC
Created attachment 1506388 [details]
post_upgrade screenshot

Comment 7 errata-xmlrpc 2018-12-06 22:32:53 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:3799