Bug 1118500 - "rhc server add" incorrectly shares configs between servers
Summary: "rhc server add" incorrectly shares configs between servers
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: oc
Version: 2.x
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: ---
Assignee: Fabiano Franz
QA Contact: libra bugs
Depends On:
TreeView+ depends on / blocked
Reported: 2014-07-10 21:04 UTC by Brenton Leanhardt
Modified: 2015-05-15 02:29 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2014-10-10 00:48:33 UTC

Attachments (Terms of Use)
Test CA that will reproduce the bug (1.45 KB, application/x-x509-ca-cert)
2014-07-10 21:04 UTC, Brenton Leanhardt
no flags Details

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

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@example.com

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

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.

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