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

Summary: Failed to delete db env vars for scalable app after remove db cartridge
Product: OpenShift Online Reporter: Lei Zhang <lzhang>
Component: PodAssignee: Abhishek Gupta <abhgupta>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.xCC: xtian
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-02-26 19:12:22 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

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 @ (uuid: 52f9f6951c7401b196000024)
  Domain:     chunchen
  Created:    6:08 PM
  Gears:      1 (defaults to small)
  Git URL:    ssh://
  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"

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

How reproducible:

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 -->

Comment 3 openshift-github-bot 2014-02-13 04:18:53 UTC
Commit pushed to master at
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"
[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"