Bug 969724 - FaIL to remove a downloadable add-on cartridge
Summary: FaIL to remove a downloadable add-on cartridge
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Pod
Version: 2.x
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: ---
Assignee: Rajat Chopra
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-02 03:12 UTC by Clayton Coleman
Modified: 2015-05-15 00:17 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-06-11 04:15:20 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Clayton Coleman 2013-06-02 03:12:42 UTC
Database/service cartridges without the embedded tag lead to an app with an unremovable cartridge:

$ rhc create-app foo php-5.3
$ rhc add-cartridge http://cartreflect-claytondev.rhcloud.com/reflect?github=smarterclayton/openshift-redis-cart&commit=7f7f4aaffa1c86bb3c24bb4b491b1fafc73ae7a2

The cartridge is added and marked colocated (even though the cart doesn't have the embedded tag), but no actual commands are run on the head gear.  In addition, the cartridge cannot be removed:

$ rhc remove-cartridge smarterclayton-redis-2.6
Are you sure you wish to remove smarterclayton-redis-2.6 from 'foo'? (yes|no): yes

Removing smarterclayton-redis-2.6 from 'foo' ... 'redis-2.6' is not a feature of 'foo'

Probably doesn't block sprint exit.

Comment 1 Clayton Coleman 2013-06-02 03:38:29 UTC
This is because of vendor scope - any custom cartridge added to an app that is not the primary web cart can't be removed.

Should probably block sprint exit.

Comment 2 Rajat Chopra 2013-06-03 14:45:54 UTC
Fixed with rev#	bd5728c in origin/stg.
Fixed with rev# f50a498130f in origin/master.

Comment 3 Jianwei Hou 2013-06-04 06:50:18 UTC
Verified on STG

Steps:
Add a custom cartridge to an application, when remove it via rhc, the custom cartridge and be removed successfully

[hjw@hjw-rhel ~]$ rhc app-show ntest
ntest @ http://ntest-1sprint24.stg.rhcloud.com/ (uuid: 51ad8b5d2587c8fcae00008a)
--------------------------------------------------------------------------------
  Created: 2:38 PM
  Gears:   1 (defaults to small)
  Git URL: ssh://51ad8b5d2587c8fcae00008a.rhcloud.com/~/git/ntest.git/
  SSH:     51ad8b5d2587c8fcae00008a.rhcloud.com

  nodejs-0.6 (Node.js 0.6)
  ------------------------
    Gears: Located with jhou-mysql-5.1

  jhou-mysql-5.1 (MySQL Database 5.1)
  -----------------------------------
    From:           https://raw.github.com/jhou1/v2mysql/master/metadata/manifest.yml
    Gears:          Located with nodejs-0.6
    Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/
    Database Name:  ntest
    Password:       sNly2RbRDCd1
    Username:       admin9au7S8P
[hjw@hjw-rhel ~]$ rhc cartridge remove jhou-mysql-5.1 -a ntest 
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 jhou-mysql-5.1 from 'ntest'? (yes|no): yes

Removing jhou-mysql-5.1 from 'ntest' ... removed
[hjw@hjw-rhel ~]$ rhc app-show ntest
ntest @ http://ntest-1sprint24.stg.rhcloud.com/ (uuid: 51ad8b5d2587c8fcae00008a)
--------------------------------------------------------------------------------
  Created: 2:38 PM
  Gears:   1 (defaults to small)
  Git URL: ssh://51ad8b5d2587c8fcae00008a.rhcloud.com/~/git/ntest.git/
  SSH:     51ad8b5d2587c8fcae00008a.rhcloud.com

  nodejs-0.6 (Node.js 0.6)
  ------------------------
    Gears: 1 small


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