Description of problem: When creating an application with both a primary and secondary (e.g. mysql) cartridge and a template Git URL, the broker sends --with-template-git-url on the MCollective post-configure message bound for the secondary cartridge. This causes an erroneous attempt to build the secondary cartridge in the node. Example message: I, [2013-05-07T17:05:10.699657 #30389] INFO -- : openshift.rb:43:in `cartridge_do_action' cartridge_do_action call / action: cartridge_do, agent=openshift, data={:cartridge=>"mysql-5.1", :action=>"post-configure", :args=> {"--with-app-uuid"=>"b48d82beb75911e2a22e12313d1b3d3a", "--with-app-name"=>"test", "--with-container-uuid"=>"b48d82beb75911e2a22e12313d1b3d3a", "--with-container-name"=>"test", "--with-namespace"=>"136796066711f4e2", "--with-request-id"=>"81180b9de95a7625a988921c5c0294db", "--cart-name"=>"mysql-5.1", "--with-template-git-url"=> "https://github.com/openshift/wordpress-example"}, :process_results=>true} The --with-template-git-url parameter should only be sent to primary cartridges during configure and post-configure (configure works correctly). Version-Release number of selected component (if applicable): How reproducible: Create an application with the php-5.3 and mysql-5.1 cartridge. Steps to Reproduce: 1. 2. 3. Actual results: A post-configure message for mysql-5.1 containing a --with-template-git-url parameter is sent to the node. Expected results: A post-configure message for mysql-5.1 without a --with-template-git-url parameter. Additional info:
The init-git-url was always being sent to the secondary cartridge configure hook during application creation. With the introduction of post-configure, it was also being sent to it. Lowering severity since the runtime is now ignoring the init-git-url in case the initial build is not required or the cartridge is not buildable.
Fixed with --> https://github.com/openshift/origin-server/pull/2606
Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/ee13a4a4eb2f3241ad25046503ba33b4f7ad1719 Fix for bug 960757 - Sending init_git_url only for deployable cartridge configure/post-configure - Removing is_primary_cart method in favor of is_deployable
This is verified on devenv_3267 $rhc app-create test1 https://raw.github.com/jhou1/v2php/master/metadata/manifest.yml https://raw.github.com/jhou1/v2mysql/master/metadata/manifest.yml --from-code git://github.com/openshift/wordpress-example.git -px The cartridge 'https://raw.github.com/jhou1/v2php/master/metadata/manifest.yml' will be downloaded and installed The cartridge 'https://raw.github.com/jhou1/v2mysql/master/metadata/manifest.yml' will be downloaded and installed Application Options ------------------- Namespace: jhou Cartridges: https://raw.github.com/jhou1/v2php/master/metadata/manifest.yml, https://raw.github.com/jhou1/v2mysql/master/metadata/manifest.yml Source Code: git://github.com/openshift/wordpress-example.git Gear Size: default Scaling: no Creating application 'test1' ... done Waiting for your DNS name to be available ... done Downloading the application Git repository ... Cloning into 'test1'... Your application code is now in 'test1' test1 @ http://test1-jhou.dev.rhcloud.com/ (uuid: 519ecd11140eb8075b000001) --------------------------------------------------------------------------- Created: 10:14 AM Gears: 1 (defaults to small) Git URL: ssh://519ecd11140eb8075b000001.rhcloud.com/~/git/test1.git/ Initial Git URL: git://github.com/openshift/wordpress-example.git SSH: 519ecd11140eb8075b000001.rhcloud.com php-5.3 (PHP 5.3) ----------------- From: https://raw.github.com/jhou1/v2php/master/metadata/manifest.yml Gears: Located with mysql-5.1 mysql-5.1 (MySQL Database 5.1) ------------------------------ From: https://raw.github.com/jhou1/v2mysql/master/metadata/manifest.yml Gears: Located with php-5.3 Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/ Database Name: test1 Password: AXMmM35NtIVJ Username: adminkrMwtga RESULT: Application test1 was created. MySQL 5.1 database added. Please make note of these credentials: Root User: adminkrMwtga Root Password: AXMmM35NtIVJ Database Name: test1 Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/ You can manage your new MySQL database by also embedding phpmyadmin-3.4. The phpmyadmin username and password will be the same as the MySQL credentials above. Here is mcollective log: [2013-05-23T22:16:13.444276 #1060] INFO -- : openshift.rb:43:in `cartridge_do_action' cartridge_do_action call / action: cartridge_do, agent=openshift, data={:cartridge=>"php-5.3", :action=>"post-configure", :args=> {"--with-app-uuid"=>"519ecd11140eb8075b000001", "--with-app-name"=>"test1", "--with-container-uuid"=>"519ecd11140eb8075b000001", "--with-container-name"=>"test1", "--with-namespace"=>"jhou", "--with-request-id"=>"8ebc461bdd7e444e9f09ba669974da73", "--cart-name"=>"php-5.3", "--with-template-git-url"=> "git://github.com/openshift/wordpress-example.git"}, :process_results=>true} The template-git-url is sent to web cartridge instead of secondary cartridge.