Bug 1003037 - cannot log into OpenShift - openshift-java-client 2.0.x doesn't handle the latest REST responses
Summary: cannot log into OpenShift - openshift-java-client 2.0.x doesn't handle the la...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Master
Version: 2.x
Hardware: x86_64
OS: Linux
high
high
Target Milestone: ---
: ---
Assignee: Ravi Sankar
QA Contact: libra bugs
URL:
Whiteboard:
: 1004083 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-30 14:30 UTC by Carlos Díaz
Modified: 2015-05-15 00:55 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-09-19 16:48:49 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker JBIDE-15396 0 Critical Closed cannot log into OpenShift (even though credentials are valid) 2017-09-26 13:51:11 UTC

Description Carlos Díaz 2013-08-30 14:30:38 UTC
Description of problem:

I am trying to create a New OpenShift application using the Eclipse OpenShfit plugin without success :(

The result is always "The credentials for user xxxxxxx are not valid"

Any help? thanks!

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

OpenShift JBoss tool for Eclipse Juno

How reproducible:

Steps to Reproduce:
1. Install OpenShift JBoss tool for Eclipse Juno
2. Try to sign in


Actual results:

The credentials for user xxxxxx are not valid.

Expected results:

Signed in.

Additional info:

Comment 1 Nam Duong 2013-08-30 16:04:00 UTC
See https://www.openshift.com/forums/openshift/the-credentials-for-user-are-not-valid#comment-33837  

Upgrade to Kepler worked for me.

Comment 2 Andre Dietisheim 2013-09-03 14:43:30 UTC
I just found out what breaks the openshift-java-client:
It's an addition to the REST responses that the library cannot handle. It stumbles upon the following:

<snip>
               {
                    "default_value" => undefined,
                    "description" => "Add or Update application environment variables, e.g.:[{'name':'FOO', 'value':'123'}, {'name':'BAR', 'value':'abc'}]",
                    "name" => "environment_variables",
                    "type" => "array",
                    "valid_options" => []
                }
</snip>

The error is caused by "type" => "array" which it doesnt know and complains. Clearly a shortcoming in the client library, something the client library should simply ignore. But I cannot go back and backport the correct behaviour know in latter versions.
Btw. This also break our existing JBDS6 users. IMHO we should consider removing this response from protocol 1.0 since it breaks existing users.

Comment 3 Andre Dietisheim 2013-09-03 17:38:09 UTC
To track this issue in JBoss Tools/JBoss Developer Studio, I filed https://issues.jboss.org/browse/JBDS-2750 in our jira. 
Can you please add this as external bug-tracker? I cannot, seem not to have sufficient permissions.

Comment 4 Andre Dietisheim 2013-09-03 21:51:53 UTC
We closed the JBDS issue and filed this to the JBoss Tools jira (since this is not specific to JBDS) at https://issues.jboss.org/browse/JBIDE-15396. Please add this as external bugtracker in this bugzilla (I cannot, I'm missing the priviledges)

Comment 5 Vojtech Vitek 2013-09-04 11:10:45 UTC
Zend Studio 10 users are hitting the same problem with current OpenShift Online.

(https://issues.jboss.org/browse/JBIDE-15400 closed as duplicate of https://issues.jboss.org/browse/JBIDE-15396)

Comment 6 Vojtech Vitek 2013-09-04 11:37:31 UTC
Zend confirmed they're going to update the openshift-java-client in the future Zend Studio 10 versions.

In my opinion, we should hotfix the REST issue described in comment 2.

Comment 7 Vojtech Vitek 2013-09-04 11:58:40 UTC
*** Bug 1004083 has been marked as a duplicate of this bug. ***

Comment 8 Lili Nader 2013-09-06 06:40:03 UTC
Ravi pushed a fix https://github.com/openshift/origin-server/pull/3559

Comment 9 weiwei jiang 2013-09-09 02:59:03 UTC
Test on STG(dev_stage_375), and work well, so verified this.

Comment 10 weiwei jiang 2013-09-09 06:06:45 UTC
Reproduced with eclipse Juno & jboss tool for Juno on PROD;
Reproduced with eclipse kepler & jboss tool 4.1.0.final.core on PROD;
Can not reproduced with Jboss Developer Studio 7.0.0.GA on PROD;

Comment 11 Carlos Díaz 2013-09-09 06:31:32 UTC
(In reply to Nam Duong from comment #1)
> See
> https://www.openshift.com/forums/openshift/the-credentials-for-user-are-not-
> valid#comment-33837  
> 
> Upgrade to Kepler worked for me.

Ok I did and It works! Thanks.

Comment 12 Andre Dietisheim 2013-09-09 08:28:22 UTC
Hi weiwei jiang

(In reply to weiwei jiang from comment #10)
> Reproduced with eclipse Juno & jboss tool for Juno on PROD;

expected, thanks for confirming.

> Reproduced with eclipse kepler & jboss tool 4.1.0.final.core on PROD;

completely unexpected and contradicts Nam telling upgrading worked for him. Are you sure that kepler + JBT 4.1. is NOT working for you?

> Can not reproduced with Jboss Developer Studio 7.0.0.GA on PROD;

expected, thanks for confirming (but is in contradiction to the above. JBDS7 == Kepler + JBT 4.1).

Comment 13 weiwei jiang 2013-09-09 09:03:10 UTC
(In reply to weiwei jiang from comment #10)
> Reproduced with eclipse Juno & jboss tool for Juno on PROD;
> Reproduced with eclipse kepler & jboss tool 4.1.0.final.core on PROD;
> Can not reproduced with Jboss Developer Studio 7.0.0.GA on PROD;

Update the result.

 Reproduced with eclipse Juno & jboss tool for Juno on PROD;
 Can not reproduced with eclipse kepler & jboss tool 4.1.0.final.core on PROD;
 Can not reproduced with Jboss Developer Studio 7.0.0.GA on PROD

Comment 14 Andre Dietisheim 2013-09-09 09:14:03 UTC
I just verified JBDS6 (which is equivalent to JUNO + JBT 4.0) and it works for me on STG. awesome!
The links to the environment variables, which cause JUNO + JBT 4.0 to break are now gone.
I also verified Zent Studio 10 which works for me now when using (the fixed) https://stg.openshift.redhat.com


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