Bug 974681

Summary: puppet repo copy results in an unexpected error with some filter options
Product: [Retired] Pulp Reporter: Jeremy Cline <jcline>
Component: puppet-supportAssignee: pulp-bugs
Status: CLOSED UPSTREAM QA Contact: Preethi Thomas <pthomas>
Severity: unspecified Docs Contact:
Priority: low    
Version: 2.2 BetaCC: cduryee, gassmann, nobody
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-28 21:57:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jeremy Cline 2013-06-14 19:38:25 UTC
Description of problem: When using 'pulp-admin puppet repo copy' an unexpected error occurs if the --gt, --lt, --gte, --lte, and --int-eq are used with non-integers.


Version-Release number of selected component (if applicable): pulp-puppet-admin-extensions-2.2.0-0.3.beta.fc18.noarch


How reproducible: always


Steps to Reproduce:
1. Create a repo and sync it. For example: pulp-admin puppet repo create --repo-id=puppet_repo --feed=http://forge.puppetlabs.com/ --queries httpd,mysql
2. pulp-admin puppet repo sync run --repo-id=puppet_repo
3. Create another puppet repo to copy to
4. pulp-admin puppet repo copy --from-repo-id=puppet_repo --to-repo-id=another_repo --int-eq='key=value'

Actual results:
An unexpected error has occurred. More information can be found in the client
log file ~/.pulp/admin.log.


Expected results:
A slightly more polite way of telling me I've made a huge mistake.

Additional info:
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/pulp/client/extensions/core.py", line 478, in run
    exit_code = Cli.run(self, args)
  File "/usr/lib/python2.7/site-packages/okaara/cli.py", line 974, in run
    exit_code = command_or_section.execute(self.prompt, remaining_args)
  File "/usr/lib/python2.7/site-packages/pulp/client/extensions/extensions.py", line 224, in execute
    return self.method(*arg_list, **clean_kwargs)
  File "/usr/lib/python2.7/site-packages/pulp/client/commands/unit.py", line 82, in run
    override_config=override_config, **kwargs)
  File "/usr/lib/python2.7/site-packages/pulp/bindings/repository.py", line 386, in copy
    criteria = self._generate_search_criteria(**kwargs)
  File "/usr/lib/python2.7/site-packages/pulp/bindings/repository.py", line 313, in _generate_search_criteria
    'filters': {'unit': SearchAPI.compose_filters(**kwargs)},
  File "/usr/lib/python2.7/site-packages/pulp/bindings/search.py", line 135, in compose_filters
    clauses.extend(operator.compose_filters(raw_values))
  File "/usr/lib/python2.7/site-packages/pulp/bindings/search.py", line 44, in compose_filters
    value = self.value_parser(value)
ValueError: invalid literal for int() with base 10: 'value'

Comment 2 Chris Duryee 2014-11-12 01:49:15 UTC
This is still the case as of pulp 2.4.3.

Comment 3 Brian Bouterse 2015-02-28 21:57:09 UTC
Moved to https://pulp.plan.io/issues/358