Project

Profile

Help

Story #231

closed

[RFE] enhance configuration handling for pulp-consumer

Added by mkovacik@redhat.com almost 8 years ago. Updated almost 4 years ago.

Status:
CLOSED - WONTFIX
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Platform Release:
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

++ This bug was initially created as a clone of Bugzilla Bug #1098529 ++

Description of problem:

Created attachment 896385
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:

--- Additional comment from at 05/16/2014 16:24:05 ---

We should also add default values for all consumer config values, similar to what the pulp server does.

Also available in: Atom PDF