Bug 1101973
Summary: | oo-diagnostics tools is checking a non-existing dir after update ose-2.0 GA to ose-2.0.z puddle + RHSCL-1.1 | ||
---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | Johnny Liu <jialiu> |
Component: | Node | Assignee: | Miciah Dashiel Butler Masters <mmasters> |
Status: | CLOSED ERRATA | QA Contact: | libra bugs <libra-bugs> |
Severity: | low | Docs Contact: | |
Priority: | medium | ||
Version: | 2.0.0 | CC: | adellape, bleanhar, jokerman, libra-onpremise-devel, mmasters, mmccomas, tiwillia |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | openshift-origin-broker-util-1.37.4.1-1.el6op | Doc Type: | Bug Fix |
Doc Text: |
The `test_for_nonrpm_rubygems` test in the `oo-diagnostics` tool previously used shell globbing to search for gemspec files in several paths. However, shell globbing returns back the glob pattern (rather than an empty list) if the pattern does not match anything. The test failed to take this shell feature into account, instead interpreting a returned glob pattern as a file name. If one of the directories that the test searched was empty, the test would output spurious error messages such as "ls: cannot access /opt/rh/ruby193/root/usr/local/share/gems/specifications/*.gemspec: No such file or directory". This bug fix updates the `oo-diagnostics` tool to handle empty gemdirs. Specifically, the glob search in the `test_for_nonrpm_rubygems` was rewritten to perform the search using Ruby code rather than shell. Globbing in Ruby returns an empty list if the glob pattern does not match anything. As a result, the `oo-diagnostics` tool no longer prints spurious error messages for empty directories.
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2015-12-17 17:09:03 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: |
Description
Johnny Liu
2014-05-28 09:29:16 UTC
We must have upgraded away all the gems that put specs in /opt/rh/ruby193/root/usr/local/share/gems/specifications/ That's fine, just change the test to skip the directories that aren't there. Probably the same thing can happen under 2.1. (In reply to Luke Meyer from comment #1) > We must have upgraded away all the gems that put specs in > /opt/rh/ruby193/root/usr/local/share/gems/specifications/ > > That's fine, just change the test to skip the directories that aren't there. > Probably the same thing can happen under 2.1. ose-2.1 broker has such issue, node does not. Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/8de407f41f77b22bf0b3cb5a005af5d6c539cf02 oo-diagnostics: Handle empty gemdirs In test_for_nonrpm_rubygems, glob in Ruby rather than in shell in order to avoid getting the glob itself back if it does not match anything. This commit fixes bug 1101973. Because OSE-2.0 and RHSCL-1.1 was released for a long long time ago, it is hard for to prepare such a reproducible env. So verified this bug with the following steps against 2.2/2015-11-11.1 puddle. [root@broker ~]# mkdir /opt/rh/ruby193/root/usr/local/share/gems/specifications/ [root@broker ~]# ls /opt/rh/ruby193/root/usr/local/share/gems/specifications/ [root@broker ~]# ls /opt/rh/ruby193/root/usr/local/share/gems/specifications/*.gemspec ls: cannot access /opt/rh/ruby193/root/usr/local/share/gems/specifications/*.gemspec: No such file or directory # oo-diagnostics -v <--snip--> INFO: checking for presence of gem-installed rubygems looking in /opt/rh/ruby193/root/usr/local/share/gems/specifications/*.gemspec /opt/rh/ruby193/root/usr/share/gems/specifications/*.gemspec INFO: running: test_for_multiple_gem_versions <--snip--> No error is seen now. 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://rhn.redhat.com/errata/RHSA-2015-2666.html |