[jbosstools-issues] [JBoss JIRA] (JBIDE-22803) Explorer: When OS projects are created and deleted, seems Openshift explorer restores non existing values

Dmitrii Bocharov (JIRA) issues at jboss.org
Fri Oct 14 09:27:02 EDT 2016


    [ https://issues.jboss.org/browse/JBIDE-22803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13307235#comment-13307235 ] 

Dmitrii Bocharov commented on JBIDE-22803:
------------------------------------------

[~jcantrill], thank you for confirmation.
I've just dug a bit into WebSockets to understand the nature of 
{code:java}
WatchClient.WatchEndpoint.onFailure(IOException, Response) is called with:
    _err.getClass()_ = "class java.net.ProtocolException"
    _err.getMessage()_ = "Expected HTTP 101 response but was '200 OK'"	
    _response_ = "Response{protocol=http/1.1, code=200, message=OK, url=https://10.1.2.2:8443/oapi/v1/projects?watch=true&}"
    _response.request()_ = Request{method=GET, url=https://10.1.2.2:8443/oapi/v1/projects?watch=true&, tag=Request{method=GET, url=https://10.1.2.2:8443/oapi/v1/projects?watch=true&, tag=null}}
{code}
why is it failure, when it is ok.
So i can say that it is not an OS server issue, it's the way web sockets work. Here is the specification: https://tools.ietf.org/html/rfc6455#page-8 (you can just do Ctrl-F and print 101):
{quote} If the |Sec-WebSocket-Accept| value does not match the expected
   value, if the header field is missing, or if the HTTP status code is
   not 101, the connection will not be established, and WebSocket frames
   will not be sent.{quote}
So i think we can think of such onFailure as a signal of a disabled project watching feature. I'll try to work it up the right way in resclient and throw an UnsupportedOperationException when its not supported. 

> Explorer: When OS projects are created and deleted, seems Openshift explorer restores non existing values
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: JBIDE-22803
>                 URL: https://issues.jboss.org/browse/JBIDE-22803
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: openshift
>    Affects Versions: 4.4.1.AM2
>            Reporter: Jeff MAURY
>            Assignee: Dmitrii Bocharov
>              Labels: explorer, openshift, openshift_v3
>             Fix For: 4.4.2.AM2
>
>         Attachments: after application creation.png, after build finished.png, Openshift Web Console.png, screenshot-1.png
>
>
> EXEC: create an Openshift project
> EXEC: expand it
> EXEC: Create an application in this project (nodejs-example)
> ASSERT: wait for the pod to be available
> EXEC: delete the Openshit project
> EXEC: create an Openshift project (using the same name. You may have to repeat this step as you may got error that it still exists)
> EXEC: expand it
> EXEC: Create an application in this project (nodejs-example)
> EXEC: expand the nodejs-example node
> ASSERT: you should see 2 pods the old one and the build pod you just created: [^screenshot-1.png]



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the jbosstools-issues mailing list