Bug 817080
| Summary: | ipa-server-install --uninstall doesn't clear certmonger dirs, which leads to install failing | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | David Kovalsky <dkovalsk> |
| Component: | ipa | Assignee: | Rob Crittenden <rcritten> |
| Status: | CLOSED ERRATA | QA Contact: | Namita Soman <nsoman> |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 6.3 | CC: | arubin, benl, dpal, jtriplet, lmiksik, mkosek, nsoman, orion, spoore, tlavigne |
| Target Milestone: | rc | Keywords: | Regression |
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | ipa-3.0.0-15.el6 | Doc Type: | Known Issue |
| Doc Text: |
In some cases the certificates tracked by certmonger are not cleared when running the ipa-server-install --uninstall command. This will cause a subsequent re-installation to fail with an unexpected error.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2013-02-21 09:12:05 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 888457 | ||
What can you tell us about how you got into the situation where there were left over certmonger trackers? Did you install and uninstall multiple times? Were there failures in any of those? What are the contents of the request files? IPA does tell certmonger to stop tracking certificates that it manages during a normal uninstallation, so this would not be a regression from previous releases. You need to start the certmonger service for ipa-getcert to work. It is unrelated to IPA being installed/configured. I *think* this might be related to one of the `ipa-server-install --uninstall' exiting in the middle of the uninstall process when it couldn't remove one of the files in /etc/httpd/conf.d/ ipa-server-install --uninstall told me that IPA is not installed, but not all the steps in the uninstall passed through. So I guess the system was somewhere in the middle and I didn't find a way to finish the uninstall. I'm able to reproduce this 100% by running 1) ipa-server-install with parameters mentioned in comment #0, 2) chattr +i /etc/httpd/conf.d/ipa.conf 3) # ipa-server-install --uninstall This is a NON REVERSIBLE operation and will delete all data and configuration! Are you sure you want to continue with the uninstall procedure? [no]: yes Shutting down all IPA services Removing IPA client configuration Unconfiguring ntpd Unconfiguring CA directory server Unconfiguring CA Unconfiguring web server ipa : ERROR Error removing /etc/httpd/conf.d/ipa.conf: [Errno 1] Operation not permitted: '/etc/httpd/conf.d/ipa.conf' Unconfiguring krb5kdc Unconfiguring kadmin Unconfiguring directory server Unconfiguring ipa_memcached 4) And then re-runnning ipa-server-install again with the parameters mentioned in comment #0. ... [15/35]: creating indices [16/35]: configuring ssl for ds instance ipa : ERROR Didn't get new certmonger request, got Request "20120427153912" modified. Unexpected error - see ipaserver-install.log for details: certmonger did not issue new tracking request for 'NICK_REMOVED' in '/etc/dirsrv/slapd-MY_DOMAIN_REMOVED/'. Use 'ipa-getcert list' to list existing certificates. [root@machine ~]# /etc/init.d/certmonger start Starting certmonger: [ OK ] [root@machine ~]# ipa-getcert list Number of certificates and requests being tracked: 2. Request ID '20120427153912': status: MONITORING stuck: no key pair storage: type=NSSDB,location='/etc/dirsrv/slapd-DOMAIN_REMOVED',nickname='NICK_REMOVED',token='NSS Certificate DB',pinfile='/etc/dirsrv/slapd-DOMAIN_REMOVED/pwdfile.txt' certificate: type=NSSDB,location='/etc/dirsrv/slapd-DOMAIN_REMOVED',nickname='NICK_REMOVED',token='NSS Certificate DB' CA: IPA issuer: E=ADMIN_EMAIL_REMOVED,CN="MY_COMPANY_REMOVED Certificate Authority",OU=Certificate Authority,O="MY_COMPANY_REMOVED",L=MY_CITY_REMOVED,ST=Czech Republic,C=CZ subject: E=ADMIN_EMAIL_REMOVED,CN=MY_FQDN_REMOVED,O="MY_COMPANY_REMOVED",ST=Czech Republic,C=CZ expires: 2013-04-27 07:04:20 UTC command: /usr/lib64/ipa/certmonger/restart_dirsrv DOMAIN_REMOVED track: yes auto-renew: yes Request ID '20120427154011': status: MONITORING stuck: no key pair storage: type=NSSDB,location='/etc/httpd/alias',nickname='NICK_REMOVED',token='NSS Certificate DB',pinfile='/etc/httpd/alias/pwdfile.txt' certificate: type=NSSDB,location='/etc/httpd/alias',nickname='NICK_REMOVED',token='NSS Certificate DB' CA: IPA issuer: E=ADMIN_EMAIL_REMOVED,CN="MY_COMPANY_REMOVED Certificate Authority",OU=Certificate Authority,O="MY_COMPANY_REMOVED",L=MY_CITY_REMOVED,ST=Czech Republic,C=CZ subject: E=ADMIN_EMAIL_REMOVED,CN=MY_FQDN_REMOVED,O="MY_COMPANY_REMOVED",ST=Czech Republic,C=CZ expires: 2013-04-27 07:04:20 UTC command: /usr/lib64/ipa/certmonger/restart_httpd track: yes auto-renew: yes Upstream ticket: https://fedorahosted.org/freeipa/ticket/2702 Fixed upstream. master: 102765c69fb702cd422611ef21b14b2914cee51f ipa-3-0: 555a0eef808aafa64330a615bfa2c474e9277cba *** Bug 862437 has been marked as a duplicate of this bug. *** See the upstream ticket for information on testing. Verified. Version :: ipa-server-3.0.0-21.el6.x86_64 Automated Test Results (manually run) :: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ LOG ] :: ipaserverinstall_bz817080 - ipa-server-install --uninstall doesn't clear certmonger dirs, which leads to install failing :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: The log file for this installation can be found in /var/log/ipaserver-install.log ============================================================================== This program will set up the IPA Server. This includes: * Configure a stand-alone CA (dogtag) for certificate management * Configure the Network Time Daemon (ntpd) * Create and configure an instance of Directory Server * Create and configure a Kerberos Key Distribution Center (KDC) * Configure Apache (httpd) * Configure DNS (bind) To accept the default shown in brackets, press the Enter key. Warning: skipping DNS resolution of host rhel6-4.testrelm.com The domain name has been determined based on the host name. Using reverse zone 122.168.192.in-addr.arpa. The IPA Master Server will be configured with: Hostname: rhel6-4.testrelm.com IP address: 192.168.122.64 Domain name: testrelm.com Realm name: TESTRELM.COM BIND DNS server will be configured to serve IPA domain with: Forwarders: 192.168.122.1 Reverse zone: 122.168.192.in-addr.arpa. Configuring NTP daemon (ntpd) [1/4]: stopping ntpd [2/4]: writing configuration [3/4]: configuring ntpd to start on boot [4/4]: starting ntpd Done configuring NTP daemon (ntpd). Configuring directory server for the CA (pkids): Estimated time 30 seconds [1/3]: creating directory server user [2/3]: creating directory server instance [3/3]: restarting directory server Done configuring directory server for the CA (pkids). Configuring certificate server (pki-cad): Estimated time 3 minutes 30 seconds [1/21]: creating certificate server user [2/21]: creating pki-ca instance [3/21]: configuring certificate server instance [4/21]: disabling nonces [5/21]: creating CA agent PKCS#12 file in /root [6/21]: creating RA agent certificate database [7/21]: importing CA chain to RA certificate database [8/21]: fixing RA database permissions [9/21]: setting up signing cert profile [10/21]: set up CRL publishing [11/21]: set certificate subject base [12/21]: enabling Subject Key Identifier [13/21]: setting audit signing renewal to 2 years [14/21]: configuring certificate server to start on boot [15/21]: restarting certificate server [16/21]: requesting RA certificate from CA [17/21]: issuing RA agent certificate [18/21]: adding RA agent as a trusted user [19/21]: configure certificate renewals [20/21]: configure Server-Cert certificate renewal [21/21]: Configure HTTP to proxy connections Done configuring certificate server (pki-cad). Configuring directory server (dirsrv): Estimated time 1 minute [1/38]: creating directory server user [2/38]: creating directory server instance [3/38]: adding default schema [4/38]: enabling memberof plugin [5/38]: enabling winsync plugin [6/38]: configuring replication version plugin [7/38]: enabling IPA enrollment plugin [8/38]: enabling ldapi [9/38]: disabling betxn plugins [10/38]: configuring uniqueness plugin [11/38]: configuring uuid plugin [12/38]: configuring modrdn plugin [13/38]: enabling entryUSN plugin [14/38]: configuring lockout plugin [15/38]: creating indices [16/38]: enabling referential integrity plugin [17/38]: configuring ssl for ds instance [18/38]: configuring certmap.conf [19/38]: configure autobind for root [20/38]: configure new location for managed entries [21/38]: restarting directory server [22/38]: adding default layout [23/38]: adding delegation layout [24/38]: adding replication acis [25/38]: creating container for managed entries [26/38]: configuring user private groups [27/38]: configuring netgroups from hostgroups [28/38]: creating default Sudo bind user [29/38]: creating default Auto Member layout [30/38]: adding range check plugin [31/38]: creating default HBAC rule allow_all [32/38]: Upload CA cert to the directory [33/38]: initializing group membership [34/38]: adding master entry [35/38]: configuring Posix uid/gid generation [36/38]: enabling compatibility plugin [37/38]: tuning directory server [38/38]: configuring directory to start on boot Done configuring directory server (dirsrv). Configuring Kerberos KDC (krb5kdc): Estimated time 30 seconds [1/10]: adding sasl mappings to the directory [2/10]: adding kerberos container to the directory [3/10]: configuring KDC [4/10]: initialize kerberos container [5/10]: adding default ACIs [6/10]: creating a keytab for the directory [7/10]: creating a keytab for the machine [8/10]: adding the password extension to the directory [9/10]: starting the KDC [10/10]: configuring KDC to start on boot Done configuring Kerberos KDC (krb5kdc). Configuring kadmin [1/2]: starting kadmin [2/2]: configuring kadmin to start on boot Done configuring kadmin. Configuring ipa_memcached [1/2]: starting ipa_memcached [2/2]: configuring ipa_memcached to start on boot Done configuring ipa_memcached. Configuring the web interface (httpd): Estimated time 1 minute [1/13]: setting mod_nss port to 443 [2/13]: setting mod_nss password file [3/13]: enabling mod_nss renegotiate [4/13]: adding URL rewriting rules [5/13]: configuring httpd [6/13]: setting up ssl [7/13]: setting up browser autoconfig [8/13]: publish CA cert [9/13]: creating a keytab for httpd [10/13]: clean up any existing httpd ccache [11/13]: configuring SELinux for httpd [12/13]: restarting httpd [13/13]: configuring httpd to start on boot Done configuring the web interface (httpd). Applying LDAP updates Restarting the directory server Restarting the KDC Configuring DNS (named) [1/9]: adding DNS container [2/9]: setting up our zone [3/9]: setting up reverse zone [4/9]: setting up our own record [5/9]: setting up kerberos principal [6/9]: setting up named.conf [7/9]: restarting named [8/9]: configuring named to start on boot [9/9]: changing resolv.conf to point to ourselves Done configuring DNS (named). Global DNS configuration in LDAP server is empty You can use 'dnsconfig-mod' command to set global DNS options that would override settings in local named.conf files Restarting the web server ============================================================================== Setup complete Next steps: 1. You must make sure these network ports are open: TCP Ports: * 80, 443: HTTP/HTTPS * 389, 636: LDAP/LDAPS * 88, 464: kerberos * 53: bind UDP Ports: * 88, 464: kerberos * 53: bind * 123: ntp 2. You can now obtain a kerberos ticket using the command: 'kinit admin' This ticket will allow you to use the IPA tools (e.g., ipa user-add) and the web user interface. Be sure to back up the CA certificate stored in /root/cacert.p12 This file is required to create replicas. The password for this file is the Directory Manager password :: [ PASS ] :: Running 'ipa-server-install --setup-dns --forwarder=192.168.122.1 --hostname=rhel6-4.testrelm.com -r TESTRELM.COM -p Secret123 -P Secret123 -a Secret123 -U' ---------------------------------- Added host "bz817080.testrelm.com" ---------------------------------- Host name: bz817080.testrelm.com Principal name: host/bz817080.testrelm.com Password: False Keytab: False Managed by: bz817080.testrelm.com :: [ PASS ] :: Running 'ipa host-add bz817080.testrelm.com --force' :: [ PASS ] :: Running 'mkdir /tmp/certdb' :: [ PASS ] :: Running 'echo Secret123 > /tmp/certdb/passwd1' :: [ PASS ] :: Running 'certutil -f /tmp/certdb/passwd1 -N -d /tmp/certdb' Generating key. This may take a few moments... :: [ PASS ] :: Running 'certutil -f /tmp/certdb/passwd1 -R -s 'cn=bz817080.testrelm.com,o=testrelm.com' -d /tmp/certdb -z /etc/group -a > /tmp/certdb/bz817080.csr' :: [ PASS ] :: Running 'ipa cert-request --add --principal bz817080/bz817080.testrelm.com /tmp/certdb/bz817080.csr > /tmp/certdb/bz817080.crt' Certificate: MIIDHDCCAgSgAwIBAgIBDDANBgkqhkiG9w0BAQsFADA3MRUwEwYDVQQKEwxURVNU UkVMTS5DT00xHjAcBgNVBAMTFUNlcnRpZmljYXRlIEF1dGhvcml0eTAeFw0xMzAx MTYwMjUyMjBaFw0xNTAxMTcwMjUyMjBaMDcxFTATBgNVBAoTDFRFU1RSRUxNLkNP TTEeMBwGA1UEAxMVYno4MTcwODAudGVzdHJlbG0uY29tMIGfMA0GCSqGSIb3DQEB AQUAA4GNADCBiQKBgQCYZKFHEimRJcjfLIP+vnbL+EQs7No0qb3PLwX0D/p0gbiv fUMFm8KlBqyhg7Qy9nZ2+4ypmTDLK+V1uIMn4GeAbineO3p4JzXbNLBrTudEoNcU i/Rl1ysd8n9Ie50zkIZPSJ+Oi4OpvVkos+tGVkJ5bW+EW+0IcfSh6ZJUw3sK2wID AQABo4G2MIGzMB8GA1UdIwQYMBaAFLTuw6qhrHxcCH1NFPFGCJqdWGcSMEIGCCsG AQUFBwEBBDYwNDAyBggrBgEFBQcwAYYmaHR0cDovL3JoZWw2LTQudGVzdHJlbG0u Y29tOjgwL2NhL29jc3AwDgYDVR0PAQH/BAQDAgTwMB0GA1UdJQQWMBQGCCsGAQUF BwMBBggrBgEFBQcDAjAdBgNVHQ4EFgQUJOm0UTK0oMI7HiyD1Cx0T0RxVaowDQYJ KoZIhvcNAQELBQADggEBANA0acopYzdeO9uWn1B0NUTTszaJP81WCblo7htRy4Nh wmOBCQSFvE8Ajy2mS6otwrwgNMG+7LZO9wp4+3be3EfJ5YxSOSnFW8U1qHMhHmMA BPQKhg1nDSosuVli95pTUdErYkOWzici0SUdhWa+P4RhEQoMhcxU+T3foIS7Vjcj RkqoI1xu01MjBB2t+wBESAX8vzxJBowP6zp7VtKY/FetbaMZ6yw24GQQ9dideHO2 Dnle8YuENjy0nKUUgQBJLqoZ/BTtpQMI71iFw0M18YWahzFNl9RIVr9Rx6HsXoxB /Xr9kIgzkCRDbMCXgo4wQtWeCxAe2UNXmAyxHtWadAs= Subject: CN=bz817080.testrelm.com,O=TESTRELM.COM Issuer: CN=Certificate Authority,O=TESTRELM.COM Not Before: Wed Jan 16 02:52:20 2013 UTC Not After: Sat Jan 17 02:52:20 2015 UTC Fingerprint (MD5): 92:6b:5a:e3:39:65:b3:ff:f2:f9:65:fa:e6:b3:68:8a Fingerprint (SHA1): c0:97:61:44:72:25:d0:63:f2:80:f7:4b:9f:92:42:fc:ea:38:80:67 Serial number (hex): 0xC Serial number: 12 :: [ PASS ] :: Running 'ipa cert-show --out=/tmp/certdb/bz817080.crt 12' :: [ PASS ] :: Running 'certutil -f /tmp/certdb/passwd1 -A -n bz817080 -d /tmp/certdb -t u,u,u -a < /tmp/certdb/bz817080.crt' Request "20130116021422" modified. :: [ PASS ] :: Running 'ipa-getcert start-tracking -d /tmp/certdb -n bz817080' :: [ PASS ] :: Running 'certutil -f /tmp/certdb/passwd1 -A -n bz817080 -d /etc/httpd/alias -t u,u,u -a < /tmp/certdb/bz817080.crt' Request "20130116021439" modified. :: [ PASS ] :: Running 'ipa-getcert start-tracking -d /etc/httpd/alias -n bz817080' ipa : ERROR Some certificates may still be tracked by certmonger. This will cause re-installation to fail. Start the certmonger service and list the certificates being tracked # getcert list These may be untracked by executing # getcert stop-tracking -i <request_id> for each id in: 20130116021439 Shutting down all IPA services Removing IPA client configuration Unconfiguring ntpd Unconfiguring CA directory server Unconfiguring CA Unconfiguring named Unconfiguring web server Unconfiguring krb5kdc Unconfiguring kadmin Unconfiguring directory server Unconfiguring ipa_memcached :: [ PASS ] :: Running 'ipa-server-install --uninstall -U 2>&1|tee /tmp/ipaserverinstall_bz817080.out' :: [ PASS ] :: File '/tmp/ipaserverinstall_bz817080.out' should contain 'ipa.*ERROR.*Some certificates may still be tracked by certmonger.' :: [ PASS ] :: File '/tmp/ipaserverinstall_bz817080.out' should contain 'This will cause re-installation to fail.' :: [ PASS ] :: File '/tmp/ipaserverinstall_bz817080.out' should contain 'Start the certmonger service and list the certificates being tracked' :: [ PASS ] :: BZ 817080 not found Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHSA-2013-0528.html I appear to still be seeing this with ipa-server-3.0.0-26.el6_4.2.x86_64 Can you open a new bug with the details (what files, configuration, etc not restored) and reference this one? |
ipa-server-install --uninstall doesn't clear certmonger dirs root@privserv certmonger]# pwd /var/lib/certmonger [root@privserv certmonger]# ls -lR .: total 8 drwxr-xr-x. 2 root root 4096 Apr 27 17:20 cas drwxr-xr-x. 2 root root 4096 Apr 27 17:20 requests ./cas: total 12 -rw-------. 1 root root 72 Apr 27 17:20 20120424011747 -rw-------. 1 root root 94 Apr 27 17:20 20120424011747-1 -rw-------. 1 root root 108 Apr 27 17:20 20120424011747-2 ./requests: total 8 -rw-------. 1 root root 3874 Apr 27 17:20 20120427071425 -rw-------. 1 root root 3160 Apr 27 17:20 20120427071514 ipa-server-install --no-host-dns \ --dirsrv_pkcs12 mycompany.pkcs12 --dirsrv_pin=PASSWORD_REMOVED \ --http_pkcs12 mycompany.pkcs12 --http_pin=PASSWORD_REMOVED \ --realm REALM_REMOVED --domain DOMAIN_REMOVED \ --hostname HOSTNAME_REMOVED \ -p PASSWORD_REMOVED -P PASSWORD_REMOVED -a PASSWORD_REMOVED [10/35]: configuring uniqueness plugin [11/35]: configuring uuid plugin [12/35]: configuring modrdn plugin [13/35]: enabling entryUSN plugin [14/35]: configuring lockout plugin [15/35]: creating indices [16/35]: configuring ssl for ds instance ipa : ERROR Didn't get new certmonger request, got Request "20120427071425" modified. Unexpected error - see ipaserver-install.log for details: certmonger did not issue new tracking request for 'MY_CA_DESCRIPTION_REMOVED' in '/etc/dirsrv/slapd-MY_DOMAIN_REMOVED/'. Use 'ipa-getcert list' to list existing certificates. Furthermore, `ipa-getcert list' isn't helpful at all, because I don't have IPA configured and the command will fail. ipaserver-install.log 2012-04-27T15:14:26Z DEBUG stderr= 2012-04-27T15:14:26Z ERROR Didn't get new certmonger request, got Request "20120427071425" modified. 2012-04-27T15:14:26Z DEBUG certmonger did not issue new tracking request for 'MSInfoIPA' in '/etc/dirsrv/slapd-MY_DOMAIN_REMOVED/'. Use 'ipa-getcert list' to list existing certificates. File "/usr/sbin/ipa-server-install", line 1087, in <module> rval = main() File "/usr/sbin/ipa-server-install", line 916, in main hbac_allow=not options.hbac_allow) File "/usr/lib/python2.6/site-packages/ipaserver/install/dsinstance.py", line 248, in create_instance self.start_creation("Configuring directory server", 60) File "/usr/lib/python2.6/site-packages/ipaserver/install/service.py", line 257, in start_creation method() File "/usr/lib/python2.6/site-packages/ipaserver/install/dsinstance.py", line 516, in __enable_ssl dsdb.track_server_cert(nickname, self.principal, dsdb.passwd_fname, 'restart_dirsrv %s' % self.serverid ) File "/usr/lib/python2.6/site-packages/ipaserver/install/certs.py", line 526, in track_server_cert raise RuntimeError('%s did not issue new tracking request for \'%s\' in \'%s\'. Use \'ipa-getcert list\' to list existing certificates.' % (cmonger.service_name, nickname, self.secdir)) I haven't hit this with 2.1, I believe this is a regression in 2.2 ipa-server-2.2.0-11.el6.x86_64 Likely related to bug 817065