Bug 1682924
Summary: | Slow Initialization During Upgrades | ||||||
---|---|---|---|---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | Matthew Robson <mrobson> | ||||
Component: | Installer | Assignee: | Vadim Rutkovsky <vrutkovs> | ||||
Installer sub component: | openshift-ansible | QA Contact: | Weihua Meng <wmeng> | ||||
Status: | CLOSED ERRATA | Docs Contact: | |||||
Severity: | high | ||||||
Priority: | high | CC: | gpei, mrobson, vrutkovs, wmeng | ||||
Version: | 3.11.0 | ||||||
Target Milestone: | --- | ||||||
Target Release: | 3.11.z | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: |
Cause: sanity checks were using inefficient code to validate hostvars
Consequence: sanity check time took several minutes on a large set of hosts
Fix: hostvars are stored in the class, so there are not being copied on every check
Result: sanity checks take less time to complete
|
Story Points: | --- | ||||
Clone Of: | |||||||
: | 1685583 (view as bug list) | Environment: | |||||
Last Closed: | 2019-06-26 09:07:55 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 1685583 | ||||||
Attachments: |
|
Description
Matthew Robson
2019-02-25 20:27:14 UTC
Matt, Do you have the instrumented code or patches that we can look at? Reading the data you've provided it isn't clear if it's htpasswd or the removed vars that's actually consuming time. Is the warning message emitted on entry or exit of the given functions? 2019-02-12 14:00:59,527 p=103939 u=root | [WARNING]: Checking htpasswd at 2019-02-12 14:00:59 -- 6 minutes here -- 2019-02-12 14:06:59,539 p=103939 u=root | [WARNING]: Checking removed vars at 2019-02-12 14:06:59 2019-02-12 14:07:06,656 p=103939 u=root | [WARNING]: Checking end at 2019-02-12 14:07:06 Sorry, should have included that. Its instrumented at exit - should have done entry and exit both to make it easier to read. I will attached the sanity_checks.py file. So the difference between removed and htpasswd is how long removed took. self.check_htpasswd_provider(hostvars, host) display.warning("Checking htpasswd at %s" % datetime.datetime.fromtimestamp(time.time()).strftime('%Y-%m-%d %H:%M:%S')) check_for_removed_vars(hostvars, host) display.warning("Checking removed vars at %s" % datetime.datetime.fromtimestamp(time.time()).strftime('%Y-%m-%d %H:%M:%S')) Created attachment 1538830 [details]
instrumented sanity_checks.py
This is the file from 3.11.59 with the first sanity check fix applied along with the instrumentation.
Created 3.11 PR - https://github.com/openshift/openshift-ansible/pull/11268 Vadim, is there an easy way to run the initialization / sanity check on it's own so we can test this at the customer? Fix is available in openshift-ansible-3.11.92-1 Fixed. openshift-ansible-3.11.96-1 In my test With 3.11.69, TASK [Run variable sanity checks] costs 27 seconds with 3.11.96, TASK [Run variable sanity checks] costs less than 1 second Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2019:1605 |