Bug 1292898 - 403 (Forbidden) errors for katello-disconnected sync of CloudForms repository
403 (Forbidden) errors for katello-disconnected sync of CloudForms repository
Status: CLOSED CURRENTRELEASE
Product: Red Hat Quickstart Cloud Installer
Classification: Red Hat
Component: Distribution (Show other bugs)
1.0
Unspecified Unspecified
unspecified Severity medium
: TP2
: 1.0
Assigned To: Jesus M. Rodriguez
Dave Johnson
: Triaged
Depends On: 1295880
Blocks: rhci-sprint-12
  Show dependency treegraph
 
Reported: 2015-12-18 11:52 EST by Thom Carlin
Modified: 2017-07-26 16:00 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
The disconnected server was only able to handle rpm repositories, not ISO repositories. The code was updated to support iso repositories as well.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-10-03 15:19:41 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Pulp Redmine 1443 Normal CLOSED - NOTABUG Trailing slashes result in 403 (Forbidden) errors 2016-01-05 16:00 EST

  None (edit)
Description Thom Carlin 2015-12-18 11:52:04 EST
Description of problem:

When attempting to setup a disconnected environment, receive 503 (Forbidden) errors for katello-disconnected sync of CloudForms.

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

TP2

How reproducible:

100%

Steps to Reproduce:
1. Follow Sat 6 steps to setup disconnected environment, using RHCS-I repositories
2.
3.

Actual results:

sync for CloudForms goes to Error

Expected results:

Successful sync

Additional info:

Relevant log entries:
pulp: pulp_rpm.plugins.importers.yum.sync:INFO: Downloading metadata from https://cdn.redhat.com/content/dist/cf-me/server/5.3/x86_64/files/.
pulp: requests.packages.urllib3.connectionpool:INFO: Starting new HTTPS connection (1): cdn.redhat.com
pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: (6021-39520) sync failed
pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: (6021-39520) Traceback (most recent call last):
pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: (6021-39520)   File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/sync.py", line 141, in run
pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: (6021-39520)     metadata_files = self.get_metadata()
pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: (6021-39520)   File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/sync.py", line 221, in get_metadata
pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: (6021-39520)     raise FailedException(str(e))
pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: (6021-39520) FailedException: Forbidden
pulp: celery.worker.job:ERROR: (4211-39520) Task pulp.server.managers.repo.sync.sync[51d5f2f4-459d-478a-a97e-fed7d21a5560] raised unexpected: PulpExecutionException('Importer indicated a failed response',)
celery.worker.job:ERROR: (4211-39520) Traceback (most recent call last):
pulp: celery.worker.job:ERROR: (4211-39520)   File "/usr/lib/python2.7/site-packages/celery/app/trace.py", line 240, in trace_task
pulp: celery.worker.job:ERROR: (4211-39520)     R = retval = fun(*args, **kwargs)
pulp: celery.worker.job:ERROR: (4211-39520)   File "/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py", line 328, in __call__
pulp: celery.worker.job:ERROR: (4211-39520)     return super(Task, self).__call__(*args, **kwargs)
celery.worker.job:ERROR: (4211-39520)   File "/usr/lib/python2.7/site-packages/celery/app/trace.py", line 437, in __protected_call__
pulp: celery.worker.job:ERROR: (4211-39520)     return self.run(*args, **kwargs)
pulp: celery.worker.job:ERROR: (4211-39520)   File "/usr/lib/python2.7/site-packages/pulp/server/managers/repo/sync.py", line 114, in sync
pulp: celery.worker.job:ERROR: (4211-39520)     raise PulpExecutionException(_('Importer indicated a failed response'))
pulp: celery.worker.job:ERROR: (4211-39520) PulpExecutionException: Importer indicated a failed response
Comment 1 Michael Hrivnak 2015-12-18 12:46:50 EST
It appears that you are trying to sync it as a yum repository, but the URL specified does not point to a yum repository. I think you want to try importing it as an "iso" repository as pulp calls it. I'm not sure what exactly that looks like in the Sat6 UI.

Also, I assume you meant 403 Forbidden, and not 503 Service Unavailable?
Comment 2 pulp-infra@redhat.com 2015-12-18 13:00:20 EST
The Pulp upstream bug status is at NEW. Updating the external tracker on this bug.
Comment 3 pulp-infra@redhat.com 2015-12-18 13:00:22 EST
The Pulp upstream bug priority is at Normal. Updating the external tracker on this bug.
Comment 4 Thom Carlin 2015-12-18 16:22:26 EST
yes, 403 (updated title).

I am merely running katello-disconnected against a manifest (for a specific repository in that manifest), *not* specifying yum or iso repository.  If it is incorrect, we need to determine whether the problem is with the manifest or katello-disconnected.
Comment 5 Thom Carlin 2015-12-21 08:41:18 EST
The reproducibility is *not* 100%.  It was 100% when I was testing it but since then it is erratic (time-based issue, perhaps)?

Agreed, this appears to be defined incorrectly in the manifest as a "yum" type respository instead of an ISO repository.
Comment 9 pulp-infra@redhat.com 2016-01-05 16:00:23 EST
The Pulp upstream bug status is at CLOSED - NOTABUG. Updating the external tracker on this bug.
Comment 10 Jesus M. Rodriguez 2016-01-19 09:35:39 EST
Fixed by PR: 
https://github.com/Katello/katello-utils/pull/4
Comment 11 Jesus M. Rodriguez 2016-01-20 10:21:11 EST
A patch to BZ #1295880 has been submitted both upstream and downstream. The error in the original comment was a direct result of katello-disconnected not being able to export ISO/image repos from pulp, it was not a pulp issue. 

Thom documented a valid workaround in Comment #8.

In the interim, one could install stock katello-disconnected then do the following two items:

1) apply this patch to the installed katello-disconnected:
https://gitlab.sat.lab.tlv.redhat.com/satellite6/katello-misc/commit/0fe3919cb22f9db0f1a6728472d6e632e701f546.diff

2) After exporting the content with the patched katello-disconnected, there is yet another script to fix the deficiency in pulp with publishing ISO/image to the directory structure used by the CDN:

https://bugzilla.redhat.com/show_bug.cgi?id=1300046#c1

This will give you a valid content tree useful for deploying in disconnected mode.
Comment 12 Antonin Pagac 2016-02-23 03:59:40 EST
I was able to setup a disconnected host using katello-disconnected and I saw no errors. Export and expand finished successfully. I still had to move the content as documented in bug 1300046
Marking as verified.

katello-utils-2.2.6-1.el7sat.noarch

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