-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
6.11.4
Description of problem:
On a 6.11.4 Satellite, the "Default Red Hat Repository download policy" setting was configured to "background". This option no longer exists (was last used in 6.9), and the only 2 options should be "immediate" and "on_demand". When Satellite has "background" configured for this option in 6.11.4, users can no longer enable repositories from "Content => Repositories" (or via hammer commands). Any attempt is met with the error "root_id violates not-null constraint".
Have not confirmed, but it seems likely the "background" option was set in 6.9, and after upgrading to 6.10 then to 6.11, this setting was still configured within Satellite's "Administer => Settings" page under the "Content" tab.
With the "background" option set, we see the api call to enable the repository:
~~~
2022-11-12T23:26:41 [I|app|d647bf64] Started PUT "/katello/api/products/38/repository_sets/11412/enable" for 10.22.0.13 at 2022-11-12 23:26:41 +0300
~~~
Then we see the Satellite reaching out to the CDN for repomd.xml file (which it grabs successfully):
~~~
2022-11-12T23:26:41 [I|app|d647bf64] CDN: Requesting path https://cdn.redhat.com:443/content/dist/layered/rhel8/x86_64/openstack/16.2/os/repodata/repomd.xml
~~~
And finally we get a "root_id" violates not-null constraint (where we see the root_id, remote_href, publication_href and version_href are all null when we try to populate the katello_repositories table):
~~~
2022-11-12T23:26:48 [E|bac|d647bf64] PG::NotNullViolation: ERROR: null value in column "root_id" violates not-null constraint
d647bf64 | DETAIL: Failing row contains (2370, 1fa9496f-7305-4f6a-b5cc-42df61a0565b, null, 1, Default_Organization/Library/content/dist/layered/rhel8/x86_64/openstac..., 1, null, null, null, null, null, null, null, null, null, null, null, 1970-01-01 00:00:00, 1970-01-01 00:00:00, 1970-01-01 00:00:00).
~~~
Using the sql debugging option, we see that Satellite fails to create a katello_root_repositories entry for the repository we are trying to enable, which explains why "root_id" is null.
Version-Release number of selected component (if applicable):
Discovered on 6.11.4, but presumably it is affected by any system that has upgraded from 6.9, while having the "background" option set on 6.9.
How reproducible:
have not reproduced yet, but will setup up a reproducer to test the theory to reproduce it.
Steps to Reproduce:
1.
2.
3.
Actual results:
Expected results:
Additional info:
After changing the setting for "Default Red Hat Repository download policy" to "on_demand", this setting changed back to "background" 3 times. Not sure what triggered Satellite to change it back to "background". The logs don't show any indication of the "background" option being present, or being changed back.
But after the setting was changed to "on_demand" admin user was allowed to enable a repository. Upon trying to enable a second repository, we observed the same error "root_id violates not-null constraint" and confirmed the "background" option had been reverted. It took 4 times to change it to "on_demand" and presumably this option has stayed. Will need to confirm the option has not reverted back to "background".
- external trackers