Bug 1003037 - cannot log into OpenShift - openshift-java-client 2.0.x doesn't handle the latest REST responses
cannot log into OpenShift - openshift-java-client 2.0.x doesn't handle the la...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: REST API (Show other bugs)
2.x
x86_64 Linux
high Severity high
: ---
: ---
Assigned To: Ravi Sankar
libra bugs
:
: 1004083 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-30 10:30 EDT by Carlos Díaz
Modified: 2015-05-14 20:55 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-19 12:48:49 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker JBIDE-15396 Critical Closed cannot log into OpenShift (even though credentials are valid) 2016-05-23 17:41 EDT

  None (edit)
Description Carlos Díaz 2013-08-30 10:30:38 EDT
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 12:04:00 EDT
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 10:43:30 EDT
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 13:38:09 EDT
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 17:51:53 EDT
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 07:10:45 EDT
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 07:37:31 EDT
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 07:58:40 EDT
*** Bug 1004083 has been marked as a duplicate of this bug. ***
Comment 8 Lili Nader 2013-09-06 02:40:03 EDT
Ravi pushed a fix https://github.com/openshift/origin-server/pull/3559
Comment 9 weiwei jiang 2013-09-08 22:59:03 EDT
Test on STG(dev_stage_375), and work well, so verified this.
Comment 10 weiwei jiang 2013-09-09 02:06:45 EDT
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 02:31:32 EDT
(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 04:28:22 EDT
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 05:03:10 EDT
(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 05:14:03 EDT
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.