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_other | Assignee: | Jeff Ortel <jortel> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Preethi Thomas <pthomas> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | unspecified | CC: | 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 | ||
No need to delete, it uses the same filename. Build: 0.144 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 ~]# Closing with Community Release 15 pulp-0.0.223-4. Closing with Community Release 15 pulp-0.0.223-4. |
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).