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 2134682 - Getting "undefined method `schema_version' for nil:NilClass" while syncing from quay.io
Summary: Getting "undefined method `schema_version' for nil:NilClass" while syncing fr...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Container Management - Content
Version: 6.11.3
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: 6.13.0
Assignee: Ian Ballou
QA Contact: Lucy Fu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-10-14 02:44 UTC by Alexey Masolov
Modified: 2023-09-19 04:28 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2175002 (view as bug list)
Environment:
Last Closed: 2023-05-03 13:22:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
RHEL 7 Hotfix RPM for Satellite 6.11.5 (10.57 MB, application/x-rpm)
2023-05-08 20:40 UTC, Ian Ballou
no flags Details
RHEL 8 Hotfix RPM for Satellite 6.11.5 (10.51 MB, application/x-rpm)
2023-05-08 20:47 UTC, Ian Ballou
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 35709 0 Normal Closed Getting "undefined method `schema_version' for nil:NilClass" while syncing from quay.io 2023-02-21 14:46:07 UTC
Red Hat Issue Tracker SAT-13692 0 None None None 2022-11-30 08:46:12 UTC
Red Hat Issue Tracker SAT-17552 0 None None None 2023-05-11 09:08:59 UTC
Red Hat Knowledge Base (Solution) 7007262 0 None None None 2023-05-02 02:29:10 UTC
Red Hat Product Errata RHSA-2023:2097 0 None None None 2023-05-03 13:23:24 UTC

Description Alexey Masolov 2022-10-14 02:44:07 UTC
Description of problem:
Can't sync containers hosted on quay.io. Getting "undefined method `schema_version' for nil:NilClass" as part of Actions::Katello::Repository::IndexContent step

===
2022-10-14T12:07:27 [I|aud|c3ba92c1] Katello::Repository (2904) update event on last_contents_changed 2022-10-14 12:03:36 +1100, 2022-10-14 12:07:27 +1100
2022-10-14T12:07:27 [I|aud|c3ba92c1] Katello::Repository (2904) update event on version_href /pulp/api/v3/repositories/container/container/1b38c4c0-71cc-4b00-83d2-94d7223205f6/versions/0/, /pulp/api/v3/repositories/container/container/1b38c4c0-71cc-4b00-83d2-94d72232
05f6/versions/1/
2022-10-14T12:07:29 [I|app|c3ba92c1] CONTENT_INDEX type=Katello::DockerManifest success=true duration=316.78
2022-10-14T12:07:29 [I|app|c3ba92c1] CONTENT_INDEX type=Katello::DockerManifestList success=true duration=289.08
2022-10-14T12:07:30 [I|app|c3ba92c1] CONTENT_INDEX type=Katello::DockerTag success=false duration=453.59
2022-10-14T12:07:30 [E|bac|c3ba92c1] undefined method `schema_version' for nil:NilClass (NoMethodError)
 c3ba92c1 | /usr/share/gems/gems/katello-4.3.0.49/app/models/katello/docker_meta_tag.rb:177:in `block in get_tag_table_values'
 c3ba92c1 | /usr/share/gems/gems/katello-4.3.0.49/app/models/katello/docker_meta_tag.rb:176:in `each'
 c3ba92c1 | /usr/share/gems/gems/katello-4.3.0.49/app/models/katello/docker_meta_tag.rb:176:in `map'
 c3ba92c1 | /usr/share/gems/gems/katello-4.3.0.49/app/models/katello/docker_meta_tag.rb:176:in `get_tag_table_values'
 c3ba92c1 | /usr/share/gems/gems/katello-4.3.0.49/app/models/katello/docker_meta_tag.rb:138:in `block in import_meta_tags'
 c3ba92c1 | /usr/share/gems/gems/katello-4.3.0.49/app/models/katello/docker_meta_tag.rb:137:in `each'
 c3ba92c1 | /usr/share/gems/gems/katello-4.3.0.49/app/models/katello/docker_meta_tag.rb:137:in `import_meta_tags'
 c3ba92c1 | /usr/share/gems/gems/katello-4.3.0.49/app/models/katello/docker_tag.rb:63:in `import_for_repository'
 c3ba92c1 | /usr/share/gems/gems/katello-4.3.0.49/app/models/katello/repository.rb:924:in `block (2 levels) in index_content'
 c3ba92c1 | /usr/share/gems/gems/katello-4.3.0.49/app/lib/katello/logging.rb:8:in `time'
 c3ba92c1 | /usr/share/gems/gems/katello-4.3.0.49/app/models/katello/repository.rb:920:in `block in index_content'
 c3ba92c1 | /usr/share/gems/gems/katello-4.3.0.49/app/models/katello/repository.rb:919:in `each'
 c3ba92c1 | /usr/share/gems/gems/katello-4.3.0.49/app/models/katello/repository.rb:919:in `index_content'
 c3ba92c1 | /usr/share/gems/gems/katello-4.3.0.49/app/lib/actions/katello/repository/index_content.rb:22:in `run'
 c3ba92c1 | /usr/share/gems/gems/dynflow-1.6.4/lib/dynflow/action.rb:582:in `block (3 levels) in execute_run'
 c3ba92c1 | /usr/share/gems/gems/dynflow-1.6.4/lib/dynflow/middleware/stack.rb:27:in `pass'
 c3ba92c1 | /usr/share/gems/gems/dynflow-1.6.4/lib/dynflow/middleware.rb:19:in `pass'
 c3ba92c1 | /usr/share/gems/gems/foreman-tasks-5.2.3/app/lib/actions/middleware/rails_executor_wrap.rb:14:in `block in run'
 c3ba92c1 | /usr/share/gems/gems/activesupport-6.0.4.7/lib/active_support/execution_wrapper.rb:91:in `wrap'
 c3ba92c1 | /usr/share/gems/gems/foreman-tasks-5.2.3/app/lib/actions/middleware/rails_executor_wrap.rb:13:in `run'
 c3ba92c1 | /usr/share/gems/gems/dynflow-1.6.4/lib/dynflow/middleware/stack.rb:23:in `call'
 c3ba92c1 | /usr/share/gems/gems/dynflow-1.6.4/lib/dynflow/middleware/stack.rb:27:in `pass'
 c3ba92c1 | /usr/share/gems/gems/dynflow-1.6.4/lib/dynflow/middleware.rb:19:in `pass'
 c3ba92c1 | /usr/share/gems/gems/dynflow-1.6.4/lib/dynflow/action/progress.rb:31:in `with_progress_calculation'
 c3ba92c1 | /usr/share/gems/gems/dynflow-1.6.4/lib/dynflow/action/progress.rb:17:in `run'
 c3ba92c1 | /usr/share/gems/gems/dynflow-1.6.4/lib/dynflow/middleware/stack.rb:23:in `call'
 c3ba92c1 | /usr/share/gems/gems/dynflow-1.6.4/lib/dynflow/middleware/stack.rb:27:in `pass'
 c3ba92c1 | /usr/share/gems/gems/dynflow-1.6.4/lib/dynflow/middleware.rb:19:in `pass'


 ===

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

How reproducible:
100%

Steps to Reproduce:
1. Create a new container repository in Satellite:
     - registry url: https://quay.io/
     - upstream repo: ansible/ansible-runner
2. Sync


Actual results:
undefined method `schema_version' for nil:NilClass

Expected results:
Succesfull sync

Additional info:

Comment 1 Ian Ballou 2022-11-02 19:12:00 UTC
I tested this on 6.11 and saw the issue as well. It's a duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=2125244, so I'm closing this accordingly.   The issue is fixed and verified on Satellite 6.12.

*** This bug has been marked as a duplicate of bug 2125244 ***

Comment 2 Ian Ballou 2022-11-02 19:59:48 UTC
Apologies, I looked into this and it is NOT a duplicate of 2125244.

I think it is because there is a manifest type that Katello is not expecting: 'application/vnd.oci.image.index.v1+json'

Related code for manifest type filtering is here: https://github.com/Katello/katello/blob/eef975fa903a2ef9f079ab0365d47d2601977f74/app/services/katello/pulp3/docker_manifest.rb#L18

Comment 3 Ian Ballou 2022-11-02 20:41:58 UTC
Created redmine issue https://projects.theforeman.org/issues/35709 from this bug

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

Comment 18 Arzoo Singh 2023-04-13 17:00:58 UTC
Hi @iballou 
I have sent a hotfix request to satellite-prio

Comment 21 errata-xmlrpc 2023-05-03 13:22:16 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.13 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-2023:2097

Comment 22 Ian Ballou 2023-05-08 20:40:56 UTC
Created attachment 1963403 [details]
RHEL 7 Hotfix RPM for Satellite 6.11.5

A Hotfix RPM for Satellite 6.11.5 on RHEL 7 is now available.

INSTALL INSTRUCTIONS (Satellite 6.11.5 on RHEL7):

1. Take a complete backup or snapshot of the Satellite 6.11.5 server

2. Download the hotfix RPM from this message's attachment.

3. # yum localinstall tfm-rubygem-katello-4.3.0.52-2.HOTFIXRHBZ2134682.el7sat.noarch.rpm --disableplugin=foreman-protector

4. # satellite-maintain service restart

Comment 23 Ian Ballou 2023-05-08 20:47:02 UTC
Created attachment 1963404 [details]
RHEL 8 Hotfix RPM for Satellite 6.11.5

A Hotfix RPM for Satellite 6.11.5 on RHEL 8 is now available.

INSTALL INSTRUCTIONS (Satellite 6.11.5 on RHEL8):

1. Take a complete backup or snapshot of the Satellite 6.11.5 server

2. Download the hotfix RPM from this message's attachment.

3. # yum localinstall rubygem-katello-4.3.0.52-2.HOTFIXRHBZ2134682.el8sat.noarch.rpm --disableplugin=foreman-protector

4. # satellite-maintain service restart

Comment 24 Red Hat Bugzilla 2023-09-19 04:28:13 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days


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