Bug 1272568
| Summary: | Command to search for bad gears in DB. Gears that have nil for server_identiy or uid | |||
|---|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Ryan Howe <rhowe> | |
| Component: | oc | Assignee: | Rory Thrasher <rthrashe> | |
| Status: | CLOSED WORKSFORME | QA Contact: | Wei Sun <wsun> | |
| Severity: | medium | Docs Contact: | ||
| Priority: | unspecified | |||
| Version: | 2.2.0 | CC: | aos-bugs, erich, jokerman, mmccomas, pep, rhowe, rthrashe | |
| Target Milestone: | --- | |||
| Target Release: | --- | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | Doc Type: | Bug Fix | ||
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 1279584 (view as bug list) | Environment: | ||
| Last Closed: | 2016-01-13 22:11:18 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: | 1273542, 1279584 | |||
Whats the current result of oo-admin-chk in this situation? When I create an app and set the server_identity=nil, oo-admin-chk is able to correctly identify the server_identity mismatch. # oo-admin-chk Started at: 2015-12-17 16:34:41 UTC User data populated in 0 seconds Domain data populated in 0 seconds District data populated in 0 seconds Total gears found in mongo: 2 Application data populated in 0 seconds Usage data populated in 0 seconds Fetched all gears in 20 seconds Total gears found on the nodes: 2 Total nodes that responded: 1 Checked application gears on nodes in 0 seconds Checked application gears on nodes (reverse match) in 0 seconds Finished at: 2015-12-17 16:35:02 UTC Total time: 20.448s Gear 5672e18c95cabf165700001f exists but node 'ip-172-18-15-60' does not match DB server_identity '' FAILED Please refer to the oo-admin-repair tool man page to resolve some of these inconsistencies if no suggestion was provided with any error message(s). If oo-admin-chk is not coming back with a similar result, then there may be a combination of things going on. In addition to server_identity being nil, there may be something missing from the gear. I'm going to close this as oo-admin-chk should already catch gears that have a server_identity of nil. If it comes up again, feel free to reopen so I can take a deeper look. |
Description of problem: When a gear somehow has server_identity = nil ose does not like it. We need to add some function that searches for this so that we can ID what gears are invalid. Version-Release number of selected component (if applicable): 2.2.6 Reproduce: Gear in application has nil set for uid and server_identity "server_identity"=>nil "uid"=>nil Additional info: Script to search db for nil value in server_identiy. require '/var/www/openshift/broker/config/environment' bad_gears = [] Application.all.each do |app| app.gears.select {|g| !defined?(g.server_identity) or g.server_identity == nil }.each do |bad_gear| bad_gears << bad_gear end end puts "No bad gears found" if bad_gears.empty? bad_gears.each do |gear| puts "Bad gear found: #{gear.uuid}" puts "Bad gear object: #{gear.inspect}" puts "" end