Bug 674902 - When updating a repo with new cert/key/ca-cert, it is not saved to disk
Summary: When updating a repo with new cert/key/ca-cert, it is not saved to disk
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: z_other
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: Sprint 21
Assignee: Jeff Ortel
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks: verified-to-close
TreeView+ depends on / blocked
 
Reported: 2011-02-03 17:22 UTC by Jay Dobies
Modified: 2011-08-16 12:22 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-08-16 12:11:04 UTC
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.