Bug 1098529 - [RFE] enhance configuration handling for pulp-consumer
Summary: [RFE] enhance configuration handling for pulp-consumer
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Pulp
Classification: Retired
Component: consumers
Version: 2.4 Beta
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: ---
: ---
Assignee: pulp-bugs
QA Contact: pulp-qe-list
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-05-16 13:06 UTC by mkovacik
Modified: 2015-02-28 23:41 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-02-19 01:13:20 UTC


Attachments (Terms of Use)
consumer config file (690 bytes, text/plain)
2014-05-16 13:06 UTC, mkovacik
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Pulp Redmine 231 0 None None None Never

Description mkovacik 2014-05-16 13:06:29 UTC
Created attachment 896385 [details]
consumer config file

Description of problem:
run into stack dump while using new consumer and old consumer config file

Version-Release number of selected component (if applicable):
pulp-consumer-client-2.4.0-0.14.beta.fc20.noarch


How reproducible:
Always

Steps to Reproduce:
1. either remove [Authentication] section from /etc/pulp/consumer/consumer.conf or use old configuration file (attached)
2. pulp-consumer -u <username> -p <password> register --consumer-id <id>

Actual results:
[root@dhcp131-38 ~]# pulp-consumer -u admin -p admin register --consumer-id milan
An unexpected error has occurred. More information can be found in the client
log file ~/.pulp/consumer.log.

[root@dhcp131-38 ~]# tail -15 .pulp/consumer.log 
    return self.method(*arg_list, **clean_kwargs)
  File "/usr/lib/python2.7/site-packages/pulp/client/consumer/cli.py", line 172, in register
    path = self.context.config['authentication']['rsa_key']
KeyError: 'authentication'
2014-05-16 08:57:32,587 - ERROR - Client-side exception occurred
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/consumer/cli.py", line 172, in register
    path = self.context.config['authentication']['rsa_key']
KeyError: 'authentication'


Expected results:
Configuration Incompatibility message shown instead of unexpected error

Additional info:

Comment 1 Michael Hrivnak 2014-05-16 16:24:05 UTC
We should also add default values for all consumer config values, similar to what the pulp server does.

Comment 2 Brian Bouterse 2015-02-19 01:13:20 UTC
Moved to https://pulp.plan.io/issues/231


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