Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1696480 - Redeploy certificates changes the name of the certificate causing master-api won't start
Summary: Redeploy certificates changes the name of the certificate causing master-api ...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.10.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 3.10.z
Assignee: Joseph Callen
QA Contact: Johnny Liu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-04-04 23:33 UTC by Vladislav Walek
Modified: 2019-04-11 18:52 UTC (History)
0 users

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-04-11 18:52:30 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Vladislav Walek 2019-04-04 23:33:32 UTC
Description of problem:

The redeploy certificates sets the name of the certificate to default name. Causing the error when the certificate is added with different name.

The playbook copies the certificate file with original name, but adds the name of the cert in master-config.yaml in different way:

In inventory:
openshift_master_named_certificates=[{"certfile": "/root/mycompany/my_example.cer", "keyfile": "/root/mycompany/my_example.key", "names": ["master.mycompany.com"], "cafile": "/root/mycompany/ca.cer"}]

Then the dir of named_certificates:
# ls  named_certificates

ca.cer 
my_example.cer
master.mycompany.com.key

And the master-config.yaml
  namedCertificates:
  - certFile: /etc/origin/master/named_certificates/master.mycompany.com.cer
    keyFile: /etc/origin/master/named_certificates/master.mycompany.com.key
    names:
    - master.myexample.com

This causes the issue.

Version-Release number of the following components:
ansible-2.4.6.0-1.el7ae.noarch
openshift-ansible-3.10.47-1.git.0.95bc2d2.el7_5.noarch

How reproducible:
<currently working on reproducer>

Steps to Reproduce:
1.
2.
3.

Actual results:
no error in the playbook, just that master-api can't start due missing certificate

Expected results:

Additional info:
could be in:
openshift-ansible/roles/openshift_named_certificates/tasks/main.yml
openshift-ansible/roles/openshift_master_certificates/tasks/main.yml

Comment 1 Vladislav Walek 2019-04-05 21:34:57 UTC
the bug is the discrepancy between the name of the file in named_certificate directory and the named of the file in master-config.yaml which are both updated by the playbook.


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