Red Hat Bugzilla – Bug 1012709
gear create now adds a new app-ssh-key to mongo, but gear-destroy does not remove them
Last modified: 2015-05-14 20:21:23 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):
Steps to Reproduce:
1. Create scalable app
2. Scale-up/down several times
App ssh keys keep growing in the application's mongo record.
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.
Fixed with https://github.com/openshift/origin-server/pull/3748
Still working on migration for existing faulty applications.
verified with devenv_3864