Bug 1480456 - Upgrade fails with Validation failed: Providers is invalid
Summary: Upgrade fails with Validation failed: Providers is invalid
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Upgrades
Version: 6.2.10
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Unspecified
Assignee: Lukas Zapletal
QA Contact: Jitendra Yejare
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-08-11 07:39 UTC by Lukas Zapletal
Modified: 2021-03-11 15:34 UTC (History)
8 users (show)

Fixed In Version: rubygem-katello-3.4.5
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-21 16:54:37 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 20558 0 Normal Closed Seed fails when anonymous provider is already present 2020-09-11 13:56:23 UTC

Description Lukas Zapletal 2017-08-11 07:39:18 UTC
A customer is hitting "ActiveRecord::RecordInvalid: Validation failed: Providers is invalid" during "db/seeds.d/102-organizations.rb". Futher investigation reveals that create_anonymous_provider is called when there is already anonymous provider present. They had anonymous but not redhat, perhaps they run into issues during migration or script during their upgrade.

We don't know how this happened, but this is not important. What's important that the 102-organizations.rb seed script is supposed to be idempotent, there is a big banner at the top, but these lines are definitely not idempotent. My patch will fix that.

Patch upstream is small (two lines in seed script) therefore I suggest to backport this into 6.2 for better upgrade experience. Setting high severity as this is an upgrade issue.

Comment 2 Satellite Program 2017-08-11 10:01:26 UTC
Upstream bug assigned to lzap

Comment 3 Satellite Program 2017-08-11 10:01:29 UTC
Upstream bug assigned to lzap

Comment 5 Satellite Program 2017-08-25 22:19:15 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/20558 has been resolved.

Comment 7 Jitendra Yejare 2017-12-12 09:57:19 UTC
Verified !

@ Satellite 6.3 snap 28
@ Satellite 6.2.13 snap 2


I cannot create anonymous provider as the customer has created but As per standard procedure to upgrade satellite 6.1 to 6.2 and 6.2 to 6.3 are successful in the latest snaps(as stated above).


Hence changing the state to Verified.

Comment 9 Satellite Program 2018-02-21 16:54:37 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/RHSA-2018:0336


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