Bug 987892 - Jenkins client could be added to scaled up scalable app directly even though no jenkins app in domain.
Jenkins client could be added to scaled up scalable app directly even though ...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: Kubernetes (Show other bugs)
2.x
Unspecified Linux
medium Severity medium
: ---
: ---
Assigned To: Rajat Chopra
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-24 07:33 EDT by Lei Zhang
Modified: 2015-05-14 20:19 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-08-07 18:56:31 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)

  None (edit)
Description Lei Zhang 2013-07-24 07:33:35 EDT
Description of problem:
Give a scalable app(e.g myphp53s) and no jenkins app in domain, add jenkins-client-1.4 directly, no message 'A Jenkins server does not exist in this domain!' prompts,but add successfully.
[rayzhang@rayzhang Work]$ rhc cartridge add -a myruby18  -c jenkins-client-1.4
Adding jenkins-client-1.4 to application 'myruby18' ... done
jenkins-client-1.4 (Jenkins Client 1.4)
---------------------------------------
  Gears: Located with ruby-1.8, haproxy-1.4

Version-Release number of selected component (if applicable):
devenv-3545
rhc-1.12.1

How reproducible:
always

Steps to Reproduce:
1.rhc app create myruby18  ruby-1.8 -s 
2.scale up via REST API
3.rhc cartridge add -a myruby18  -c jenkins-client-1.4

Actual results:
After scale up, scalable app can add jenkins-client without jenkins app in domain

Expected results:
Add jenkins-client without jenkins in domain should prompt "A Jenkins server does not exist in this domain!"

Additional info:
Comment 1 Jhon Honce 2013-07-24 13:24:07 EDT
Reproduced bug and verified that configure is not being called for jenkins-client on the node via mcollective log.
Comment 2 Rajat Chopra 2013-07-24 21:00:28 EDT
Could not reproduce this problem.

[root@ip-10-204-131-114 ~]# rhc app show test
test @ http://test-matte.dev.rhcloud.com/ (uuid: 51f077e6207cc5501f000004)
--------------------------------------------------------------------------
  Created: 8:57 PM
  Gears:   2 (defaults to small)
  Git URL: ssh://51f077e6207cc5501f000004@test-matte.dev.rhcloud.com/~/git/test.git/
  SSH:     51f077e6207cc5501f000004@test-matte.dev.rhcloud.com

  php-5.3 (PHP 5.3)
  -----------------
    Scaling: x2 (minimum: 2, maximum: available) on small gears

  haproxy-1.4 (OpenShift Web Balancer)
  ------------------------------------
    Gears: Located with php-5.3
[root@ip-10-204-131-114 ~]# rhc cartridge add -a test  -c jenkins-client-1.4
Adding jenkins-client-1.4 to application 'test' ... 
A Jenkins server does not exist in this domain!
You must create a Jenkins server before installing this cartridge.
Comment 3 Rajat Chopra 2013-07-24 21:03:23 EDT
There was bug fix that went in late evening 23rd July. It is possible that the devenv_3545 did not include that merge. Could you verify this issue on the latest devenv?
Comment 4 Lei Zhang 2013-07-26 00:56:27 EDT
Hi Rajat,

I retest on devenv-3563 rhc-1.12.2, this bug still exists.

Step 1: create a scalable app 
#rhc app create myruby18s ruby-1.8 -s

[rayzhang@rayzhang Work]$ rhc app show myruby18s
myruby18s @ http://myruby18s-rayzhang.dev.rhcloud.com/ (uuid: 51f1fce9bcec436d1000000f)
---------------------------------------------------------------------------------------
  Created: 12:36 PM
  Gears:   2 (defaults to small)
  Git URL: ssh://51f1fce9bcec436d1000000f@myruby18s-rayzhang.dev.rhcloud.com/~/git/myruby18s.git/
  SSH:     51f1fce9bcec436d1000000f@myruby18s-rayzhang.dev.rhcloud.com

  ruby-1.8 (Ruby 1.8)
  -------------------
    Scaling: x2 (minimum: 1, maximum: available) on small gears

  haproxy-1.4 (OpenShift Web Balancer)
  ------------------------------------
    Gears: Located with ruby-1.8

Step 2: scale up via REST API
#curl -k -H "Accept:application/xml" --user "lzhang+1@redhat.com:rayzhang13" https://ec2-23-22-229-123.compute-1.amazonaws.com/broker/rest/domains/rayzhang/applications/myruby18s/events -d event=scale-up -X POST

Step 3: check the status 
#rhc app show --gear -a myruby18s

[rayzhang@rayzhang Work]$ rhc app show --gear -a myruby18s 
ID                       State   Cartridges           Size  SSH URL
------------------------ ------- -------------------- ----- --------------------------------------------------------------------------
51f1fce9bcec436d1000000f started ruby-1.8 haproxy-1.4 small 51f1fce9bcec436d1000000f@myruby18s-rayzhang.dev.rhcloud.com
628894016789686173827072 new     ruby-1.8 haproxy-1.4 small 628894016789686173827072@628894016789686173827072-rayzhang.dev.rhcloud.com



Other point, After I scaled up at first time, waiting after auto-scaling down happend, I scale up again,  error happend 'Cannot scale up beyond maximum gear limit in app myruby18s.'

[rayzhang@rayzhang Work]$ curl -k -H "Accept:application/xml" --user "lzhang+1@redhat.com:rayzhang13" https://ec2-23-22-229-123.compute-1.amazonaws.com/broker/rest/domains/rayzhang/applications/myruby18s/events -d event=scale-up -X POST
<?xml version="1.0" encoding="UTF-8"?>
<response>
  <status>unprocessable_entity</status>
  <type nil="true"></type>
  <data>
    <datum nil="true"></datum>
  </data>
  <messages>
    <message>
      <severity>error</severity>
      <text>Cannot scale up beyond maximum gear limit in app myruby18s.</text>
      <exit-code>168</exit-code>
      <field nil="true"></field>
    </message>
  </messages>
  <version>1.6</version>
  <api-version>1.6</api-version>
  <supported-api-versions>
    <supported-api-version>1.0</supported-api-version>
    <supported-api-version>1.1</supported-api-version>
    <supported-api-version>1.2</supported-api-version>
    <supported-api-version>1.3</supported-api-version>
    <supported-api-version>1.4</supported-api-version>
    <supported-api-version>1.5</supported-api-version>
    <supported-api-version>1.6</supported-api-version>
  </supported-api-versions>
</response>
Comment 5 Lei Zhang 2013-07-26 01:02:03 EDT
Hi Rajat,
 
The Comment#4 is invalid, should be like these.

I retest on devenv-3563 rhc-1.12.2, this bug still exists. I found the key point is to do scale up. if scaled up, jenkins-client can be added. 

Step 1: create a scalable app 
#rhc app create myruby18s ruby-1.8 -s

[rayzhang@rayzhang Work]$ rhc app show myruby18s
myruby18s @ http://myruby18s-rayzhang.dev.rhcloud.com/ (uuid: 51f1fce9bcec436d1000000f)
---------------------------------------------------------------------------------------
  Created: 12:36 PM
  Gears:   2 (defaults to small)
  Git URL: ssh://51f1fce9bcec436d1000000f@myruby18s-rayzhang.dev.rhcloud.com/~/git/myruby18s.git/
  SSH:     51f1fce9bcec436d1000000f@myruby18s-rayzhang.dev.rhcloud.com

  ruby-1.8 (Ruby 1.8)
  -------------------
    Scaling: x2 (minimum: 1, maximum: available) on small gears

  haproxy-1.4 (OpenShift Web Balancer)
  ------------------------------------
    Gears: Located with ruby-1.8

Step 2: scale up via REST API
#curl -k -H "Accept:application/xml" --user "lzhang+1@redhat.com:rayzhang13" https://ec2-23-22-229-123.compute-1.amazonaws.com/broker/rest/domains/rayzhang/applications/myruby18s/events -d event=scale-up -X POST

Step 3: add jenkins-client
# rhc cartridge add -a myruby18s -c jenkins-client-1.4 

[rayzhang@rayzhang ~]$ rhc cartridge add -a myruby18s -c jenkins-client-1.4 
Adding jenkins-client-1.4 to application 'myruby18s' ... done

jenkins-client-1.4 (Jenkins Client 1.4)
---------------------------------------
  Gears: Located with ruby-1.8, haproxy-1.4
Comment 6 Rajat Chopra 2013-07-29 15:11:25 EDT
Fixed with rev#0bc92a9d4b75514bf667eacdf356581b055d6b6c
Comment 7 Lei Zhang 2013-07-29 22:22:02 EDT
Verified on INT(devenv_3578) and rhc-1.12.3, after scaled up via REST API,message will prompt when add jenkins client without jenkins in domain.



[lijun@rayzhang Work]$ rhc app show --gear -a myruby18s
ID                       State   Cartridges           Size  SSH URL
------------------------ ------- -------------------- ----- --------------------------------------------------------------------------
51f71e2203ef64660e00029b started ruby-1.8 haproxy-1.4 small 51f71e2203ef64660e00029b@myruby18s-rayzhang.int.rhcloud.com
51f722736cec0ea3f300007e started ruby-1.8 haproxy-1.4 small 51f722736cec0ea3f300007e@51f722736cec0ea3f300007e-rayzhang.int.rhcloud.com
[lijun@rayzhang Work]$ rhc cartridge add -a myruby18s -c jenkins-client-1.4 
Adding jenkins-client-1.4 to application 'myruby18s' ... 
A Jenkins server does not exist in this domain!
You must create a Jenkins server before installing this cartridge.

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