Red Hat Bugzilla – Bug 1262313
Providing invalid URL for a custom repo, WebUI raises exception but stores it
Last modified: 2017-09-05 08:18:45 EDT
Description of problem:
Having a custom product for a custom repository and updating URL of the repo: if one provides an invalid URL (say http://username:password@@example.com/repo), WebUI complains about the invalid URL but it _stores_ the invalid URL.
Consequent attempt to synchronize the repository fails with obscure / unexpected error.
This bug is dangerous especially due to the fact WebUI convicts the user it detected URL invalid and _rejected_ the change. So the user is convicted previous valid URL is used.
Version-Release number of selected component (if applicable):
Sat 6.1.1 / foreman-220.127.116.11-1.el7sat.noarch
Steps to Reproduce:
1. Create a custom product and a custom repo
2. Provide some valid URL there
3. Try to sync it
4. Try to update the URL to some invalid one.
5. WebUI raises some exception, so click to Cancel
6a Check the URL of the repo
6b Try to sync the repo.
(6a+6b can be done in any order)
6a: the URL is updated to the invalid one
6b: repo sync fails with "Importer indicated invalid response" pulp error (details depends on how you malform the URL / if you use credentials there etc.)
6a: original URL is stored there
6b: repo sync succeeds (most probably with no update done due to recent sync done)
I have tried several tests on Satellite 6.2; however, I haven't been able to reproduce the behavior described. I am going to move the BZ to ON_QA for verification.
Test env included: tfm-rubygem-katello-18.104.22.168-1.el7sat.noarch
Verified this issue in Sat 6.2 snap 4.
The issue is still reproducible.
On updating the repo url to invalid, it accepts the invalid url and stores it.
And on syncing the repo with that invalid url, the sync fails with 'RPM1004: Error retrieving metadata: Not found'.
So currently updating the status as 'Failed QA'.
Created redmine issue http://projects.theforeman.org/issues/15810 from this bug
I tried this again with Satellite 6.2 SNAP 21.1 using the url that was provided in the description (http://username:password@@example.com/repo) and the behavior appears correct.
1. create repo with valid url
2. sync repo
3. update url to invalid (http://username:password@@example.com/repo)
4. observe validation failed error
5. click 'cancel' and observe the original url (unchanged)
6. re-sync the repo without error
Attaching a few screenshots for 4, 5 & 6.
Created attachment 1184316 [details]
Step 4. Enter invalid URL.
Created attachment 1184317 [details]
Step 5. Click cancel and observe original URL.
Created attachment 1184319 [details]
Step 6. Resync repo without error.
Hi Jitendra, per comment 8, I re-tested this and did not observe the error with the scenario described. Can you take a quick look? If you are still seeing the issue, we'll need more specifics on the scenario. Thanks!
@Sat 6.2 GA Snap 21.2
1. Created a custom product and a custom repo
2. Provided some valid URL
3. Synced it
4. Updated the URL to some invalid url
WebUI raised exception on clicking Cancel the url is reverted back to the valid one.
On syncing the repo again, the sync completed with valid url and not with invalid one.
So moving this to Verified !
This was delivered with Satellite 6.2 GA which was delivered on 27 July, 2017.