Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Created attachment 1977286[details]
Download policy shows blank option from Web UI.
Description of problem:
While setting the download policy for any repository from the command line, the command should show some error.
Still, Can set the deprecated 'background' download policy for repositories from the command line and it shows a blank option on Web UI.
Version-Release number of selected component (if applicable):
Red Hat Satellite 6.14
How reproducible:
Always
Steps to Reproduce:
1. Install a new Red Hat Satellite 6.14
2. Enable and Sync repositories before making any changes.
3. Change the download policy from the command line as below:
~~~
# echo "update katello_root_repositories set download_policy = 'background' where download_policy = 'on_demand'" |su - postgres -c 'psql foreman'
~~~
4. From Web UI, we can see (Refer to attachment) the download policy is showing a blank option.
5. And while syncing the repository we can see the below error:
~~~
Error message: the server returns an error
HTTP status code: 400
Response headers: {"Date"=>"Mon, 24 Jul 2023 11:42:40 GMT", "Server"=>"gunicorn", "Content-Type"=>"application/json", "Vary"=>"Accept,Cookie", "Allow"=>"GET, PUT, PATCH, DELETE, HEAD, OPTIONS", "X-Frame-Options"=>"DENY", "Content-Length"=>"52", "X-Content-Type-Options"=>"nosniff", "Referrer-Policy"=>"same-origin", "Correlation-ID"=>"1021c2af-483c-4f6e-8a9d-bdefdcdba79c", "Access-Control-Expose-Headers"=>"Correlation-ID", "Via"=>"1.1 satellite.example.com", "Connection"=>"close"}
Response body: {"policy":["\"background\" is not a valid choice."]}
~~~
Actual results:
- Can set the download policy for any repository to 'background' from the command line.
Expected results:
While setting the download policy to 'background' from the command it should show some errors as the option is deprecated.
Additional info:
- If again we try to set the download policy to the blank option from the same page in the attachment, can observe the below error, which seems correct error message:
~~~
An error occurred saving the Repository: Validation failed: Download policy must be one of the following: immediate, on_demand
~~~
# echo "update katello_root_repositories set download_policy = 'background' where download_policy = 'on_demand'" |su - postgres -c 'psql foreman'
This command circumvents all validations that we have in Rails. If you tried in the API, which is the "lowest level" sort of interfacing that we support, background shouldn't be allowed.
Since we cannot offer validations for users doing direct database edits, I'm closing this as NOTABUG.
Created attachment 1977286 [details] Download policy shows blank option from Web UI. Description of problem: While setting the download policy for any repository from the command line, the command should show some error. Still, Can set the deprecated 'background' download policy for repositories from the command line and it shows a blank option on Web UI. Version-Release number of selected component (if applicable): Red Hat Satellite 6.14 How reproducible: Always Steps to Reproduce: 1. Install a new Red Hat Satellite 6.14 2. Enable and Sync repositories before making any changes. 3. Change the download policy from the command line as below: ~~~ # echo "update katello_root_repositories set download_policy = 'background' where download_policy = 'on_demand'" |su - postgres -c 'psql foreman' ~~~ 4. From Web UI, we can see (Refer to attachment) the download policy is showing a blank option. 5. And while syncing the repository we can see the below error: ~~~ Error message: the server returns an error HTTP status code: 400 Response headers: {"Date"=>"Mon, 24 Jul 2023 11:42:40 GMT", "Server"=>"gunicorn", "Content-Type"=>"application/json", "Vary"=>"Accept,Cookie", "Allow"=>"GET, PUT, PATCH, DELETE, HEAD, OPTIONS", "X-Frame-Options"=>"DENY", "Content-Length"=>"52", "X-Content-Type-Options"=>"nosniff", "Referrer-Policy"=>"same-origin", "Correlation-ID"=>"1021c2af-483c-4f6e-8a9d-bdefdcdba79c", "Access-Control-Expose-Headers"=>"Correlation-ID", "Via"=>"1.1 satellite.example.com", "Connection"=>"close"} Response body: {"policy":["\"background\" is not a valid choice."]} ~~~ Actual results: - Can set the download policy for any repository to 'background' from the command line. Expected results: While setting the download policy to 'background' from the command it should show some errors as the option is deprecated. Additional info: - If again we try to set the download policy to the blank option from the same page in the attachment, can observe the below error, which seems correct error message: ~~~ An error occurred saving the Repository: Validation failed: Download policy must be one of the following: immediate, on_demand ~~~