Friday, December 1, 2017

cclic_report year boundary problem

Posted on 
  • Documented problem with cclic_report and crossing of the new year's boundary

Year boundary problem

I have been working resolving problems with the cclic_report for this month. The script to do this has been failing due to a subtle bug in the algorithm used for obtaining the necessary files to translate the various user IDs and map them to Org 9 numbers and the like.

The script looks in a series of files out on the file system in order to obtain information to build mapping tables it needs to do the translation. These files are of the form:


A site designator. This is one of: dal-design (Dallas), nice-design (Nice), tii-shared (Bangalore) or vorlagenkontoliste (Vorlagenkontoliste)
The type of map. This is one of: passwd, aids or sbes
The current year
The current date in YYYY-MM-DD format
These files are automatically generated by dsmetrics however they are not guaranteed to be up to the minute. The script attempts to workaround this by first starting with the current day then working backward one day at a time for up to 30 days. Thus if say /data/cmetrics/dal-design/passwd.2006/2006-12-31 has not yet be generated 2006-12-30 will be checked, then 2006-12-29 and so on.

Problem is that that algorithm assumes that the data store (e.g. /data/cmetrics/<site>/<type>.<year>) has at least 30 days of information. This assumption breaks when the year changes since the year is contained in the parent directory. So, for example, given today is 1/8/2007, if .../passwd.2007/2007-01-08 has not be generated we can only check for 07, 06, .., 01. Checking for .../paswd.2007/2006-12-31 makes no sense and will never work.

Updating of the various files under /data/cmetrics seems sporadic. Currently the script is still not runnable as there is no /data/cmetrics/recv/tii-shared/password.2007 entries at all! The script is failing with:

$ ./ -v (v{VERSION}) starting
Getting full path to data files
Unable to find /data/cmetrics/recv/tii-shared/passwd.2007/2006-12-10 at ./ line 137
        main::findFile('/data/cmetrics/recv/tii-shared/passwd.2007') called at ./ line 249

I can see no real quick or easy solution for this except to wait for tii-shared's 2007 files to be generated...

No comments:

Post a Comment

Posted on  November 23, 2005 Continued to help several users with connecting to the new Controller Clearquest Database for Vinh...