Bug 1218872
Summary: | rhc setup fail during upload sshkey | ||||||
---|---|---|---|---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | Anping Li <anli> | ||||
Component: | Node | Assignee: | Vu Dinh <vdinh> | ||||
Status: | CLOSED ERRATA | QA Contact: | libra bugs <libra-bugs> | ||||
Severity: | high | Docs Contact: | |||||
Priority: | high | ||||||
Version: | 2.2.0 | CC: | adellape, bleanhar, jialiu, jokerman, libra-onpremise-devel, mmasters, mmccomas, tiwillia, vdinh | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | rubygem-openshift-origin-controller-1.38.4.1-1.el6op | Doc Type: | Bug Fix | ||||
Doc Text: |
If the MINIMUM_SSH_KEY_SIZE parameter was not set in the /etc/openshift/broker.conf file, a nil value was passed into a condition statement which failed due to lack of nil checking. This caused the `rhc` command to fail to upload the SSH key while creating a new domain. This bug fix updates the condition statement to handle a nil value and return the correct DEFAULT_MINIMUM_SSH_KEY_SIZE value. As a result, the `rhc` command can now successfully upload the SSH key in this scenario.
|
Story Points: | --- | ||||
Clone Of: | Environment: | ||||||
Last Closed: | 2015-12-17 17:10:03 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Anping Li
2015-05-06 06:13:30 UTC
Created attachment 1022483 [details]
Production log for this issue
rhc setup works, user domain can be created.Verified and pass in puddle-2-2-2015-05-06 If I understand comment 4 correctly, the problem appears if Rails.application.config.openshift[:minimum_ssh_key_size] is nil, which was happening because production.rb was not initialising it with the value from the MINIMUM_SSH_KEY_SIZE setting in broker.conf. The defect is fixed, and never shipped, in the sense that production.rb correctly initialises Rails.application.config.openshift[:minimum_ssh_key_size] with the value of MINIMUM_SSH_KEY_SIZE. For this reason, I am inclined to mark this Bugzilla report CLOSED CURRENTRELEASE. However, I believe we will see the same error if MINIMUM_SSH_KEY_SIZE is not set in broker.conf. We should change the || to a rescue, or check that Rails.application.config.openshift[:minimum_ssh_key_size] is not nil before trying to read Rails.application.config.openshift[:minimum_ssh_key_size][ssh_key_type]. I would like to change this code to use rescue so that it will work properly even if MINIMUM_SSH_KEY_SIZE is not set. Tim, does that make sense? If so, I can take this issue and fix it as I described for the next release. Miciah, That absolutely makes sense. We should have a rescue there instead so we don't treat nil like an array. Feel free to take this issue, and thanks! PR <https://github.com/openshift/origin-server/pull/6299> is submitted to fix this bug. Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/facd441df157c78baf89cfbb646378043599c914 Bug 1218872: Fix rhc setup fail during upload sshkey Uploading ssh key during 'rhc setup' command may fail due to the method 'get_minimum_ssh_key_size' returns nil if MINIMUM_SSH_KEY_SIZE variable is not set in broker.conf file. This commit change the '||' operation to use rescue instead in order to handle the nil case from the first condition and return the default value 'DEFAULT_MINIMUM_SSH_KEY_SIZE' which is zero by default in case nil value detected. Bug 1218872 Link <https://bugzilla.redhat.com/show_bug.cgi?id=1218872> Signed-off-by: Vu Dinh <vdinh> Verified this bug with OpenShiftEnterpriseErrata/2.2/2015-11-11.1, and PASS. # grep MIN /etc/openshift/broker.conf # e.g.: MINIMUM_SSH_KEY_SIZE="ssh-rsa|2048 ssh-dss|1024" #MINIMUM_SSH_KEY_SIZE= Run "rhc setup" successfully, ssh-key is uploaded successfully. 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://rhn.redhat.com/errata/RHSA-2015-2666.html |