Bug 887372 - sync command should error out with appropriate error message for feed less puppet repos.
Summary: sync command should error out with appropriate error message for feed less pu...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: puppet-support
Version: Master
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 2.1.0
Assignee: Michael Hrivnak
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On: 857528
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-12-14 20:12 UTC by Preethi Thomas
Modified: 2013-04-08 16:01 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 857528
Environment:
Last Closed: 2013-04-08 16:01:36 UTC
Embargoed:


Attachments (Terms of Use)

Description Preethi Thomas 2012-12-14 20:12:18 UTC
Description of problem:

feedless puppet repos run sync command and then error out 

Version-Release number of selected component (if applicable):
[root@preethi-el6-pulp ~]# rpm -qa pulp-rpm-server
pulp-rpm-server-2.0.3-17.el6.noarch


How reproducible:


Steps to Reproduce:
1. create a feed less puppet repo
2. run repo sync on the repo
3.
  
Actual results:
[root@preethi ~]# pulp-admin puppet repo create --repo-id feedless1
Successfully created repository [feedless1]

[root@preethi ~]# pulp-admin rpm repo sync run --repo-id feedless1
+----------------------------------------------------------------------+
                  Synchronizing Repository [feedless1]
+----------------------------------------------------------------------+

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

[root@preethi ~]# 



From the log

2012-12-14 13:03:36,054 pulp_puppet.plugins.importers.sync:INFO: Beginning sync for repository <feedless1>
2012-12-14 13:03:36,055 pulp_puppet.plugins.importers.sync:INFO: Beginning metadata retrieval for repository <feedless1>
2012-12-14 13:03:36,055 pulp_puppet.plugins.importers.downloaders.factory:ERROR: Exception parsing feed type for feed <None>
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/pulp_puppet/plugins/importers/downloaders/factory.py", line 106, in _determine_feed_type
    proto, netloc, path, params, query, frag = urlparse.urlparse(feed)
  File "/usr/lib64/python2.7/urlparse.py", line 135, in urlparse
    tuple = urlsplit(url, scheme, allow_fragments)
  File "/usr/lib64/python2.7/urlparse.py", line 174, in urlsplit
    i = url.find(':')
AttributeError: 'NoneType' object has no attribute 'find'
2012-12-14 13:03:36,055 pulp_puppet.plugins.importers.sync:ERROR: Exception while retrieving metadata for repository <feedless1>
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/pulp_puppet/plugins/importers/sync.py", line 101, in _parse_metadata
    downloader = self._create_downloader()
  File "/usr/lib/python2.7/site-packages/pulp_puppet/plugins/importers/sync.py", line 339, in _create_downloader
    self.config, self.is_cancelled_call)
  File "/usr/lib/python2.7/site-packages/pulp_puppet/plugins/importers/downloaders/factory.py", line 65, in get_downloader
    feed_type = _determine_feed_type(feed)
  File "/usr/lib/python2.7/site-packages/pulp_puppet/plugins/importers/downloaders/factory.py", line 110, in _determine_feed_type
    raise InvalidFeed(feed)
InvalidFeed: None
2012-12-14 13:03:36,191 pulp.server.dispatch.task:ERROR: Importer indicated a failed response
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/pulp/server/dispatch/task.py", line 123, in _run
    result = call(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/pulp/server/managers/repo/sync.py", line 158, in sync
    raise PulpExecutionException(_('Importer indicated a failed response'))
PulpExecutionException: Importer indicated a failed response
2012-12-14 13:03:36,192 pulp.server.dispatch.task:INFO: FAILURE: Task 0d40fa6d-f17e-4ca4-bb28-c885d5c1a172: CallRequest: RepoSyncManager.sync(u'feedless1', sync_config_override=None, importer_config={}, importer_instance=<pulp_puppet.plugins.importers.importer.PuppetModuleImporter object at 0x7fb19c53f6d0>)

Comment 1 Michael Hrivnak 2013-01-09 23:20:33 UTC
https://github.com/pulp/pulp_puppet/pull/24

Comment 2 Jeff Ortel 2013-01-19 16:59:39 UTC
build: 2.1.0-0.1.alpha

Comment 3 Preethi Thomas 2013-01-23 15:41:58 UTC
Looks like this is still failing

[root@preethi-el6-pulp ~]# rpm -qa |grep pulp
pulp-server-2.1.0-0.1.alpha.noarch
pulp-puppet-admin-extensions-2.1.0-0.1.alpha.noarch
pulp-puppet-plugins-2.1.0-0.1.alpha.noarch
pulp-selinux-2.1.0-0.1.alpha.noarch
pulp-builtins-admin-extensions-2.1.0-0.1.alpha.noarch
pulp-rpm-admin-extensions-2.1.0-0.1.alpha.noarch
pulp-rpm-plugins-2.1.0-0.1.alpha.noarch
pulp-admin-client-2.1.0-0.1.alpha.noarch

[root@preethi-el6-pulp ~]# pulp-admin rpm repo sync run --repo-id feedless1
+----------------------------------------------------------------------+
                  Synchronizing Repository [feedless1]
+----------------------------------------------------------------------+

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

2013-01-23 07:37:53,759 pulp_puppet.plugins.importers.sync:INFO: Beginning sync for repository <feedless1>
2013-01-23 07:37:53,764 pulp.server.dispatch.task:ERROR: Importer indicated a failed response
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/pulp/server/dispatch/task.py", line 138, in _run
    result = call(*args, **kwargs)
  File "/usr/lib/python2.6/site-packages/pulp/server/managers/repo/sync.py", line 115, in sync
    raise PulpExecutionException(_('Importer indicated a failed response'))
PulpExecutionException: Importer indicated a failed response
2013-01-23 07:37:53,766 pulp.server.dispatch.task:INFO: FAILURE: Task 715d9326-8011-44f7-b1a5-34b3c41d2584: CallRequest: RepoSyncManager.sync(u'feedless1', sync_config_override=None)

Comment 4 Michael Hrivnak 2013-01-23 16:01:36 UTC
You used the "rpm" section of the CLI instead of the "puppet" side.

Comment 5 Preethi Thomas 2013-01-23 16:31:38 UTC
Sorry abou that.

verified

[root@preethi-el6-pulp ~]# pulp-admin puppet repo sync run --repo-id feedless1
+----------------------------------------------------------------------+
                  Synchronizing Repository [feedless1]
+----------------------------------------------------------------------+

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

Downloading metadata...
... failed


The following error was encountered during the previous step. More information
can be found in ~/.pulp/admin.log


  Cannot perform repository sync on a repository with no feed

Comment 6 Preethi Thomas 2013-04-08 16:01:36 UTC
Pulp 2.1 released 


http://www.pulpproject.org/2013/04/05/pulp-2-1-0-released/


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