Red Hat Bugzilla – Bug 1276460
[perf] oo-admin-repair --orphaned-envs does not need to populate data hashes
Last modified: 2017-05-31 14:22:11 EDT
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
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.
Signed-off-by: Vu Dinh <email@example.com>
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.