Bug 1570068 - Unable to export a Red Hat Repository
Summary: Unable to export a Red Hat Repository
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Repositories
Version: 6.3.0
Hardware: x86_64
OS: Linux
high
high
Target Milestone: 6.4.0
Assignee: Christine Fouant
QA Contact: Jitendra Yejare
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-20 14:59 UTC by Onkar
Modified: 2019-11-05 23:16 UTC (History)
22 users (show)

Fixed In Version: tfm-rubygem-katello-3.7.0.26-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-16 19:06:36 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 24115 0 Normal Closed katello allows setting invalid repo settings that pulp does not accept 2021-01-24 09:08:25 UTC
Red Hat Knowledge Base (Solution) 3429551 0 None None None 2018-05-01 14:53:12 UTC

Description Onkar 2018-04-20 14:59:58 UTC
Description of problem: Unable to export a Red Hat Repository in 6.3. By default repository having an on-demand policy. When made immediate and synced it. Then tried to export with a hammer it gives an error. 


Version-Release number of selected component (if applicable): Satellite 6.3.0


How reproducible:
One test repository synced with policy on-demand. 
Then I made policy as immediate still same results, hence made as background and then synced once again. 

But result was.

hammer repository export --id 11
[......................................................................................                                                                                                                                                ] [37%]
Error: PLP0046: The repository group cannot be exported because these repos have units that are not downloaded: 725a457e-2efa-4273-9a99-b7613d810a8a




Steps to Reproduce:
Sync repository in satellite 6.3.0 then tried to export with hammer command it generates error.
So make it as immediate and then tried to export.

Actual results:
Error: PLP0046: The repository group cannot be exported because these repos have units that are not downloaded:

Expected results: With help of hammer command repository should get exported.


Additional info:

Comment 1 Craig Donnelly 2018-04-20 15:38:37 UTC
Onkar,

After setting the repository to immediate, did you then perform a complete sync of the repository?

If not, we would not expect this to work until you did. (no on_demand or background, as they do not immediately download all units into the repo for consumption.)

Comment 3 Brad Buckingham 2018-04-20 17:48:22 UTC
Onkar,

Do you have an internal reproducer that we can look at?

Comment 21 Chris Duryee 2018-06-29 17:12:03 UTC
It looks like "upstream_password" was set on the repo without "upstream_username". This is an error and Pulp correctly raised an error message, but Katello did not send the message back to the user.

After this happens, any update to the repository's settings (for example, changing from on_demand to immediate) will silently error out until the original issue is fixed.

To check if this issue is happening, run "foreman-rake katello:change_download_policy DOWNLOAD_POLICY=immediate" to set all repos to immediate, and then check in /var/log/messages for Pulp errors with the string "Configuration errors:". This should show what the underlying issue is.

In this case, the error was "PulpDataException('Configuration errors:\nThe configuration parameter <basic_auth_password> requires the <basic_auth_username> parameter to also be set.',)", so I set the repo having issues to have a blank upstream username/pass (hammer repository update --id 3 --upstream-password "" --upstream-username ""), and then resynced it. It then downloaded all of its units and I was able to successfully export.

Comment 31 pm-sat@redhat.com 2018-09-07 18:08:15 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/24115 has been resolved.

Comment 34 Jitendra Yejare 2018-09-18 14:20:19 UTC
I received the following error while exporting Redhat 7 Server repository :

# hammer -u admin -p changeme repository export --id 4
[....................................                                                             ] [37%]
Error: 751: unexpected token at '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>500 Internal Server Error</title>
</head><body>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error or
misconfiguration and was unable to complete
your request.</p>
<p>Please contact the server administrator at 
 [no address given] to inform them of the time this error occurred,
 and the actions you performed just before this error.</p>
<p>More information about this error may be available
in the server error log.</p>
</body></html>

May I mark this as Failed QA.

Comment 35 Chris Duryee 2018-09-18 14:32:08 UTC
Usually that error means the satellite is not operational. Is hammer ping successful?

Comment 36 Jitendra Yejare 2018-09-20 09:00:54 UTC
Verified!

@ Satellite 6.4 snap 22


Steps:
--------

1. Enabled and synced Redhat rhel7 server repository with 'on_demand' policy. 
2. Changed download policy to 'immediate' download policy.
3. And resynced repository.
4. Export a repository to /var/lib/pulp/katello-export


Observation:
-------------

1. The export of redhat repository is successful.
2. The contents are shown in /var/lib/pulp/katello-export


Note:
--------
Still the uuid instead of Repository name is shown inside export folder but as comment 30 promises it to be fixed in sat 6.5, marking this bug as verified.

Comment 37 Bryan Kearney 2018-10-16 19:06:36 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2018:2927


Note You need to log in before you can comment on or make changes to this bug.