-
Bug
-
Resolution: Duplicate
-
Normal
-
None
-
6.18.0, 6.17.2
-
False
-
Critical
-
sat-artemis
-
None
-
None
-
None
-
None
Description of problem:
Attempting to perform a repository sync results in the following error:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ERROR: ActiveRecord::RangeError PG::NumericValueOutOfRange: ERROR: integer out of range
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Actual behavior:
6.17
Actual behavior:
Repository sync is failing with the integer out of range error. This is affecting CV\CCV related tasks as well. Logs are attached.
2025-07-30T00:06:10 [I|bac|2559576e] Task {label: Actions::Katello::SyncPlan::Run, id: e00dbcfb-7cd8-45bd-9189-6bb86b1d2dc9, execution_plan_id: 429c0309-9257-4f3a-851f-77e9db168375} state changed: planning 2025-07-30T00:06:10 [I|bac|2559576e] Task {label: Actions::Katello::SyncPlan::Run, id: e00dbcfb-7cd8-45bd-9189-6bb86b1d2dc9, execution_plan_id: 429c0309-9257-4f3a-851f-77e9db168375} state changed: planned 2025-07-30T00:06:10 [I|bac|2559576e] Task {label: Actions::Katello::SyncPlan::Run, id: e00dbcfb-7cd8-45bd-9189-6bb86b1d2dc9, execution_plan_id: 429c0309-9257-4f3a-851f-77e9db168375} state changed: running 2025-07-30T00:06:10 [I|bac|2559576e] Task {label: , execution_plan_id: 6b76003e-f16b-49f2-b1a4-208ae20753f8} state changed: pending 2025-07-30T00:06:10 [I|bac|2559576e] Task {label: Actions::Katello::Repository::Sync, id: 7d188101-68cf-4cdd-a02e-4d3aa5d83ee9, execution_plan_id: 6b76003e-f16b-49f2-b1a4-208ae20753f8} state changed: planning 2025-07-30T00:06:10 [I|bac|2559576e] Task {label: Actions::Katello::Repository::Sync, id: 7d188101-68cf-4cdd-a02e-4d3aa5d83ee9, execution_plan_id: 6b76003e-f16b-49f2-b1a4-208ae20753f8} state changed: planned 2025-07-30T00:06:10 [I|bac|2559576e] Task {label: , execution_plan_id: 5aabe60a-3afa-43e6-b47f-da57b5587881} state changed: pending 2025-07-30T00:06:10 [I|bac|2559576e] Task {label: Actions::Katello::Repository::Sync, id: be61ab58-ce44-421e-95fe-6d6afa734594, execution_plan_id: 5aabe60a-3afa-43e6-b47f-da57b5587881} state changed: planning 2025-07-30T00:06:10 [I|bac|2559576e] Task {label: Actions::Katello::Repository::Sync, id: 7d188101-68cf-4cdd-a02e-4d3aa5d83ee9, execution_plan_id: 6b76003e-f16b-49f2-b1a4-208ae20753f8} state changed: running 2025-07-30T00:06:11 [I|bac|2559576e] Task {label: Actions::Katello::Repository::Sync, id: be61ab58-ce44-421e-95fe-6d6afa734594, execution_plan_id: 5aabe60a-3afa-43e6-b47f-da57b5587881} state changed: planned 2025-07-30T00:06:11 [I|bac|2559576e] Task {label: Actions::Katello::Repository::Sync, id: be61ab58-ce44-421e-95fe-6d6afa734594, execution_plan_id: 5aabe60a-3afa-43e6-b47f-da57b5587881} state changed: running 2025-07-30T00:06:11 [I|bac|2559576e] Task {label: , execution_plan_id: 38ea514b-5553-4118-b028-bb29c862d47f} state changed: pending 2025-07-30T00:06:11 [I|bac|2559576e] Task {label: Actions::Katello::Repository::Sync, id: d78c219c-431a-491d-96c6-beb3a26a8465, execution_plan_id: 38ea514b-5553-4118-b028-bb29c862d47f} state changed: planning 2025-07-30T00:06:12 [I|bac|2559576e] Task {label: Actions::Katello::Repository::Sync, id: d78c219c-431a-491d-96c6-beb3a26a8465, execution_plan_id: 38ea514b-5553-4118-b028-bb29c862d47f} state changed: planned 2025-07-30T00:06:12 [I|bac|2559576e] Task {label: , execution_plan_id: 649ed854-596a-47f4-9c4e-a17a5becdf8b} state changed: pending 2025-07-30T00:06:12 [I|bac|2559576e] Task {label: Actions::Katello::Repository::Sync, id: a745798f-a8a7-4f26-8134-d4e2f39db865, execution_plan_id: 649ed854-596a-47f4-9c4e-a17a5becdf8b} state changed: planning 2025-07-30T00:06:12 [I|bac|2559576e] Task {label: Actions::Katello::Repository::Sync, id: d78c219c-431a-491d-96c6-beb3a26a8465, execution_plan_id: 38ea514b-5553-4118-b028-bb29c862d47f} state changed: running 2025-07-30T00:06:12 [I|bac|2559576e] Task {label: Actions::Katello::Repository::Sync, id: a745798f-a8a7-4f26-8134-d4e2f39db865, execution_plan_id: 649ed854-596a-47f4-9c4e-a17a5becdf8b} state changed: planned 2025-07-30T00:06:12 [I|bac|2559576e] Task {label: , execution_plan_id: b43c63cc-b420-41c0-b30c-53ab2fa59787} state changed: pending 2025-07-30T00:06:12 [I|bac|2559576e] Task {label: Actions::Katello::Repository::Sync, id: 1b70e6ba-54e2-4d64-b13a-a3f51836233f, execution_plan_id: b43c63cc-b420-41c0-b30c-53ab2fa59787} state changed: planning 2025-07-30T00:06:12 [I|bac|2559576e] Task {label: Actions::Katello::Repository::Sync, id: a745798f-a8a7-4f26-8134-d4e2f39db865, execution_plan_id: 649ed854-596a-47f4-9c4e-a17a5becdf8b} state changed: running 2025-07-30T00:06:13 [I|bac|2559576e] Task {label: Actions::Katello::Repository::Sync, id: 1b70e6ba-54e2-4d64-b13a-a3f51836233f, execution_plan_id: b43c63cc-b420-41c0-b30c-53ab2fa59787} state changed: planned 2025-07-30T00:06:13 [I|bac|2559576e] Task {label: , execution_plan_id: 6fa85335-b0c3-482f-a4b9-1a65becdd9af} state changed: pending 2025-07-30T00:06:13 [I|bac|2559576e] Task {label: Actions::Katello::Repository::Sync, id: 80b38852-1722-46a5-b48d-04b38bed5795, execution_plan_id: 6fa85335-b0c3-482f-a4b9-1a65becdd9af} state changed: planning 2025-07-30T00:06:13 [I|bac|2559576e] Task {label: Actions::Katello::Repository::Sync, id: 1b70e6ba-54e2-4d64-b13a-a3f51836233f, execution_plan_id: b43c63cc-b420-41c0-b30c-53ab2fa59787} state changed: running 2025-07-30T00:06:14 [I|bac|2559576e] Task {label: Actions::Katello::Repository::Sync, id: 80b38852-1722-46a5-b48d-04b38bed5795, execution_plan_id: 6fa85335-b0c3-482f-a4b9-1a65becdd9af} state changed: planned 2025-07-30T00:06:14 [I|bac|2559576e] Task {label: Actions::Katello::Repository::Sync, id: 80b38852-1722-46a5-b48d-04b38bed5795, execution_plan_id: 6fa85335-b0c3-482f-a4b9-1a65becdd9af} state changed: running 2025-07-30T00:06:18 [I|bac|2559576e] Task {label: Actions::Katello::Repository::Sync, id: 1b70e6ba-54e2-4d64-b13a-a3f51836233f, execution_plan_id: b43c63cc-b420-41c0-b30c-53ab2fa59787} state changed: stopped result: success 2025-07-30T00:06:18 [I|app|2559576e] ForemanWebhooks::EventSubscriber: actions.katello.repository.sync_succeeded.event.foreman event received 2025-07-30T00:06:19 [I|bac|2559576e] Task {label: Actions::Katello::Repository::Sync, id: 80b38852-1722-46a5-b48d-04b38bed5795, execution_plan_id: 6fa85335-b0c3-482f-a4b9-1a65becdd9af} state changed: stopped result: success 2025-07-30T00:06:19 [I|app|2559576e] ForemanWebhooks::EventSubscriber: actions.katello.repository.sync_succeeded.event.foreman event received 2025-07-30T00:08:08 [I|app|2559576e] CONTENT_INDEX type=Katello::Rpm success=true duration=111064.43 2025-07-30T00:08:34 [I|app|2559576e] CONTENT_INDEX type=Katello::ModuleStream success=true duration=26292.6 2025-07-30T00:08:48 [I|app|2559576e] CONTENT_INDEX type=Katello::Erratum success=false duration=13505.53 2025-07-30T00:08:48 [E|bac|2559576e] PG::NumericValueOutOfRange: ERROR: integer out of range 2559576e | (ActiveRecord::RangeError) 2559576e | /usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/connection_adapters/postgresql_adapter.rb:768:in `exec_params' 2559576e | /usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/connection_adapters/postgresql_adapter.rb:768:in `block (2 levels) in exec_no_cache' 2559576e | /usr/share/gems/gems/activesupport-7.0.8.7/lib/active_support/concurrency/share_lock.rb:187:in `yield_shares' 2559576e | /usr/share/gems/gems/activesupport-7.0.8.7/lib/active_support/dependencies/interlock.rb:41:in `permit_concurrent_loads' 2559576e | /usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/connection_adapters/postgresql_adapter.rb:767:in `block in exec_no_cache' 2559576e | /usr/share/gems/gems/activesupport-7.0.8.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt' 2559576e | /usr/share/gems/gems/activesupport-7.0.8.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize' 2559576e | /usr/share/gems/gems/activesupport-7.0.8.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt' 2559576e | /usr/share/gems/gems/activesupport-7.0.8.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize' 2559576e | /usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/connection_adapters/abstract_adapter.rb:752:in `block in log' 2559576e | /usr/share/gems/gems/activesupport-7.0.8.7/lib/active_support/notifications/instrumenter.rb:24:in `instrument' 2559576e | /usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/connection_adapters/abstract_adapter.rb:743:in `log' 2559576e | /usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/connection_adapters/postgresql_adapter.rb:766:in `exec_no_cache' 2559576e | /usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/connection_adapters/postgresql_adapter.rb:745:in `execute_and_clear' 2559576e | /usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/connection_adapters/postgresql/database_statements.rb:54:in `exec_query' 2559576e | /usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/connection_adapters/abstract/database_statements.rb:150:in `exec_insert_all' 2559576e | /usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/connection_adapters/abstract/query_cache.rb:22:in `exec_insert_all' 2559576e | /usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/insert_all.rb:41:in `execute' 2559576e | /usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/persistence.rb:146:in `insert_all' 2559576e | /usr/share/gems/gems/katello-4.16.0.6/app/services/katello/pulp3/erratum.rb:64:in `insert_child_associations' 2559576e | /usr/share/gems/gems/katello-4.16.0.6/app/services/katello/content_unit_indexer.rb:75:in `import_associations' 2559576e | /usr/share/gems/gems/katello-4.16.0.6/app/services/katello/content_unit_indexer.rb:56:in `block in import_all' 2559576e | /usr/share/gems/gems/katello-4.16.0.6/app/services/katello/pulp3/pulp_content_unit.rb:139:in `yield' 2559576e | /usr/share/gems/gems/katello-4.16.0.6/app/services/katello/pulp3/pulp_content_unit.rb:139:in `block (2 levels) in pulp_units_batch_for_repo' 2559576e | /usr/share/gems/gems/katello-4.16.0.6/app/services/katello/pulp3/pulp_content_unit.rb:127:in `loop' 2559576e | /usr/share/gems/gems/katello-4.16.0.6/app/services/katello/pulp3/pulp_content_unit.rb:127:in `block in pulp_units_batch_for_repo' 2559576e | /usr/share/gems/gems/katello-4.16.0.6/app/services/katello/content_unit_indexer.rb:26:in `each' 2559576e | /usr/share/gems/gems/katello-4.16.0.6/app/services/katello/content_unit_indexer.rb:26:in `import_all' 2559576e | /usr/share/gems/gems/katello-4.16.0.6/app/models/katello/repository.rb:1033:in `block (2 levels) in index_content' 2559576e | /usr/share/gems/gems/katello-4.16.0.6/app/lib/katello/logging.rb:8:in `time' 2559576e | /usr/share/gems/gems/katello-4.16.0.6/app/models/katello/repository.rb:1032:in `block in index_content' 2559576e | /usr/share/gems/gems/katello-4.16.0.6/app/models/katello/repository.rb:1031:in `each' 2559576e | /usr/share/gems/gems/katello-4.16.0.6/app/models/katello/repository.rb:1031:in `index_content' 2559576e | /usr/share/gems/gems/katello-4.16.0.6/app/lib/actions/katello/repository/index_content.rb:22:in `run'
The posrgres logs around that time shows some INSERTs in katello_repositiry_rpms
2025-07-30 00:08:08 CEST LOG: duration: 4923.666 ms execute <unnamed>: INSERT INTO "katello_repository_rpms" ("repository_id","rpm_id","created_at","updated_at") VALUES (185976, 472182, '2025-07-29 22:07:59.530451', '2025-07-29 22:07:59.530479'), (185976, 95408742, '2025-07-29 22:07:59.530483', '2025-07-29 22:07:59.530486'), (185976, 747771, '2025-07-29 22:07:59.530489', '2025-07-29 22:07:59.530492'), (185976, 602992, '2025-07-29 22:07:59.530496', '2025-07-29 22:07:59.530499'), (185976, 463204, '2025-07-29 22:07:59.530502', '2025-07-29 22:07:59.530504'), (185976, 465526, '2025-07-29 22:07:59.530507', '2025-07-29 22:07:59.530510'), (185976, 747482, '2025-07-29 22:07:59.530513', '2025-07-29 22:07:59.530516'), (185976, 349098, '2025-07-29 22:07:59.530519', '2025-07-29 22:07:59.530522'), (185976, 350516, '2025-07-29 22:07:59.530525', '2025-07-29 22:07:59.530528'), (185976, 465261, '2025-07-29 22:07:59.530531', '2025-07-29 22:07:59.530533'), (185976, 616975, '2025-07-29 22:07:59.530536', '2025-07-29 22:07:59.530539'), (185976, 746090, '2025-07-29 22:07:59.530542', '2025-07-29 22:07:59.530545'), (185976, 350601, '2025-07-29 22:07:59.530547', '2025-07-29 22:07:
and then the error pops up at the end of that INSERT
69536, '2025-07-29 22:07:59.759602', '2025-07-29 22:07:59.759604'), (185976, 531667, '2025-07-29 22:07:59.759607', '2025-07-29 22:07:59.759610'), (185976, 419692937, '2025-07-29 22:07:59.759612', '2025-07-29 22:07:59.759615'), (185976, 606197, '2025-07-2 9 22:07:59.759617', '2025-07-29 22:07:59.759620'), (185976, 419693677, '2025-07-29 22:07:59.759623', '2025-07-29 22:07:59.759625'), (185976, 531950, '2025-07-29 22:07:59.759628', '2025-07-29 22:07:59.759631'), (185976, 303009057, '2025-07-29 22:07:59.759 633', '2025-07-29 22:07:59.759636'), (185976, 588107, '2025-07-29 22:07:59.759639', '2025-07-29 22:07:59.759641'), (185976, 463524, '2025-07-29 22:07:59.759644', '2025-07-29 22:07:59.759647'), (185976, 648385, '2025-07-29 22:07:59.759649', '2025-07-29 22 :07:59.759652'), (185976, 532192, '2025-07-29 22:07:59.759654', '2025-07-29 22:07:59.759657') ON CONFLICT ("rpm_id","repository_id") DO UPDATE SET "created_at"=excluded."created_at","updated_at"=excluded."updated_at" RETURNING "id"
2025-07-30 00:08:48 CEST ERROR: integer out of range
2025-07-30 00:08:48 CEST STATEMENT: INSERT INTO "katello_erratum_packages" ("name","nvrea","filename","erratum_id") VALUES ('cpp', 'cpp-8.5.0-26.el8_10.x86_64', 'cpp-8.5.0-26.el8_10.x86_64.rpm', 154467323), ('libitm-devel', 'libitm-devel-8.5.0-26.el8_10.x86_64', 'libitm-devel-8.5.0-26.el8_10.x86_64.rpm', 154467323), ('gcc-plugin-annobin', 'gcc-plugin-annobin-8.5.0-26.el8_10.x86_64', 'gcc-plugin-annobin-8.5.0-26.el8_10.x86_64.rpm', 154467323), ('libstdc++-docs', 'libstdc++-docs-8.5.0-26.el8_10.x86_64', 'libstdc++-docs-8.5.0-26.el8_10.x8
Expected behavior:
No such integer out of range errors during content related operations
Business Impact / Additional info:
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 | bigint | 1 | 1 | 9223372036854775807 | 1 | f | 1 | 2145761809 foreman=# \d+ katello_erratum_packages_id_seq Sequence "public.katello_erratum_packages_id_seq" Type | Start | Minimum | Maximum | Increment | Cycles? | Cache ------------------------------------------------------------ bigint | 1 | 1 | 9223372036854775807 | 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) "index_katello_erratum_packages_on_erratum_id_and_nvrea" btree (erratum_id, nvrea) "katello_erratum_packages_eid_nvrea_n_f" UNIQUE, btree (erratum_id, nvrea, name, filename) 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 foreman=# 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 | bigint | 1 | 1 | 9223372036854775807 | 1 | f | 1 | 2556693816 foreman=# \d+ katello_repository_rpms Table "public.katello_repository_rpms" Column | Type | Collation | Nullable | Default | Storage | Stats target | Description --------------------------------------------------------------------------------------------------------------------------------+------------ id | bigint | | not null | nextval('katello_repository_rpms_id_seq'::regclass) | plain | | rpm_id | integer | | not null | | plain | | repository_id | integer | | | | plain | | created_at | timestamp without time zone | | | | plain | | updated_at | timestamp without time zone | | | | plain | | Indexes: "katello_repository_rpms_pkey" PRIMARY KEY, btree (id) "index_katello_repository_rpms_on_repository_id" btree (repository_id) "index_katello_repository_rpms_on_rpm_id_and_repository_id" UNIQUE, btree (rpm_id, repository_id) Foreign-key constraints: "fk_rails_39a260fd51" FOREIGN KEY (rpm_id) REFERENCES katello_rpms(id) "fk_rails_8b47580f5f" FOREIGN KEY (repository_id) REFERENCES katello_repositories(id) Access method: heap foreman=# \d+ katello_repository_rpms_id_seq Sequence "public.katello_repository_rpms_id_seq" Type | Start | Minimum | Maximum | Increment | Cycles? | Cache ------------------------------------------------------------ bigint | 1 | 1 | 9223372036854775807 | 1 | no | 1 Owned by: public.katello_repository_rpms.id foreman=# select MAX(id) from katello_erratum_packages; max ------------ 2145759736 foreman=# select MAX(id) from katello_repository_rpms; max ------------ 2556612904
NOTE: This issue is a blocker for the user, preventing them from successfully performing any further repository synchronization tasks. As a result, they are unable to proceed with patching activities.
Attached are the latest PostgreSQL log and production.log error details from the Satellite server, along with relevant outputs from the database that help illustrate the problem:
- duplicates
-
SAT-34624 ERROR: nextval: reached maximum value of sequence "katello_erratum_packages_id_seq" during concurrent repository sync plan executions
-
- Release Pending
-