Bug 1012709

Summary: gear create now adds a new app-ssh-key to mongo, but gear-destroy does not remove them
Product: OpenShift Online Reporter: Rajat Chopra <rchopra>
Component: PodAssignee: Rajat Chopra <rchopra>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 2.xCC: pruan
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: 2013-10-17 13:32:06 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 Rajat Chopra 2013-09-27 00:55:35 UTC
Description of problem:
Gear create (app-create call over mcollective) generates a new ssh key that gets absorbed by mongo at the app level.
Issue is nobody deletes it when gear-destroy is called.

Background : Broker understands that app ssh key can be added by a cartridge which may forget to delete it. So mechanism was put in place that a component_id will be stored with each app-ssh-key to recall who created it. 
With recent code changes, an app-ssh-key is generated at gear create time, but this means that component-id is null. The fallout is that app's ssh-key list keeps growing because there is no way to delete from it.

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


How reproducible:
Always

Steps to Reproduce:
1. Create scalable app
2. Scale-up/down several times
3.

Actual results:
App ssh keys keep growing in the application's mongo record.

Expected results:
Only components should be allowed to add ssh keys to app, or there should be a way to delete the ssh keys added by gears themselves.


Additional info:

Comment 1 Rajat Chopra 2013-10-01 20:27:59 UTC
Fixed with https://github.com/openshift/origin-server/pull/3748
Still working on migration for existing faulty applications.

Comment 2 Peter Ruan 2013-10-04 19:41:55 UTC
verified with devenv_3864