Bug 977224 - The info of add-on cartridges is printed orderlessly if added in the runtime of creating a scaling app
The info of add-on cartridges is printed orderlessly if added in the runtime ...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: Pod (Show other bugs)
2.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Abhishek Gupta
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-24 02:09 EDT by Zhe Wang
Modified: 2015-05-14 20:18 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-07-22 11:17:48 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 Zhe Wang 2013-06-24 02:09:25 EDT
Description of problem:
If adding an add-on cartridge to a scaling application during the runtime of creating the app (e.g., rhc create-app sphp php-5.3 mongodb-2.2 -s), the info of the add-on cartridges, including haproxy-1.4, will be orderlessly printed in the console output.

Version-Release number of selected component (if applicable):
INT(devenv_3402)
devenv_3405
rhc-1.10.5

How reproducible:
always

Steps to Reproduce:
1. Create a scaling app with some add-on cartridge added directly with "rhc create-app", for example,
rhc create-app sphp php-5.3 mongodb-2.2 -s

2. For clear comparison, create a non-scaling app of the same type in Step 1, including the add-on cartridge
rhc create-app php1 php-5.3 mongodb-2.2


Actual results:
In step 1, after creating the app successfully, the console output was orderless:

  Application sphp was created.
  mongodb-2.2: The cartridge php deployed a template application
  ^^^^^^^^^^^

haproxy-1.4:
^^^^^^^^^^^
  Starting Apache+mod_php HTTPD server
  MongoDB 2.2 database added.  Please make note of these credentials:
  ^^^^^^^^^^^
   Root User:     admin
   Root Password: YFP4R7DQcFj9
   Database Name: sphp
Connection URL: mongodb://$OPENSHIFT_MONGODB_DB_HOST:$OPENSHIFT_MONGODB_DB_PORT/
HAProxy instance is started
^^^^^^^

i.e., the info of the three cartridges, including php-5.3, mongodb-2.2, haproxy-1.4, was nested.

However, when creating a non-scaling app in Step 2, the info was printed in order without confusion.

  Application php1 was created.
  The cartridge php deployed a template application

mongodb-2.2:
  Starting Apache+mod_php HTTPD server
  MongoDB 2.2 database added.  Please make note of these credentials:
   Root User:     admin
   Root Password: F2p-aBdsYFld
   Database Name: php1
Connection URL: mongodb://$OPENSHIFT_MONGODB_DB_HOST:$OPENSHIFT_MONGODB_DB_PORT/


Expected results:
The info should be printed in order when creating a scaling app together with a add-on cartridge with "rhc create-app".

Additional info:
Comment 1 Clayton Coleman 2013-06-24 09:59:02 EDT
The node should stop trying to order things magically :) - we don't want to be dependent on order, we want the carts to report concrete bits of info back in a simple way.  The client ultimately will be responsible for organizing the info to the user, but the way the node is processed today that makes it difficult.

If the node stops trying to sublist the data, then this bug is no longer medium severity.
Comment 2 Jhon Honce 2013-06-24 11:25:53 EDT
There is an  order for cartridges to be instantiated within a gear and Broker drives that from the manifest categories.  The Node simply reports what the cartridge authors provide back to the Broker when the operation is finished.

Cartridge authors may be reporting on the wrong channel and if so, we'll have to work with them to correct that.
Comment 3 Abhishek Gupta 2013-06-26 18:52:08 EDT
Fixed with pull request in master --> https://github.com/openshift/origin-server/pull/2944
Comment 5 Zhe Wang 2013-06-27 06:46:36 EDT
Tested this bug in devenv_3419, and after creating a scaling php app with mongodb-2.2 added in runtime, the results were:

[zhe@fedora run97]$ rhc app create tst php-5.3 mongodb-2.2 -s
Application Options
-------------------
  Namespace:  dev3419tst
  Cartridges: php-5.3, mongodb-2.2
  Gear Size:  default
  Scaling:    yes

Creating application 'tst' ... done

  Application tst was created.
  The cartridge php deployed a template application
  Starting Apache+mod_php HTTPD server
  MongoDB 2.2 database added.  Please make note of these credentials:
   Root User:     admin
   Root Password: u-r1N9aZ7IgJ
   Database Name: tst
Connection URL: mongodb://$OPENSHIFT_MONGODB_DB_HOST:$OPENSHIFT_MONGODB_DB_PORT/
HAProxy instance is started

I think the results are satisfactory for verification. Could you please move the bug to ON_QA, and I will verify it literally then.

Thanks,
Zhe
Comment 6 Abhishek Gupta 2013-06-27 13:01:04 EDT
Pull request for stage --> https://github.com/openshift/origin-server/pull/2953
Comment 7 Zhe Wang 2013-06-28 05:13:21 EDT
Verified this but in STG(devenv-stage_382), and the results were:

[zhe@fedora runs]$ rhc app create phptst php-5.3 mongodb-2.2 -s
Application Options
-------------------
  Namespace:  zwstg
  Cartridges: php-5.3, mongodb-2.2
  Gear Size:  default
  Scaling:    yes

Creating application 'phptst' ... done

  Application phptst was created.
  The cartridge php deployed a template application
  Starting Apache+mod_php HTTPD server
  MongoDB 2.2 database added.  Please make note of these credentials:
   Root User:     admin
   Root Password: qb5EQtTqjkpm
   Database Name: phptst
Connection URL: mongodb://$OPENSHIFT_MONGODB_DB_HOST:$OPENSHIFT_MONGODB_DB_PORT/
HAProxy instance is started

Combining the results in Comment 5, move the bug to VERIFIED.

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