-
Bug
-
Resolution: Done
-
Major
-
None
-
6.15.z
-
1
-
False
-
Important
-
Phoenix Sprint 151, Phoenix Sprint 152
-
sat-artemis
-
None
-
None
-
None
-
No Coverage
Under certain conditions, Red Hat Satellite may show the following error i.e.
ERROR: nextval: reached maximum value of sequence "katello_erratum_packages_id_seq" (2147483647)
when trying to sync too many repos ( initiating several sync plans at once ) at once. Perhaps too many erratas were being synced into the satellite and that has reached the maximum value set for katello_erratum_packages_id_seq sequence related to katello_erratum_packages table in foreman\katello.
We have fixed a similar bug for katello_repository_rpms_id_seq by changing it's data type to bigint via https://issues.redhat.com/browse/SAT-25756 in Sat 6.15.2+ . Perhaps we need to do the same for katello_erratum_packages_id_seq as well.
NOTE: Once it happens, this is a blocker for that user and he\she cannot perform any further repo sync tasks successfully. The issue can happen with 6.14 as well as 6.16 customers as well ( even perhaps with 6.17 CUs if the definition of katello_erratum_packages_id_seq remains same there ).
Attaching the production.log error details from the satellite as well. And some outputs from postgres about the issue:
# su - postgres -c "psql foreman" psql (12.22) Type "help" for help. foreman=# select * from pg_sequences where sequencename='katello_erratum_packages_id_seq'; schemaname | sequencename | sequenceowner | data_type | start_value | min_value | max_value | increment_by | cycle | cache_size | last_value ------------+---------------------------------+---------------+-----------+-------------+-----------+------------+--------------+-------+------------+------------ public | katello_erratum_packages_id_seq | foreman | integer | 1 | 1 | 2147483647 | 1 | f | 1 | 2147483647 (1 row) foreman=# \d+ katello_erratum_packages_id_seq Sequence "public.katello_erratum_packages_id_seq" Type | Start | Minimum | Maximum | Increment | Cycles? | Cache ---------+-------+---------+------------+-----------+---------+------- integer | 1 | 1 | 2147483647 | 1 | no | 1 Owned by: public.katello_erratum_packages.id foreman=# \d+ katello_erratum_packages Table "public.katello_erratum_packages" Column | Type | Collation | Nullable | Default | Storage | Stats target | Description ------------+------------------------+-----------+----------+------------------------------------------------------+----------+--------------+------------- id | integer | | not null | nextval('katello_erratum_packages_id_seq'::regclass) | plain | | erratum_id | integer | | not null | | plain | | nvrea | character varying(255) | | not null | | extended | | name | character varying(255) | | not null | | extended | | filename | character varying(255) | | | | extended | | Indexes: "katello_erratum_packages_pkey" PRIMARY KEY, btree (id) "katello_erratum_packages_eid_nvrea_n_f" UNIQUE, btree (erratum_id, nvrea, name, filename) "index_katello_erratum_packages_on_erratum_id_and_nvrea" btree (erratum_id, nvrea) Foreign-key constraints: "katello_erratum_packages_errata_id_fk" FOREIGN KEY (erratum_id) REFERENCES katello_errata(id) Referenced by: TABLE "katello_module_stream_erratum_packages" CONSTRAINT "katello_msep_erratum_package_id_fk" FOREIGN KEY (erratum_package_id) REFERENCES katello_erratum_packages(id) Access method: heap
- account is impacted by
-
SAT-38813 ERROR: nextval: reached maximum value of sequence "logs_id_seq"
-
- New
-
- is caused by
-
SAT-39139 Review and update the primary keys and their sequences in the Satellite database to support large amount of data in the tables
-
- New
-
- is cloned by
-
SAT-35581 ERROR: nextval: reached maximum value of sequence "katello_erratum_packages_id_seq" during concurrent repository sync plan executions
-
- Closed
-
- is duplicated by
-
SAT-36334 Repository synchronization is failing with the following error: ActiveRecord::RangeError PG::NumericValueOutOfRange: ERROR: integer out of range
-
- Closed
-
- links to