oo-admin-repair is brutally slow (i.e., takes tens of minutes) in OpenShift Online production due to the initial population of hashes for all users, domains, and apps. For the --orphaned-envs subcommand, there is no reason to populate these hashes, so this code should be skipped.
PR <https://github.com/openshift/origin-server/pull/6303> is submitted to fix this issue.
Note to QE: The fix for this bug involved changes to the portion of the script that fixes stale ssh keys as well. A regression test for that option would be helpful.
Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/f3e646ae24bfa71b482b2936d055e0fb6122091c Bug 1276460: oo-admin-repair --orphaned-envs no need to populate hashes The 'oo-admin-repair' commands populate hashes for user, domain, app and district regardless if they are necessary or not. After this change only needed hashes are for specific commands by using several flags to determine which commands are used. This change will improve the performance by avoid populating unnecessary hashes. The current "--ssh-keys" option removes orphaned environment variables which should only be done by using "--orphaned-envs" option. This change removes that task from "--ssh-keys" option. Furthermore, with this change, the orphaned variables are now only removed from the domains but not from the gears as they are updated when the applications are updated. Even if the orphaned variables remain in the gears, there are no harms. Also, the orphaned variables will be grouped by domain and then removed all at once for each domain to reduce database access. All changes are intended to further improve the overall performance of the oo-admin-repair command. Bug 1276460 Link <https://bugzilla.redhat.com/show_bug.cgi?id=1276460> Signed-off-by: Vu Dinh <vdinh>
Verified on devenv_5723, oo-admin-chk is able to detect the stale ssh keys and oo-admin-repair could fix that.
We apologize, however, we do not plan to address this report at this time. The majority of our active development is for the v3 version of OpenShift. If you would like for Red Hat to reconsider this decision, please reach out to your support representative. We are very sorry for any inconvenience this may cause.