openshift_master_named_certificates and symlinks #2526

Closed
chmouel opened this Issue Sep 29, 2016 · 0 comments

Projects

None yet

1 participant

@chmouel
chmouel commented Sep 29, 2016

[provide a description of the issue]

Version

openshift-ansible-3.4.2-1-27-g7f1a3f9

Steps To Reproduce
  1. Use a openshift_named_certificates like in ansible hosts :
openshift_master_named_certificates=[{"certfile": "/etc/letsencrypt/live/lb.198.154.189.125.xip.io//cert.pem", "keyfile": "/etc/letsencrypt/live/lb.198.154.189.125.xip.io//privkey.pem", "names":["lb.198.154.189.125.xip.io"]}]

those files are symlinks :

$ ls -l /etc/letsencrypt/live/lb.198.154.189.125.xip.io/{cert,privkey}.pem                                                            
lrwxrwxrwx. 1 root root 49 Sep 28 18:06 /etc/letsencrypt/live/lb.198.154.189.125.xip.io/cert.pem -> ../../archive/lb.198.154.189.125.xip.io/cert3.pem
lrwxrwxrwx. 1 root root 52 Sep 28 18:06 /etc/letsencrypt/live/lb.198.154.189.125.xip.io/privkey.pem -> ../../archive/lb.198.154.189.125.xip.io/privkey3.pem
Current Result

Generated master-config.yaml would get the symlink names :

  namedCertificates:
  - certFile: /etc/origin/master/named_certificates/cert.pem
    keyFile: /etc/origin/master/named_certificates/privkey.pem
    names:
    - "lb.198.154.189.125.xip.io"

but have copied instead the symlink target files :

$ ls -l /etc/origin/master/named_certificates                                                                                         -rw-r--r--. 1 root root 1826 Sep 28 18:15 cert3.pem
-rw-------. 1 root root 1704 Sep 28 18:15 privkey3.pem
Expected Result

It should or :

generate the master-config.yaml namedCertificates, certFile and keyfile as cert3.pem or privkey3.pem (in this case the target symlinks) or copied the files with its symplinks name (and not target name) as cert.pem or privkey.pem

@sdodson sdodson closed this in #2528 Sep 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment