Bug 962928 - The ISOImporter assumes that the feed url has been set during sync
The ISOImporter assumes that the feed url has been set during sync
Status: CLOSED CURRENTRELEASE
Product: Pulp
Classification: Community
Component: iso-support (Show other bugs)
Master
Unspecified Unspecified
low Severity low
: ---
: 2.3.0
Assigned To: Sayli Karmarkar
Preethi Thomas
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-14 15:14 EDT by Randy Barlow
Modified: 2015-03-22 21:11 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-12-09 09:31:56 EST
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)

  None (edit)
Description Randy Barlow 2013-05-14 15:14:40 EDT
ISO repositories don't have to specify a feed URL, and if the feed URL isn't set the ISOImporter will blow up if a sync call is made. It should raise a more graceful error message instead. Here is the traceback that currently happens:

2013-05-14 15:10:09,425 pulp.server.managers.repo.sync:ERROR: Exception caught from plugin during sync for repo [test1]
Traceback (most recent call last):
  File "/home/rbarlow/devel/pulp/platform/src/pulp/server/managers/repo/sync.py", line 155, in _do_sync
    sync_report = importer_instance.sync_repo(transfer_repo, conduit, call_config)
  File "/home/rbarlow/devel/pulp_rpm/pulp_rpm/src/pulp_rpm/plugins/importers/iso_importer/importer.py", line 92, in sync_repo
    self.iso_sync = sync.ISOSyncRun(sync_conduit, config)
  File "/home/rbarlow/devel/pulp_rpm/pulp_rpm/src/pulp_rpm/plugins/importers/iso_importer/sync.py", line 46, in __init__
    if self._repo_url[-1] != '/':
TypeError: 'NoneType' object has no attribute '__getitem__'
Comment 1 Sayli Karmarkar 2013-09-20 03:45:12 EDT
commit cdc8775daf07f665fd4aa02c3bda397330a2a978
Author: Sayli Karmarkar <skarmark@redhat.com>
Date:   Fri Sep 20 00:14:32 2013 -0700

    962928 - adding a graceful exception during a repo sync if repo feed is not set
Comment 2 Sayli Karmarkar 2013-09-26 13:07:49 EDT
$ pulp-admin iso repo sync run --repo-id test-iso-no-feed
+----------------------------------------------------------------------+
              Synchronizing Repository [test-iso-no-feed]
+----------------------------------------------------------------------+

This command may be exited by pressing ctrl+c without affecting the actual
operation on the server.


pulp.log


2013-09-26 10:07:00,873 pulp.server.managers.repo.sync:ERROR: Exception caught from plugin during sync for repo [test-iso-no-feed]
Traceback (most recent call last):
  File "/home/skarmark/git/pulp1/pulp/server/pulp/server/managers/repo/sync.py", line 154, in _do_sync
    sync_report = importer_instance.sync_repo(transfer_repo, conduit, call_config)
  File "/home/skarmark/git/pulp_rpm/pulp_rpm/src/pulp_rpm/plugins/importers/iso_importer/importer.py", line 111, in sync_repo
    raise ValueError('Repository without feed cannot be synchronized')
ValueError: Repository without feed cannot be synchronized
2013-09-26 10:07:00,875 pulp.server.dispatch.task:ERROR: Pulp exception occurred: PulpExecutionException
Traceback (most recent call last):
  File "/home/skarmark/git/pulp1/pulp/server/pulp/server/dispatch/task.py", line 138, in _run
    result = call(*args, **kwargs)
  File "/home/skarmark/git/pulp1/pulp/server/pulp/server/managers/repo/sync.py", line 110, in sync
    sync_result = self._do_sync(repo, importer_instance, transfer_repo, conduit, call_config)
  File "/home/skarmark/git/pulp1/pulp/server/pulp/server/managers/repo/sync.py", line 154, in _do_sync
    sync_report = importer_instance.sync_repo(transfer_repo, conduit, call_config)
  File "/home/skarmark/git/pulp_rpm/pulp_rpm/src/pulp_rpm/plugins/importers/iso_importer/importer.py", line 111, in sync_repo
    raise ValueError('Repository without feed cannot be synchronized')
PulpExecutionException: Pulp exception occurred: PulpExecutionException
2013-09-26 10:07:00,876 pulp.server.dispatch.task:INFO: FAILURE: Task 99abac2b-1dc3-4b94-9836-a1aed86ddf9a: CallRequest: RepoSyncManager.sync(u'test-iso-no-feed', sync_config_override=None)
Comment 3 Jeff Ortel 2013-10-02 09:30:54 EDT
build: 2.3.0-0.17.beta
Comment 4 Preethi Thomas 2013-10-04 14:50:27 EDT
[root@pulp-v2-server ~]# rpm -qa pulp-server
pulp-server-2.3.0-0.17.beta.el6.noarch
[root@pulp-v2-server ~]# 
[root@pulp-v2-server ~]# 
[root@pulp-v2-server ~]# 
[root@pulp-v2-server ~]# pulp-admin iso repo create --repo-id test-iso-no-feed
Successfully created repository [test-iso-no-feed]

[root@pulp-v2-server ~]# pulp-admin iso repo sync run --repo-id test-iso-no-feed
+----------------------------------------------------------------------+
              Synchronizing Repository [test-iso-no-feed]
+----------------------------------------------------------------------+

This command may be exited by pressing ctrl+c without affecting the actual
operation on the server.

[root@pulp-v2-server ~]#
Comment 5 Preethi Thomas 2013-12-09 09:31:56 EST
Pulp 2.3 released.

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