Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 674902

Summary: When updating a repo with new cert/key/ca-cert, it is not saved to disk
Product: [Retired] Pulp Reporter: Jay Dobies <jason.dobies>
Component: z_otherAssignee: Jeff Ortel <jortel>
Status: CLOSED CURRENTRELEASE QA Contact: Preethi Thomas <pthomas>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: skarmark, tsanders
Target Milestone: ---Keywords: Triaged
Target Release: Sprint 21   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-08-16 12:11:04 UTC Type: ---
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: 647488    

Description Jay Dobies 2011-02-03 17:22:51 UTC
Looking at the API repo create method, it has the snippet:

        if cert_data:
            cert_files = self._write_certs_to_disk(id, cert_data)
            for key, value in cert_files.items():
                r[key] = value


No such snippet exists in repo update, so the files are never written out.

When fixing this, be sure to check if there was a previous certificate/private key/CA certificate and delete them from disk ahead of time (or use the same file name I suppose).

Comment 1 Jeff Ortel 2011-02-25 22:36:49 UTC
No need to delete, it uses the same filename.

Comment 2 Jeff Ortel 2011-03-02 21:34:35 UTC
Build: 0.144

Comment 3 Preethi Thomas 2011-04-15 20:09:25 UTC
verified
[root@preethi ~]# rpm -q pulp
pulp-0.0.163-1.fc14.noarch

[root@preethi ~]# ls -l /etc/pki/content/f14/total 12
-rw-r--r--. 1 apache root 2114 Apr 14 15:30 consumer-f14.ca
-rw-r--r--. 1 apache root 2216 Apr 14 15:30 consumer-f14.cert
-rw-r--r--. 1 apache root 3243 Apr 14 15:30 consumer-f14.key
[root@preethi ~]# ls -l /etc/pki/content/f14-original/


[root@preethi ~]# pulp-admin -u admin -p admin repo update --id f14 --consumer_ca /root/repo-auth-certs/ca1.crt --consumer_cert /root/repo-auth-certs/pulp-f14.crt --consumer_key /root/repo-auth-certs/client.key
Successfully updated repository [ f14 ]

[root@preethi ~]# ls -l /etc/pki/content/f14/
total 12
-rw-r--r--. 1 apache root 2114 Apr 15 16:20 consumer-f14.ca
-rw-r--r--. 1 apache root 2216 Apr 15 16:20 consumer-f14.cert
-rw-r--r--. 1 apache root 3243 Apr 15 16:20 consumer-f14.key
[root@preethi ~]#

Comment 4 Preethi Thomas 2011-08-16 12:11:04 UTC
Closing with Community Release 15

pulp-0.0.223-4.

Comment 5 Preethi Thomas 2011-08-16 12:22:45 UTC
Closing with Community Release 15

pulp-0.0.223-4.