#2367 pki-server subsystem-cert-update command throws AttributeError
Closed: worksforme 5 years ago Opened 7 years ago by myusuf@redhat.com.

pki-server subsystem-cert-update command throws AttributeError

Steps to Reproduce:

1. run pki-server subsystem-cert-update -i <instance name> <subsystem id> <cert
id>

Actual results:

[root@pki1 cli]# pki-server subsystem-cert-update -i FoobarCA ca audit_signing
Traceback (most recent call last):
  File "/usr/sbin/pki-server", line 107, in <module>
    cli.execute(sys.argv)
  File "/usr/sbin/pki-server", line 102, in execute
    super(PKIServerCLI, self).execute(args)
  File "/usr/lib/python2.7/site-packages/pki/cli/__init__.py", line 203, in
execute
    module.execute(module_args)
  File "/usr/lib/python2.7/site-packages/pki/cli/__init__.py", line 203, in
execute
    module.execute(module_args)
  File "/usr/lib/python2.7/site-packages/pki/cli/__init__.py", line 203, in
execute
    module.execute(module_args)
  File "/usr/lib/python2.7/site-packages/pki/server/cli/subsystem.py", line
700, in execute
    results = ca.find_cert_requests(cert=data)
AttributeError: 'PKISubsystem' object has no attribute 'find_cert_requests'

Additional info:

when running command with help option, it throws missing subsystem Id error.

[root@pki1 cli]# pki-server subsystem-cert-update --help
ERROR: missing subsystem ID
Usage: pki-server subsystem-cert-update [OPTIONS] <subsystem ID> <cert ID>

  -i, --instance <instance ID>    Instance ID (default: pki-tomcat).
  -v, --verbose                   Run in verbose mode.
      --help                      Show help message.

Metadata Update from @myusuf@redhat.com:
- Issue set to the milestone: UNTRIAGED

7 years ago

Metadata Update from @mharmsen:
- Custom field feature adjusted to None
- Custom field proposedmilestone adjusted to None
- Custom field proposedpriority adjusted to None
- Custom field reviewer adjusted to None
- Custom field version adjusted to None
- Issue close_status updated to: None
- Issue set to the milestone: 10.5 (was: UNTRIAGED)

6 years ago

[20171025] - Offline Triage ==> 10.6

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

6 years ago

Per 10.5.x/10.6 Triage: 10.5.x

alee: I belive this is part of the offline cert tool workflow..

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

5 years ago

Can you provide more info on this issue? I don't see this error any more.

I noticed that there is no error with --help too:

[root@localhost dmoluguw]# pki-server subsystem-cert-update ca audit_signing
---------------------------------------------
Updated "audit_signing" subsystem certificate
---------------------------------------------

[dmoluguw@localhost ~]$ pki-server subsystem-cert-update --help
Usage: pki-server subsystem-cert-update [OPTIONS] <subsystem ID> <cert ID>

  -i, --instance <instance ID>    Instance ID (default: pki-tomcat).
  -v, --verbose                   Run in verbose mode.
      --help                      Show help message.
      --cert <certificate>        New certificate to be added

[dmoluguw@localhost ~]$ rpm -qi pki-server
Name        : pki-server
Version     : 10.5.11
Release     : 1.fc27
Architecture: noarch
Install Date: Mon 20 Aug 2018 05:01:18 PM EDT
Group       : System Environment/Base
Size        : 4848872
License     : GPLv2
Signature   : RSA/SHA256, Tue 31 Jul 2018 08:46:24 PM EDT, Key ID f55e7430f5282ee4
Source RPM  : pki-core-10.5.11-1.fc27.src.rpm
Build Date  : Tue 31 Jul 2018 06:48:39 PM EDT
Build Host  : buildvm-30.phx2.fedoraproject.org
Relocations : (not relocatable)
Packager    : Fedora Project
Vendor      : Fedora Project
URL         : http://pki.fedoraproject.org/
Bug URL     : https://bugz.fedoraproject.org/pki-core
Summary     : Certificate System - PKI Server Framework

Additionally, we have the following commands in the cert module that can be used to update certs in all subsystems:
pki-server cert-update <cert-ID> = Used to synchronize nssdb and CS.cfg file
pki-server cert-import <cert-ID> --input <cert-file> = To import a cert file into nssdb and CS.cfg file

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

5 years ago

Metadata Update from @dmoluguw:
- Issue assigned to dmoluguw

5 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/2487

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