#2771 pki-server ca-cert-request-find throws an KeyError when instance name is specified. (edit)
Closed: migrated by dmoluguw. Opened by mharmsen.

pki-server ca-cert-request-find ca works if there is a default (pki-tomcat) instance is present in the system.

If you try to run it with another instance it will throw an error.

Steps to Reproduce:

pki-server ca-cert-request-find -i topology-02-CA --verbose

Actual results:

raceback (most recent call last):
  File "/usr/sbin/pki-server", line 112, in <module>
    cli.execute(sys.argv)
  File "/usr/sbin/pki-server", line 104, in execute
    super(PKIServerCLI, self).execute(args)
  File "/usr/lib/python2.7/site-packages/pki/cli/__init__.py", line 204, in execute
    module.execute(module_args)
  File "/usr/lib/python2.7/site-packages/pki/cli/__init__.py", line 204, in execute
    module.execute(module_args)
  File "/usr/lib/python2.7/site-packages/pki/cli/__init__.py", line 204, in execute
    module.execute(module_args)
  File "/usr/lib/python2.7/site-packages/pki/cli/__init__.py", line 204, in execute
    module.execute(module_args)
  File "/usr/lib/python2.7/site-packages/pki/server/cli/ca.py", line 243, in execute
    results = subsystem.find_cert_requests(cert=cert)
  File "/usr/lib/python2.7/site-packages/pki/server/__init__.py", line 443, in find_cert_requests
    requests.append(self.create_request_object(entry))
  File "/usr/lib/python2.7/site-packages/pki/server/__init__.py", line 471, in create_request_object
    request['request'] = attrs['extdata-cert--005frequest'][0]
KeyError: 'extdata-cert--005frequest'
ERROR: 'extdata-cert--005frequest

Expected results:

Shows the certificate request.

Metadata Update from @mharmsen:
- Custom field component adjusted to General
- Custom field feature adjusted to ''
- Custom field origin adjusted to Community
- Custom field proposedmilestone adjusted to ''
- Custom field proposedpriority adjusted to ''
- Custom field reviewer adjusted to ''
- Custom field rhbz adjusted to https://bugzilla.redhat.com/show_bug.cgi?id=1466445
- Custom field type adjusted to defect
- Custom field version adjusted to ''
- Issue priority set to: critical
- Issue set to the milestone: 10.5

Metadata Update from @mharmsen:
- Issue priority set to: major (was: critical)

[20171025] - Offline Triage ==> 10.6

Metadata Update from @mharmsen:
- Issue set to the milestone: 10.6 (was: 10.5)

Per 10.5.x/10.6 Triage: 10.5.x

edewata: broken functionality

Metadata Update from @mharmsen:
- Issue set to the milestone: 10.5 (was: 10.6)

[copied from BZ]

Adding this comment for (my) future reference:

This seems to me like an issue seen only when a client-cert-request is done. I'd assume some entries are formatted in a wrong way. Need to look deeper. Thanks Amol for confirming! :)

Dogtag PKI is moving from Pagure issues to GitHub issues. This means that existing or new
issues will be reported and tracked through Dogtag PKI's GitHub Issue tracker.

This issue has been cloned to GitHub and is available here:
https://github.com/dogtagpki/pki/issues/2891

If you want to receive further updates on the issue, please navigate to the
GitHub issue and click on Subscribe button.

Thank you for understanding, and we apologize for any inconvenience.

Metadata Update from @dmoluguw:
- Issue close_status updated to: migrated
- Issue status updated to: Closed (was: Open)

Metadata