Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1063764 - Failed to delete db env vars for scalable app after remove db cartridge
Summary: Failed to delete db env vars for scalable app after remove db cartridge
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Pod
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Abhishek Gupta
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-11 11:58 UTC by Lei Zhang
Modified: 2015-05-15 00:25 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-02-26 19:12:22 UTC


Attachments (Terms of Use)

Description Lei Zhang 2014-02-11 11:58:41 UTC
Description of problem:
Given one scalable app created(e.g.,myphp53s), add one db cartridge and then delete it, found db env vars still in gear


[rayzhang@ray Work]$ rhc cartridge remove -a  myphp53s  -c mysql-5.1
Removing a cartridge is a destructive operation that may result in loss of data associated with the cartridge.

Are you sure you wish to remove mysql-5.1 from 'myphp53s'? (yes|no): yes

Removing mysql-5.1 from 'myphp53s' ... removed

 [rayzhang@ray Work]$ rhc app show myphp53s
myphp53s @ http://myphp53s-chunchen.dev.rhcloud.com/ (uuid: 52f9f6951c7401b196000024)
-------------------------------------------------------------------------------------
  Domain:     chunchen
  Created:    6:08 PM
  Gears:      1 (defaults to small)
  Git URL:    ssh://52f9f6951c7401b196000024@myphp53s-chunchen.dev.rhcloud.com/~/git/myphp53s.git/
  SSH:        52f9f6951c7401b196000024@myphp53s-chunchen.dev.rhcloud.com
  Deployment: auto (on git push)
  haproxy-1.4 (Web Load Balancer)
  -------------------------------
    Gears: Located with php-5.3
  php-5.3 (PHP 5.3)
  -----------------
    Scaling: x1 (minimum: 1, maximum: available) on small gears
    
[rayzhang@ray Work]$ rhc app ssh myphp53s "env|grep DB"
OPENSHIFT_MYSQL_DB_PORT=38036
OPENSHIFT_MYSQL_DB_HOST=6f77ed04930411e3b11f22000a1cb309-chunchen.dev.rhcloud.com
OPENSHIFT_MYSQL_DB_PASSWORD=dsbWn_jUC8S6
OPENSHIFT_MYSQL_DB_GEAR_UUID=6f77ed04930411e3b11f22000a1cb309
OPENSHIFT_MYSQL_DB_USERNAME=admin1bCjfrx
OPENSHIFT_MYSQL_DB_URL=mysql://admin1bCjfrx:dsbWn_jUC8S6@6f77ed04930411e3b11f22000a1cb309-chunchen.dev.rhcloud.com:38036/
SSH_ORIGINAL_COMMAND=env|grep DB
OPENSHIFT_MYSQL_DB_GEAR_DNS=6f77ed04930411e3b11f22000a1cb309-chunchen.dev.rhcloud.com

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

How reproducible:
always

Steps to Reproduce:
1.Create one scalable app and embed db cartridge 
#rhc app create myphp53s php-5.3 -s mysql-5.1
2.Delete db cartridge
#rhc cartridge remove -a myphp53s -c mysql-5.1
3.Check db env vars 
#rhc app ssh myphp53s "env|grep DB"

Actual results:
Found db env vars still exists in gear

Expected results:
db env vars should be cleaned up after db cartridge delete

Additional info:

Comment 1 Jhon Honce 2014-02-11 16:01:06 UTC
Reading the mcollective.log on the Node, I don't find an unsubscribe call from the Broker for this cartridge.

Comment 2 Abhishek Gupta 2014-02-11 20:21:52 UTC
Fixed with --> https://github.com/openshift/origin-server/pull/4733

Comment 3 openshift-github-bot 2014-02-13 04:18:53 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/e5d3c5e681053d06fe559176c30ff5ad3a9bfe58
Bug 1063764 and 1064239:
 - Unsubscribe connections was not being called
 - ALLOW_MULTIPLE_HAPROXY_ON_NODE config was not being honored

Comment 4 Lei Zhang 2014-02-13 06:11:32 UTC
Verified on devenv_4370


[rayzhang@ray Work]$ rhc app ssh myphp53s "env|grep DB"
rhc cartrOPENSHIFT_MYSQL_DB_PORT=38051
OPENSHIFT_MYSQL_DB_HOST=52fc6101277a741af5000003-chunchen.dev.rhcloud.com
OPENSHIFT_MYSQL_DB_PASSWORD=nV7tlrTQd6MM
OPENSHIFT_MYSQL_DB_GEAR_UUID=52fc6101277a741af5000003
OPENSHIFT_MYSQL_DB_USERNAME=adminTjDZT99
OPENSHIFT_MYSQL_DB_URL=mysql://adminTjDZT99:nV7tlrTQd6MM@52fc6101277a741af5000003-chunchen.dev.rhcloud.com:38051/
SSH_ORIGINAL_COMMAND=env|grep DB
OPENSHIFT_MYSQL_DB_GEAR_DNS=52fc6101277a741af5000003-chunchen.dev.rhcloud.com
[rayzhang@ray Work]$ rhc cartridge remove -a myphp53s -c mysql-5.1 --confirm;
Removing mysql-5.1 from 'myphp53s' ... removed
[rayzhang@ray Work]$ rhc app ssh myphp53s "env|grep DB"
SSH_ORIGINAL_COMMAND=env|grep DB


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