Bug 958113 - frequently get domain listed instead of "jenkins created" response when creating jenkins
Summary: frequently get domain listed instead of "jenkins created" response when creat...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OKD
Classification: Red Hat
Component: Pod
Version: 2.x
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Abhishek Gupta
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-04-30 12:32 UTC by Andre Dietisheim
Modified: 2015-05-15 02:19 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-04-30 20:56:20 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker JBIDE-14354 0 Critical Closed I dont get credentials reported when I create a jenkins initially (when creating an app) (WATCHER ISSUE) 2013-07-15 12:57:28 UTC

Description Andre Dietisheim 2013-04-30 12:32:56 UTC
Description of problem:
it became very frequent (maybe 50% of the cases) that I get an unexpected response when I create a jenkins application. When it works I get a response of type "application" ("type":"application"), when it doesn't I get a response of type "domain" ("type":"domain") as if I had listed my domain.
In consequence JBoss Tools is not able to present the jenkins url and credentials to the user as it does when it works

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

How reproducible:
~50% of the cases 

Steps to Reproduce:
1. create a jenkins application via JBT or rhc
2.
3.
  
Actual results:
If it doesn't work, I get a response as if I had listed my domain ("type":"application"). Of course there are no messages that would report the jenkins credentials and url:

<snip>
{

   "data":{
      "id":"1367305329108",
      "links":{
         "GET":{
            "href":"https://openshift.redhat.com/broker/rest/domains/1367305329108",
            "method":"GET",
            "optional_params":[

            ],
            ...
   "messages":[
   ],
   "status":"ok",
   "type":"domain",
   "version":"1.0"
   ...
</snip>

Expected results:
when it works, i get a response that reports the freshly created jenkins application ("type": "application"):

<snip>
{

   "data":{
      "aliases":[
      ],
      "app_url":"http://jackie-1367305329108.rhcloud.com/",
      "build_job_url":null,
      "building_app":null,
      "building_with":null,
      "creation_time":"2013-04-30T11:59:05Z",
      "domain_id":"1367305329108",
      "embedded":{
      },
      "framework":"jenkins-1.4",
      ...
     "messages":[
      {
         "exit_code":null,
         "field":null,
         "severity":"info",
         "text":"Application jackie was created."
      },
      {
         "exit_code":0,
         "field":"current_ip",
         "severity":"info",
         "text":"184.73.138.68"
      },
      {
         "exit_code":0,
         "field":"result",
         "severity":"info",
         "text":"\nJenkins created successfully.  Please make note of these credentials:\n\n   User: admin\n   Password: XXXX \n\nNote:  You can change your password at: https://jackie-1367305329108.rhcloud.com/me/configure\n\n"
      }
   ],
   "status":"created",
   ...
   "type":"application",
   "version":"1.0"
   ...
</snip> 


Additional info:

Comment 1 JBoss JIRA Server 2013-04-30 12:36:47 UTC
Andre Dietisheim <adietish> made a comment on jira JBIDE-14342

I noticed that it became very frequent (maybe 50% of the cases) that I get an unexpected response when I create a jenkins application. When it works I get a response of type "application" (*"type":"application"*), when it doesn't I get a response of type "domain" (*"type":"domain"*) as if I had listed my domain.
In consequence JBoss Tools is not able to present the jenkins url and credentials to the user as it does when it works.

When it works I get the following:

{code}
{

   "data":{
      "aliases":[
      ],
      "app_url":"http://jackie-1367305329108.rhcloud.com/",
      "build_job_url":null,
      "building_app":null,
      "building_with":null,
      "creation_time":"2013-04-30T11:59:05Z",
      "domain_id":"1367305329108",
      "embedded":{
      },
      "framework":"jenkins-1.4",
      ...
     "messages":[
      {
         "exit_code":null,
         "field":null,
         "severity":"info",
         "text":"Application jackie was created."
      },
      {
         "exit_code":0,
         "field":"current_ip",
         "severity":"info",
         "text":"184.73.138.68"
      },
      {
         "exit_code":0,
         "field":"result",
         "severity":"info",
         "text":"\nJenkins created successfully.  Please make note of these credentials:\n\n   User: admin\n   Password: XXXX \n\nNote:  You can change your password at: https://jackie-1367305329108.rhcloud.com/me/configure\n\n"
      }
   ],
   "status":"created",
   ...
   "type":"application",
   "version":"1.0"
   ...
{code}

If it doesn't, I get a response as if I had listed my domain. Of course there are no messages that would report the jenkins credentials and url:

{code}
{

   "data":{
      "id":"1367305329108",
      "links":{
         "GET":{
            "href":"https://openshift.redhat.com/broker/rest/domains/1367305329108",
            "method":"GET",
            "optional_params":[

            ],
            ...
   "messages":[
   ],
   "status":"ok",
   "type":"domain",
   "version":"1.0"
   ...

{code}

Comment 2 Andre Dietisheim 2013-04-30 12:42:27 UTC
sorry I mistyped: In case it works I get "type":"application", if it doesn't the response is of "type":"domain" and lists the domain (where I would have expected it to report the application that was created.

In both cases the jenkins application gets created. it's just the response on the REST interface that's wrong

Comment 3 Andre Dietisheim 2013-04-30 20:56:20 UTC
Talking to Abishek and further investigating I found out that the problem is not in the broker but in JBoss Tools. 
It is caused by a background thread that is responsible for creating the application but timeouts. It would then refresh to make sure the application wasn't created yet and keep trying to create it otherwise. 
Apparently the issue started to appear when the timing on OpenShift further degraded. I was somehow fooled by the requests I catched, sorry!


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