Various tools scripts have directory problems
Some of the executable scripts in the factory/tools have directory issues and need to be run in a particular directory. These scripts should have better error catching and try to do a better job of detecting common conditions (such as the RPM, where everything is in a standard spot). At the very least, they should not fail with a stack trace if run from the wrong directory.
analyze_entries, analyze_frontends, and analyze_queues are all susceptible. There may be others.
#1 Updated by Douglas Strain almost 8 years ago
- Description updated (diff)
Here is an example error message:
Cannot open /root/monitor/rrd_Status_Attributes.xml
or rrd_Status_Attributes.xml was not found there.
Traceback (most recent call last):
File "/usr/bin/analyze_queues", line 405, in ?
File "/usr/bin/analyze_queues", line 177, in main
u = urllib.urlopen(file_dir)
File "/usr/lib64/python2.4/urllib.py", line 82, in urlopen
File "/usr/lib64/python2.4/urllib.py", line 190, in open
return getattr(self, name)(url)
File "/usr/lib64/python2.4/urllib.py", line 426, in open_file
File "/usr/lib64/python2.4/urllib.py", line 440, in open_local_file
raise IOError(e.errno, e.strerror, e.filename)
IOError: [Errno 2] No such file or directory: '/root/monitor/rrd_Status_Attributes.xml'
#2 Updated by Douglas Strain almost 8 years ago
- Status changed from Assigned to Feedback
- Assignee changed from Douglas Strain to Parag Mhashilkar
I have committed this to branch_master_3296 with hash commit:687b56a. I plan to cherry-pick back to v2plus as well, since I would classify this as a bug.
It does a better job of directory detection and telling you what to do and not crashing.
Please review. Thanks!