Bug 1012709 - gear create now adds a new app-ssh-key to mongo, but gear-destroy does not remove them
Summary: gear create now adds a new app-ssh-key to mongo, but gear-destroy does not re...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Pod
Version: 2.x
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Rajat Chopra
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-27 00:55 UTC by Rajat Chopra
Modified: 2015-05-15 00:21 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-10-17 13:32:06 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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


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