Project

General

Profile

Bug #3296

Various tools scripts have directory problems

Added by Douglas Strain almost 8 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Douglas Strain
Category:
Factory
Target version:
Start date:
01/15/2013
Due date:
% Done:

0%

Estimated time:
First Occurred:
Occurs In:
Stakeholders:
Duration:

Description

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.

History

#1 Updated by Douglas Strain almost 8 years ago

  • Description updated (diff)

Here is an example error message:

  1. analyze_queues

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 ?
main()
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
return opener.open(url)
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
return self.open_local_file(url)
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!

#3 Updated by Parag Mhashilkar almost 8 years ago

  • Assignee changed from Parag Mhashilkar to Douglas Strain

Looks ok to merge. Please merge/cherry-pick into branch_v2plus as well

#4 Updated by Douglas Strain almost 8 years ago

I have merged this into master and cherry-picked into branch_v2plus.

#5 Updated by Douglas Strain almost 8 years ago

  • Status changed from Feedback to Resolved

#6 Updated by Parag Mhashilkar over 7 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF