Bug 977751

Summary: 'oo-admin-broker-cache -c' can't clean the removed cartridge repository.
Product: OpenShift Online Reporter: nsun <nsun>
Component: PodAssignee: Ravi Sankar <rpenta>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 2.xCC: dmcphers, rpenta, xtian
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-30 00:48:00 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:
Embargoed:

Description nsun 2013-06-25 09:17:12 UTC
Description of problem:
 Run command 'oo-admin-broker-cache -c' after remove one cartridge on node, It will be can't clean cartridge repository.

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

How reproducible:
always

Steps to reproduce:
1. ssh login all nodes and remove php cartridge
# yum remove openshift-origin-cartridge-php -y
2. ssh login broker to clean cache
# oo-admin-broker-cache -c
3. Check if php cartridge still available
# rhc cartridge list

Actual resutls:
still found php cartridge

Expected results:
No php cartridge found

Additional info:
After remove php cartridge, we must be remove '/var/lib/openshift/.cartridge_repository/redhat-php' manually, then on broker clean up cache, otherwise cartridge still available.

Comment 1 Ravi Sankar 2013-09-12 23:06:06 UTC
No fix needed.
Before step-3, need to restart mcollective service for the new changes to be reflected.
# service mcollective restart

Verify and close the bug as invalid.

Comment 2 nsun 2013-09-13 03:07:14 UTC
On devenv_3780 :
   After php cartridge removed and mcollective service restarted,  php cartridge will unavailable, 'rhc cartridge list' also correct and can't found php cart. 
   But the directory '/var/lib/openshift/.cartridge_repository/redhat-php' still existed, we must remove it manually or it was insignificant ? 

On OSE Puddle [1.2/2013-09-11.1] :
   After php cartridge removed and mcollective service restarted, php cartridge still available.

Comment 3 Dan McPherson 2013-11-11 19:26:50 UTC
Ravi: Any update here?

Comment 4 Ravi Sankar 2013-11-11 23:56:42 UTC
Discussed with mrunal, 'yum remove' will not remove the cartridge from dir /var/lib/openshift/.cartridge_repository/ and this should not be the responsibility of yum. The new carts/cart versions are copied by mcollective and the current use case on prod is to show old as well as new carts. Removing the stale cart dir can not be part of 'oo-admin-broker-cache', it's main purpose is to clear the current cache for broker and console.

To test removal of cart, as part of step-1: you need to do
- yum remove openshift-origin-cartridge-php -y
- rm -rf /var/lib/openshift/.cartridge_repository/redhat-php

Comment 5 nsun 2013-11-12 02:27:52 UTC
Ok, If so, this bug can be closed.