Bug 1305165 - oadm create-master-certs does not check FQDN
Summary: oadm create-master-certs does not check FQDN
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 3.1.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Jordan Liggitt
QA Contact: weiwei jiang
URL:
Whiteboard:
Depends On:
Blocks: OSOPS_V3
TreeView+ depends on / blocked
 
Reported: 2016-02-05 21:40 UTC by Wesley Hearn
Modified: 2016-12-09 09:53 UTC (History)
11 users (show)

Fixed In Version: atomic-openshift-3.1.1.905-1.git.0.ef5902f.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-12 16:28:09 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:1064 0 normal SHIPPED_LIVE Important: Red Hat OpenShift Enterprise 3.2 security, bug fix, and enhancement update 2016-05-12 20:19:17 UTC

Description Wesley Hearn 2016-02-05 21:40:56 UTC
Description of problem:
Regenerated cert for web frontend using oadm create-master-certs and it ended up updating kube configs with invalid URL entries.

Version-Release number of selected component (if applicable):
3.1.1.6

How reproducible:
Always

Steps to Reproduce:
1. Spin up native ha cluster
2. Update certs with `oadm create-master-certs --hostnames="$(openssl x509 -in back/master.server.crt -text | grep api | sed 's/DNS://g;s/IP Address://g;s/ //g'),console.cluster.openshift.com" --master=api.cluster.openshift.com --public-master=api.cluster.openshift.com --cert-dir=$PWD --overwrite=false` (notice public-master and master are not FQDN)
3. ls -l in /etc/origin/master and see the *.kubeconfig files got updated

Actual results:


Expected results:
--public-master and --master should have checks for FQDN names
--overwrite=false should error if it sees that it is about to overwrite a file and error out

Additional info:

Comment 1 Jordan Liggitt 2016-02-16 07:13:53 UTC
Added validation in https://github.com/openshift/origin/pull/7333

Still need to think through --overwrite behavior.

Comment 2 Jordan Liggitt 2016-02-20 15:24:27 UTC
hostname validation merged upstream in https://github.com/openshift/origin/pull/7333

Comment 3 weiwei jiang 2016-02-23 06:52:11 UTC
Checked with devenv_rhel7_3509 and
# openshift version 
openshift v3.1.1.905
kubernetes v1.2.0-alpha.7-703-gbc4550d
etcd 2.2.5

the bug can not be reproduced.

Comment 5 errata-xmlrpc 2016-05-12 16:28:09 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2016:1064


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