Bug 1118500

Summary: "rhc server add" incorrectly shares configs between servers
Product: OpenShift Online Reporter: Brenton Leanhardt <bleanhar>
Component: ocAssignee: Fabiano Franz <ffranz>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 2.xCC: jokerman, mmccomas, xiuwang
Target Milestone: ---Keywords: UpcomingRelease
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-10-10 00:48:33 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 Flags
Test CA that will reproduce the bug none

Description Brenton Leanhardt 2014-07-10 21:04:43 UTC
Created attachment 917188 [details]
Test CA that will reproduce the bug

Description of problem:

This is very similar to Bug #1117466.

Here's how to reproduce with rhc-1.27.4-1

1) ~/.openshift/express.conf
libra_server=broker.example.com

2) ~/.openshift/servers.yml
---
- server:
    hostname: broker.example.com
    use_authorization_tokens: true
    nickname: ose
    ssl_ca_file: [see attached]
    insecure: false
    login: XXXXXXX

3) rhc server add openshift.redhat.com online -l test

Notice in #2 the only server configuration that exist is the one with the custom CA file.  The config is first sync'd from disk and those are actually make it all the way to the 'add' method in https://github.com/openshift/rhc/blob/master/lib/rhc/servers.rb#L100.

I suspect the issue has to do with how sync_from_config calls add_or_update in  https://github.com/openshift/rhc/blob/master/lib/rhc/servers.rb#L153.  Adding and update probably need separate treatment.

Comment 1 XiuJuan Wang 2014-07-11 02:53:25 UTC
rhc-1.27.4

And the 'rhc server configure' will meet "The server's certificate could not be verified" issue when some servers contain ssl_ca_file parameter.

Comment 2 Fabiano Franz 2014-07-12 04:51:31 UTC
Fixed in https://github.com/openshift/rhc/pull/624

Comment 3 XiuJuan Wang 2014-07-14 06:09:52 UTC
rhc-1.28.0 build from devenv_4962

Can't reproduce this bug for 'rhc server add' and 'rhc server configure'.

Mark bug as verified.