#1711 CLI :: pki-server ca-cert-request-find throws IOError
Closed: Fixed None Opened 8 years ago by aakkiang.

Steps to Reproduce:

# pki-server
Usage: pki-server [OPTIONS]

  -v, --verbose                Run in verbose mode.
      --debug                  Show debug messages.
      --help                   Show help message.

Commands:
 ca                            CA management commands        
 instance                      Instance management commands  
 subsystem                     Subsystem management commands 
 migrate                       Migrate system                
 nuxwdog                       Nuxwdog related commands      
[root@pki]# pki-server ca
Commands:
 ca-cert                       CA certificates management commands
[root@ pki]# pki-server ca-cert
Commands:
 ca-cert-request               CA certificate requests management commands
[root@ pki]# pki-server ca-cert-request
Commands:
 ca-cert-request-find          Find CA certificate requests  
 ca-cert-request-show          Show CA certificate request   
[root@ pki]# pki-server ca-cert-request-find
Traceback (most recent call last):
  File "/usr/sbin/pki-server", line 95, in <module>
    cli.execute(sys.argv)
  File "/usr/sbin/pki-server", line 90, in execute
    super(PKIServerCLI, self).execute(args)
  File "/usr/lib/python2.7/site-packages/pki/cli.py", line 195, in execute
    module.execute(module_args)
  File "/usr/lib/python2.7/site-packages/pki/cli.py", line 195, in execute
    module.execute(module_args)
  File "/usr/lib/python2.7/site-packages/pki/cli.py", line 195, in execute
    module.execute(module_args)
  File "/usr/lib/python2.7/site-packages/pki/cli.py", line 195, in execute
    module.execute(module_args)
  File "/usr/lib/python2.7/site-packages/pki/server/cli/ca.py", line 124, in execute
    instance.load()
  File "/usr/lib/python2.7/site-packages/pki/server/__init__.py", line 262, in load
    with open(self.registry_file, 'r') as registry:
IOError: [Errno 2] No such file or directory: '/etc/sysconfig/pki/tomcat/pki-tomcat/pki-tomcat'

Currently the pki-server ca-cert-request-find command assumes that there is a CA installed locally. If that's not true the command will fail and show the above stack trace.

Proposed solution: the command should display a message saying something like "CA subsystem not found."

Per CS/DS meeting of 12/14/2015: 10.3 - minor

Per Bug Triage of 05/05/2016: 10.3.2

This is fixed in ticket #2364.

Metadata Update from @aakkiang:
- Issue assigned to edewata
- Issue set to the milestone: 10.3.4

7 years ago

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/2270

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.

Login to comment on this ticket.

Metadata