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
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.
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.
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.)
Do you have an internal reproducer that we can look at?
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.
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/24115 has been resolved.
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">
<title>500 Internal Server Error</title>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error or
misconfiguration and was unable to complete
<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>
May I mark this as Failed QA.
Usually that error means the satellite is not operational. Is hammer ping successful?
@ Satellite 6.4 snap 22
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
1. The export of redhat repository is successful.
2. The contents are shown in /var/lib/pulp/katello-export
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.
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.