Bug 1012709 - gear create now adds a new app-ssh-key to mongo, but gear-destroy does not remove them
gear create now adds a new app-ssh-key to mongo, but gear-destroy does not re...
Product: OpenShift Online
Classification: Red Hat
Component: Pod (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Rajat Chopra
libra bugs
Depends On:
  Show dependency treegraph
Reported: 2013-09-26 20:55 EDT by Rajat Chopra
Modified: 2015-05-14 20:21 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-10-17 09:32:06 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Rajat Chopra 2013-09-26 20:55:35 EDT
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:

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

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 16:27:59 EDT
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 15:41:55 EDT
verified with devenv_3864

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