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 2278566 - Content view publish failing with katello_repository_rpms_id_seq reached maximum value error [NEEDINFO]
Summary: Content view publish failing with katello_repository_rpms_id_seq reached maxi...
Keywords:
Status: VERIFIED
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Content Views
Version: 6.13.6
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: stream
Assignee: Ian Ballou
QA Contact: Satellite QE Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-05-02 04:35 UTC by Ashfaqur Rahaman
Modified: 2024-05-29 19:00 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:
Embargoed:
arahaman: needinfo? (satellite6-bugs)


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 37403 0 Normal Closed Content view publish failing with katello_repository_rpms_id_seq reached maximum value error 2024-05-07 21:27:23 UTC
Red Hat Issue Tracker SAT-24878 0 None None None 2024-05-02 04:39:08 UTC

Description Ashfaqur Rahaman 2024-05-02 04:35:25 UTC
Description of problem:

Unable to publish the content view due to limitation of katello_repository_rpms_id_seq because it is set as integer type. The "id" column of the table "katello_repository_rpms" is set as bigint however, the sequence "katello_repository_rpms_id_seq" is set as Integer. Therefore, the sequence limit to max integer value +2,147,483,647. When this limit reaches, CU can not publish/promote content view with this below error:  
~~~
PG::SequenceGeneratorLimitExceeded: ERROR: nextval: reached maximum value of sequence "katello_repository_rpms_id_seq" (2147483647)
~~~

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

How reproducible:
100%

Actual results:
CV publish failing with the maximum value reached error. 

Expected results:
CV publish should be successful 

Additional info:

# \d katello_repository_rpms;
                                          Table "public.katello_repository_rpms"
    Column     |            Type             | Collation | Nullable |                       Default
---------------+-----------------------------+-----------+----------+-----------------------------------------------------
 id            | bigint                      |           | not null | nextval('katello_repository_rpms_id_seq'::regclass). <===========
 rpm_id        | integer                     |           | not null |
 repository_id | integer                     |           |          |
 created_at    | timestamp without time zone |           |          |
 updated_at    | timestamp without time zone |           |          |


# \d katello_repository_rpms_id_seq;'"
           Sequence "public.katello_repository_rpms_id_seq"
  Type   | Start | Minimum |  Maximum   | Increment | Cycles? | Cache 
---------+-------+---------+------------+-----------+---------+-------
 integer |     1 |       1 | 2147483647 |         1 | no      |     1


# select * from pg_sequences where sequencename='katello_repository_rpms_id_seq';
 schemaname |          sequencename          | sequenceowner | data_type | start_value | min_value | max_value  | increment_by | cycle | cache_size | last_value
 
------------+--------------------------------+---------------+-----------+-------------+-----------+------------+--------------+-------+------------+-----------
-
 public     | katello_repository_rpms_id_seq | foreman       | integer   |           1 |         1 | 2147483647 |            1 | f     |          1 | 2147483647
(1 row)

There was a Bug-1793701 which fixed (6.7) the "id" column from "int" type to "Biginit" , but it it seems for new installation the seq is still set as "int" type. checked in 6.11/6.12/6.13

Comment 9 Ian Ballou 2024-05-02 19:16:57 UTC
Created redmine issue https://projects.theforeman.org/issues/37403 from this bug

Comment 12 Eric Helms 2024-05-16 16:18:49 UTC
Upstream bug assigned to iballou

Comment 13 Eric Helms 2024-05-16 16:18:52 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/37403 has been resolved.

Comment 14 Sam Bible 2024-05-22 21:20:45 UTC
Version-Release number of selected component (if applicable):
6.16 - Stream 60

How reproducible:
Always

Steps to Reproduce:
1. Login to the command line of Satellite, and access the foreman postgres shell (sudo -u postgres psql foreman)
2. Run the following command: select * from pg_sequences where sequencename='katello_repository_rpms_id_seq'; 

Actual results:
The data_type of this field (katello_repository_rpms_id_seq) is bigint, and isn't integer.

Expected results:
The data_type of this field (katello_repository_rpms_id_seq) is bigint, and isn't integer.


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