<html><body><pre>
                      ENCP release notes, from RELEASE-2009-05-11 to production

Encp changes:
=============


Misc.:
======


                      Detailed cvs commit logs


========== alarm.py ====================================================================================

Removed most (but not quite all) traces of string exceptions. 

========== find_pnfs_file.py ====================================================================================

Differentiate between a file not existing at all and a file that has been replaced. 

Replace os module calls with file_utils.py calls. 

When reporting the error that a file recorded as deleted in the Enstore DB was found in pnfs, give the filename instead of the pnfsid. 

Give better error message when permissions prevent successful findinf of the file. 

========== generic_server.py ====================================================================================

Removed most (but not quite all) traces of string exceptions. 

========== checkdb.py ====================================================================================

change call to file_utils.rmdir to account for new signature (now this function is void and just throws exception if something goes wrong) 

added header 

1) added function rmdir to file_utils that effectively executes "rm -rf path" 2) modified checkdb.py so that it cleans up after itself not leaving old stuff behind. This change makes it immune to postgresql version changes 

========== info_server.py ====================================================================================

remove these warnings: nfo_server.py:272: Local variable (msg) not used info_server.py:322: Local variable (msg) not used info_server.py:390: Local variable (msg) not used 

The commands --find-original, --find-the-original, --find-duplicates, --find-all-copies and --find-copies commands are now available to users through the info server. Admins can now use them using the "enstore file" or "enstore info" commands (though the "enstore file" variants points to the info server). In addition to this the enstore info --show-copies now works like it was supposed to. 

correct previous patch 

fix for: Line 371 assumes that there will only be one match possible for each location cookie, external label combination. This is not true. I offer one random example, there are many more: 

bug fix: Mike reported that enstore info --file TEST23:0000_000000000_0000600 stopped working. This patch fixes it. 

revert recent changes 

Various patches to bring the servers into alignment with dispatching_worker.py 1.189 and upd_server.py 1.56. 

These changes have these Enstore servers using dispatching_worker.send_reply_with_long_answer() instead of their local copy of this function. Also, the commented out duplicated code has been removed too. 

remove print 

file_clerk - minor printout change info_server, info_client: noticed that command like "enstore info --show-file CDMS115209320400002" do not work Fixed. 

========== configuration_client.py ====================================================================================

Corrected a comment. 

Added reply_serverlist(), only the monitor has used this configuration server feature and did so by using generic client. Also, added --copy to be able to specify the configuration_server's internal configdict copy level. 

These patches are related to getting the configuration server switched to using dispatching_worker's new send_reply_with_long_answer() function. Backward compatiblity with old clients and servers is still there. 

Converted udp_client.UDPError and callback.TCPError to be replaced by e_errors.EnstoreError. 

Patched get_movers2() to honor the library_manager parameter. 

Removed most (but not quite all) traces of string exceptions. 

========== inventory.py ====================================================================================

added standard header 

I renamed the new variables: rc_file3 => rc_contents_list3 n_recyclable3 => number_of_recyclable3 

Added third category of recyclable volumes. This new category is for migrated, duplicated or cloned volumes. 

========== get_total_bytes_counter.py ====================================================================================

increase timout communicating to configuration server 

correct incorrect if condition. Do float(row[0]) to avoid problem with Decimal 

do not count shelf and test libraries 

========== file_clerk.py ====================================================================================

http://www-ccf.fnal.gov/Bugzilla/show_bug.cgi?id=422 take into account Mike's comments: 

revert recent changes 

Various patches to bring the servers into alignment with dispatching_worker.py 1.189 and upd_server.py 1.56. 

added new constant : FILE_DELETED_FLAGS list of supported delete flags check value of deleted string in file_clerk_client and file_clerk. 

converted deleted to string.lower(deleted) so not to confuse people who specify enstore file --bfid GCMS125018340400000 --deleted NO 

Added interface functions, to support migration working through file clerk: find_migration_info() set_copied() unset_copied() set_swapped() unset_swapped() set_checked() unset_checked() set_closed() unset_closed() Support functions added: time2timestamp() __find_migration_info() __migration() __set_migration() __unset_migration() 

These changes have these Enstore servers using dispatching_worker.send_reply_with_long_answer() instead of their local copy of this function. Also, the commented out duplicated code has been removed too. 

discovered that enstore info --list wrong_volume_format breaks. This commit fixes it 

followed up on our e-mail exchange this morning - added function invoke_functon that can be overriden by subclasses. Modified file_clerk accordingly 

file_clerk - minor printout change info_server, info_client: noticed that command like "enstore info --show-file CDMS115209320400002" do not work Fixed. 

file_clerk: 1) in __tape_list use connection pool 2) spawn tape_list3 in separate thread 3) add two new parameters - max number of threads and maximum number of open database connections (which is passed to edb) edb: 1) add new data member connection pool (from DBUtils) 2) add new parameter - maximum open connection allowed in the pool 

fix unbound variable 

1) fix pool instantiatin call 2) fix run_in_thread call 

call tape_list3 function in separate thread 

========== duplication_util.py ====================================================================================

1) Allow for the duplication of a duplicate. 2) Allow for make additional duplicates (i.e. _copy_2) if _copy_1 already exists). 3) Make --make-failed-copies work. 

========== enstore_system_html.py ====================================================================================

Added link to active_volumes.sh (ticket 442) 

don not count shelf and test libraries 

========== rawUDP.py ====================================================================================

Code review followup (bugzilla ticket 384) removed enable_print_queue 

Code review followup changes. (bugzilla ticket 384). 

cut/paste bug fuxed buffer -> self.buffer 

enable_reinsert -> self.enable_reinsert 

1. Added fuctions to control rawUDP 1.1. enable_raw_queue_print() - for debugging 1.2. disable_reshuffle() - when reinserting ticket into incoming queue do not change thge original place in the queue - this done for better processing of mover requests 1.3. set_keyword() - address messages in the queue by specified keyword instead of message id - this is for mover requests. Keyword: "mover" 

Modifications after code inspection. 1. Changed a raw message format. Not it is : (message, (sender_ip, sender_port)) 2. Use Types 

removed print statement 

1. Unconditionally reinsert duplicated request. 2. Better debug output files path. 

fixed bugs detected by lint 

Replace request by new request if it has the same id. The idea is: If new mesasage has the same id as the message that is already in the message queue, this means that it is a repeated message and sender expects reply to this last repeated message - not to the original one. Hence the original message has to be replaced by the repeated. In addition to this repeated message is reinserted into the list of messages closer to the beginning, allowing it to get picked up earlier. This modification proved a drastic improvement in communication between encp clients and library manager. 

better message id 

Drop messages with the same id (repeated messages). 

more code for event_relay messages 

1. Some message processing was moved out of _get_raw_message to rawUDP:put 2. Some special processing was added for mover messages: Remove old mover message from the queue if the newer arrives from the same mover. This eliminates the lagging of mover messages. 

========== put.py ====================================================================================

Same change made to get.py revision 1.138. See bugzilla 337. This is from the encp bug where encp.py would return the correct exit status, but frozen encps would always return success. 

========== volume_assert.py ====================================================================================

This patch is in response to bugzilla #392. Volume assert now has more patience when submitting requests to the LM. Also, if a request is not successfully made, handle the situation better. 

========== enstore_make_generated_page.py ====================================================================================

typo fix : Weekely -> Weekly (http://www-ccf.fnal.gov/Bugzilla/show_bug.cgi?id=444) 

========== enstore_display.py ====================================================================================

Sasha reported a bug. The issue is that the state change message was not received, a transfer message was received and when entv went to update the new instantaneous rate it ws failing because the state was not ACTIVE. 

Some of the interactive features were broken with the last patch. They are working now. 

1) Catch all exceptions while a thread has acquired a lock. 2) If the display thread hangs waiting for X, which has been observed using gdb, then re-exec() the process. 3) Instead of re-exec()ing when the number of objects increases, only re-exec() if more than 50% of the total system memory is consumed by the entv process. 

Instead of using images for the active and positioning icons, draw them instead. 

========== configuration_server.py ====================================================================================

Changes made for bugzilla #367 comment #16. New function __get_config_value(). _get_domains() handles if the 'domains' section of the configuration is not a dictionary. Some comments are corrected to match the code. 

revert recent changes 

Various patches to bring the servers into alignment with dispatching_worker.py 1.189 and upd_server.py 1.56. 

Set default do_copies to 1. This is for copy.copy() to be used instead of a copy.deepcopy() or a direct reference to configdict. 

The previous patch introduced a bug where dump2() would still work, but dump() failed with "Message too long". 

Improved the speed of some functions by modifying how they tried to access the configdict. Added some locks for thread safety. Added support to adjust the internal copy level of the configdict on the fly using the "enstore conf --copy 0|1|2" command. 

Work done to improve the response times of lookup(), dump() and dump2(). Some caching is involved of these responses. 

For dump() and dump2() don't supply a thread name. Allow the total maximum threads per Enstore processes imposed by dispatching_worker. 

This is to hopefully address the issues in bugzilla 403. The main thing for speeding it up is that _get_system_name() caches its return value. Other thread syncronization changes have also been done, since there have been errors. 

These patches are related to getting the configuration server switched to using dispatching_worker's new send_reply_with_long_answer() function. Backward compatiblity with old clients and servers is still there. 

Use the new dispatching_worker.send_reply() function. 

========== library_manager_client.py ====================================================================================

Fixed bug on line 473 

moverlock state added. 

========== Trace.py ====================================================================================

The locks have been commented out. 

Added locks to prevent one thread from starting to print a message, get interupted by another thread printing a differnet message and then the rest of the first message is printed. Only one should happend at a time now. 

Code review followup changes. bigzilla reference ticket 378 

Do not truncate message in trace(), when it is sent to stdout. 

Output the time in default_log_func(). Bugzilla #374. 

Removed most (but not quite all) traces of string exceptions. 

========== volume_clerk.py ====================================================================================

Moved some common for library_manager.py and volume_clerk.py constants to enstore_constants.py Moved hack() to volume_family.py and renamed it to match_volume_families() This was done as followup on library_manager.py code review for LM scalability, bugzilla ticket 435 

Replace lines using e_errors.FILE_CLERK_ERROR with e_errors.VOLUME_CLERK_ERROR. This is due to comments from Dmitry in Bugzilla #394. 

revert recent changes 

Various patches to bring the servers into alignment with dispatching_worker.py 1.189 and upd_server.py 1.56. 

Added interface functions, to support migration working through volume clerk: list_migrated_files() list_duplicated_files() get_migration_history() set_migration_history() set_migration_history_closed() Support functions added: _migration_history() 

These changes have these Enstore servers using dispatching_worker.send_reply_with_long_answer() instead of their local copy of this function. Also, the commented out duplicated code has been removed too. 

update modification time on volume touch 

removed stupid and misleading print from set_remaining_bytes call 

========== entv.py ====================================================================================

1) Catch all exceptions while a thread has acquired a lock. 2) If the display thread hangs waiting for X, which has been observed using gdb, then re-exec() the process. 3) Instead of re-exec()ing when the number of objects increases, only re-exec() if more than 50% of the total system memory is consumed by the entv process. 

Fixed the --generate-messages-file switch. 

Converted udp_client.UDPError and callback.TCPError to be replaced by e_errors.EnstoreError. 

Handle an error where the current systems 'known_config_hosts' and the target systems name for itself in its own 'known_config_hosts section are not the same. 

========== encp_wrapper.py ====================================================================================

Added error message to catch intermitant problem of missing error message from encp. 

Access the encp error message value in a thread safe way. 

1) Accept the encp command as a list of argv values instead of as a string. Spaces in filenames caused the old implimentation to fail. 2) Set the effective UID and GID back to root after the encp. 

========== udp_common.py ====================================================================================

changed one Trace call 

Added agrguments for modified en_enal call 

========== enstore_functions.py ====================================================================================

When we have an IP address, it is correct to use socket.gethostbyaddr() instead of gethostbyname[_ex](), since we have an IP address and not a hostname. This is for get_enstore_tmp_dir(). 

Modified get_enstore_tmp_dir() to compare with all the IP addresses for the node, not just the default hostname. The consequence of this was that it was trying to contact the configuration server when it should have looked at the local conf file and was causing a long delay. 

========== rawUDP_p.py ====================================================================================

Changes driven by pychecker. 

Code review followup (bugzilla ticket 384) removed enable_print_queue 

Code review followup changes. (bugzilla ticket 384). 

1. Added fuctions to control rawUDP 1.1. enable_raw_queue_print() - for debugging 1.2. disable_reshuffle() - when reinserting ticket into incoming queue do not change thge original place in the queue - this done for better processing of mover requests 1.3. set_keyword() - address messages in the queue by specified keyword instead of message id - this is for mover requests. Keyword: "mover" 

Modifications after code inspection. 1. Changed a raw message format. Not it is : (message, (sender_ip, sender_port)) 2. Use Types 

1. Unconditionally reinsert duplicated request. 2. Better debug output files path. 

debug output file path is the same as for the server 

fixed bugs detected by lint 

fixed bugs detected by lint 

Replace request by new request if it has the same id. The idea is: If new mesasage has the same id as the message that is already in the message queue, this means that it is a repeated message and sender expects reply to this last repeated message - not to the original one. Hence the original message has to be replaced by the repeated. In addition to this repeated message is reinserted into the list of messages closer to the beginning, allowing it to get picked up earlier. This modification proved a drastic improvement in communication between encp clients and library manager. 

added debug print, better message id 

use multiprocessing.Manager to create and maintain shared resources 

more code for event_relay messages 

bugs fixed: queue_size is now correct 

Some message processing was moved out of _get_raw_message to rawUDP.put 

========== media_changer.py ====================================================================================

Add in a select() of the pipe from the rsh process in STK_MediaLoader.timed_command(). This should allow for timing out of the process if the rsh doesn't close the its side of the pipe. Previously, the process would block in read(), and if the timeout expired, the process would stay blocked if the rsh didn't close the pipe. (Bugzilla #455.) 

revert recent changes 

Various patches to bring the servers into alignment with dispatching_worker.py 1.189 and upd_server.py 1.56. 

Return the location information for STK robots for the --show-volume command. 

For STK media_changer in listSlots(), when converting strings to integers, only one conversion was catching TypeError and ValueError. Most were just catching TypeError. If a value error occured (when instead of the expected integer value the MC got something like "Volume VOG123 ejected" instead) the request was not getting removed from the work_query_list and eventually would result in a denial-of-service state once the queue was full of old/failed requests. 

Define --eject and --insert to be no-ops, with an error, for STK, IBM and MTX media_changers. 

========== enstore_stop.py ====================================================================================

Fixed enstore_start.this_host() to report all hostname and IP addresses for the node. The use_alias variables are no longer needed since all hostname and IP information is used every time. 

Converted udp_client.UDPError and callback.TCPError to be replaced by e_errors.EnstoreError. 

Removed most (but not quite all) traces of string exceptions. 

========== duplicate.py ====================================================================================

Switched "yes" to migrate.YES from Sasha's comments in bugzilla 418. 

Compatibility changes with migrate.py 1.202. 

The migrate.py version of is_expected_volume() now takes a db argument. Even though this version doesn't use db, the argument list was modified to remain compatible. 

1) Allow for the duplication of a duplicate. 2) Allow for make additional duplicates (i.e. _copy_2) if _copy_1 already exists). 3) Make --make-failed-copies work. 

For migration and duplication: 1) Fixed migrating deleted files. For duplication: 1) Honor --use-volume-assert for scanning. This involved reworking the code so duplicate.py used final_scan_volume() and final_scan_file() from migrate.py instead of its own (obsolete) duplicate.py versions. For Migration: 1) Prevent migrate.py --restore from working on duplicated files. 

Enable --force to work on supposidly completed destination duplicated volumes. Also, enable --scan-vol to work when the source and destination files have already been swapped. 

Fixed a bug where err_msg could be used before being set while 'swapping' metadata. 

========== info_client.py ====================================================================================

The commands --find-original, --find-the-original, --find-duplicates, --find-all-copies and --find-copies commands are now available to users through the info server. Admins can now use them using the "enstore file" or "enstore info" commands (though the "enstore file" variants points to the info server). In addition to this the enstore info --show-copies now works like it was supposed to. 

made indend 4 spaces to be consistent with the rest of the code 

fix bugzilla http://www-ccf.fnal.gov/Bugzilla/show_bug.cgi?id=437 print modification_time in enstore info -gvol ... in human readable format 

Fixed typos. long_answer should be long_reply. 

Use the new generic_client.send() long_reply argument for those functions that do need to obtain reponses with more information than UDP can handle. 

These changes have these Enstore servers using dispatching_worker.send_reply_with_long_answer() instead of their local copy of this function. Also, the commented out duplicated code has been removed too. 

file_clerk - minor printout change info_server, info_client: noticed that command like "enstore info --show-file CDMS115209320400002" do not work Fixed. 

========== alarm_server.py ====================================================================================

revert recent changes 

Various patches to bring the servers into alignment with dispatching_worker.py 1.189 and upd_server.py 1.56. 

========== operation.py ====================================================================================

Changed tab flipping output CAP for SL8500 at GCC to 0,5,0 (was 0,1,0), as per changes discussed at 10:30 Fri Nov 6 status meeting and recorded in elog http://ccfsrv2.fnal.gov:8181/Tapes+Log/7168 . 

========== option.py ====================================================================================

Added --scan as a more generic switch to replace migrate.py's --scan-volumes switch. 

Added --debug for migration. 

Get --eject and --insert working for media_changer_client. Added --ioarea and --remove for media_changer_client. 

========== net_driver.py ====================================================================================

Changed receive (select) timeout from 5 to 1 min. This should be enough to receive a block of the data from network. 

========== edb.py ====================================================================================

fix syntax 

1) fix pool instantiatin call 2) fix run_in_thread call 

call tape_list3 function in separate thread 

========== enstore_utils_cgi.py ====================================================================================

remove dependency on regex and regex_syntax 

========== atomic.py ====================================================================================

Added a flags argument to atomic.open2() to match that of the os.open() function. Modified file_utils.py, pnfs.py and enmv.py to use the new format. 

========== cleanUDP.py ====================================================================================

Removed Trace.handle_error() calls. Now that dispatching_worker and generic_client can handle long messages, these errors need to be passed up to those layers so that they can do the correct thing. 

removed debuggging print statement 

Fixed occurences of msg.errno when msg has no errno attribute. 

Removed most (but not quite all) traces of string exceptions. 

========== generic_client.py ====================================================================================

Converted udp_client.UDPError and callback.TCPError to be replaced by e_errors.EnstoreError. 

Catch TypeError exception. Without this the code runs into string exception when config server has no requested entry 

Removed most (but not quite all) traces of string exceptions. 

Fixed the recent change to have BAD STATUS go to stderr. Also, moved the exception catches of errno.errorcode[errno.ETIMEDOUT] to be the last exception tried. 

Send the check_ticket() BAD STATUS message to standard error. 

Support the new --print switch for the configuration client. 

Catch sys.stderr.write() errors. 

For the situation where the config server is not running, a better error message is not provided. 

Attempt to return the name of the server when a request times out. Errors should now look like (example shone for file clerk): ticket['status'] = (e_errors.TIMEDOUT, enstore_constants.FILE_CLERK) instead of just ticket['status'] = (e_errors.TIMEDOUT, None) 

Re-raise KeyboardInterrupt and SystemExit exceptions from udp_client.send() in generic_client.send(). 

Removed a call to os._exit() in get_server_address(). Now it returns None. 

Added support for the csc to subscribe to the event relay for messages; when told to (by default it does not). The servers do this anyway, but this is new functionality for clients (ie. encp, entv). Clients need to call the csc.new_config_object.enable_caching() function to turn on this functionality. 

These changes give encp/get a usable --check option. Most of the changes are for allowing encp/get to turn off the logging of messages (without having explicit if statements throughout the code). Others are simple cleanup changes (from pychecker). 

Cleaned up some of the most common pychecker warnings. 

exit wit 1 not -1 

This is another attempt at fixing the generic_client resource leak problems. There is also a modification to change a print statement to a sys.stderr.write() call. 

use timeouts properly 

Second half of previous entry. 

Second attempt at removing the cyclic reference if the generic client is also a configuration client. 

back out 

Removed a resource leak. If the generic_client was also a configuration client, a cyclic reference was created causing the reference leak. 

Mulitple client changes for support of improved start/stop. Mostly, theses changes have to do with timeouts of various functions. One notable change is that the monitor_server now looks for "monitor_server" in the config file instead of just "monitor". 

These modifications are in support of the new enstore_start and enstore_stop. Mostly having to do with the event relay dealing with 'alive' and 'quit' messages. 

move getting udp_client to generic_client 

For --alive requests, if an error occurs contacting the configuration server return that error and not the bogus error returned by continuing. 

The user mode (ADMIN vs USER) is now passed correctly from enstore.py to the client python files. 

Changes made so that bfid brands are used better when reading. The most important change is that there are now timeouts in the queries to the file clerk about its brand. Otherwise, it could get stuck waiting for the wrong file clerk. 

By agreement the volume and file clerks --alive commands do not print anything. This change makes that happen. 

These files have been moved to the new interface code. I'm sure I am breaking a lot of things... 

make pychecker happy 

errorcode -> errno.errorcode (typo) 

========== en_eval.py ====================================================================================

Changes after code review 1. Modified function patterm 2. Use Types 3. A bit more optimal code 

1. Additional arguments in en_eval check=True -- check for the presense of the function in expression. when rawUDP is used there is no reason to check incomong message 2 times: int rawUDP.put and udp_server.get_message compile=False use complier to check for the presense of the function in expression. Using compiler is very time consuming operation and anyways it is deprecated. If set to False (default) - use re.search for a function pattern this is about 20 times faster comparing to compiler 

Do not reraise NameError exception. Just return the value and let others to take care of this. This is related to event_relay messaging that has it own message format. 

========== migrate.py ====================================================================================

Include recomendations from review of bugzilla #418. Expanded comments in show_status() and better error message in restore() for an impossible situation that should never occur. 

In get_file_info() and get_volume_info() set the status field when accessing the DB directly. See bugzilla #427. 

1) Added a seperate deleted queue to seperate active from deleted files. These two types of tapes go to different tapes, so we don't want one type waiting on the mount/dismount of the other. 2) Moving toward using the clerks or using the DB directly. The USE_CLERKS constant near the beginning of the file controls which to use. Currently it is set to false. 3) Inside pnfs_find() added __find_pnfsid_path(). PNFS will from time to time report ENOENT for files that really do exist. The loops a few times to see if the answer changes. (bugzilla #390) 4) When migrating a backup file of the Migration PNFS database, don't fail the migration because the basename contains "Migration". (bugzilla #410) 

Patch for bugzilla #370. In pnfs_find() there was one spot where the lock was not being released before the exception was raised. 

Moved a Trace.handle_error() call in pnfs_find(). Both the source and destination (if copied already) get checked, the error logging was happening after only the first was checked. When reading/scanning if an error occurs a check was added to see if the tape is NOACCESS or NOTALLOWED. If so, reading of additional files is stopped. Files already read to disk should be allowed to be written to tape. 

Added get_file_info() and get_volume_info(). They aren't used anywhere (yet), but they should prove to be useful in the future. 

1) Detect and fix files marked as deleted in the Enstore DB that exist in PNFS. 2) Replaced --scan-volumes with --scan. Now a destination BFID can be give instead of just destination volumes. 3) Fixed the scanning of a multiple copy file to scan the multiple copy instead of the original copy. 

1) Corrected an ordering issue with --status and multiple copies. 2) The proceed_number value is honored again. 3) Checks if the deletion lists are not empty after an encp returns. Reports an error if they are not empty and clears them before continuing. 

Added a return when writing to tape that indicates the write attempt failed due to a non-retriable error. Also, moved the return on one of the returns in the same function, write_file(), to the right one column where it belongs. 

If migrating a delete file where the original directory no longer existed; an error was occuring. The exeception was IOError; while only OSError was being caught. Added IOError to that except list in use_libraries() to fix it. 

Added code to detect when the migration path points to a ghost file on a re-run of the migration. 

When removing the output file before retrying the encp write, if the error remove() returns is ENOENT treat it as a success. 

Hopefully this patch will address bug #310. This issue is with makedirs() failing in PNFS, because it is succeeding to make a directory. 

Removed debugging output. 

Removed some debugging output. 

1) Handle migrating a file to multiple tapes using encp's multiple copy functionality. 2) Handle migrating a tape filled with multiple copy files. 3) Fixed a condition where the file was written to the new tape, but not swapped. A re-run of the migration of that file continued to fail because the temporary file in /pnfs/fs/usr/Migration had been deleted. 4) Updated the --status output to include 'O' and 'M' for original and multiple copy, respectively, in the S column. 

Fixed a bug were the migration ignores extra libraries passed on the command line using --libraries. 

Use some code from scanfiles.py to better handle joining threads. 

Coordinate errors from encp to migration better. If encp returns an exit status of 2 the migration should not retry the encp. (This does the same thing that get and sdsscp did for the SDSS migration.) 

Patch the case were a deleted file is migrated to multiple copies. The issue was in the use of pnfs library information found in the tags versus the use of library information obtained from the user using --library. 

Some multiple copy files/tapes had migrations attempted before the check to prevent it from happening was added. This patch fixes --restore to be able to unmigrated a multiple copy file that had such a migration attempt made on it. At some point the code may be modified to support the migration of multiple copy files, but for now it is not allowed. 

1) Allow for the duplication of a duplicate. 2) Allow for make additional duplicates (i.e. _copy_2) if _copy_1 already exists). 3) Make --make-failed-copies work. 

When writing, set the delayed dismount to 2 minutes for each multiple copy to be written. This is to avoid unecessary bouncing of tapes in and out of drives. 

Handle the rare situation where a deleted file now shares the same as as a directory. The remove() fails, but since the file type is wrong, we can conclude that it should not fail the scan. 

Accidentally left using volume assert on as the default. Now off by default. 

1) Moved set euid/egid functionality to file_utils.py. 2) Fixed a bug that would cause a thread to exit early, but not be joined or report any errors. Any future unexpected errors like this will now be logged too. 3) Fixed a queueing bug that was the root cause of #2. This should solve the infamous "hanging" problem. 4) Fixed being able to Ctrl-C a migration process. 

Resolved a number of deadlocks. 

Patch to fix --scan-vol after the last patch. 

Modified to be able to keep multiple encp requests going at once to keep the LM queue full. 

Fixes a number of issues with respect to multi-threaded/multi-process migration. (There still is a deadlock situation, so this is currently disabled.) Patch to read files with a space in their pathname. 

========== enstore_start.py ====================================================================================

When we have an IP address, it is correct to use socket.gethostbyaddr() instead of gethostbyname[_ex](), since we have an IP address and not a hostname. 

Fixed enstore_start.this_host() to report all hostname and IP addresses for the node. The use_alias variables are no longer needed since all hostname and IP information is used every time. 

fixed syntax error on line 411 

Post code review changes (bugzilla ticket 388). modified command on line 411 

Post code review changes (bugzilla ticket 388). 1. Changed output: "Will execute:", cmd_list 2. Modified commands to exclude "enstore start", "enstore stop", "enstore restart" 

For multi-homed Enstore nodes, all IP addresses need to be checked, not just the default IP address. 

Removed some debug outputs. Removed some commented lines. 

1. Better expression for checking if the componets to be started is not already running 

on start: if there is no response to alive, check with EPS before starting 

Converted udp_client.UDPError and callback.TCPError to be replaced by e_errors.EnstoreError. 

Replaced popen2.Popen3 with subprocess.Popen and pipeoblect.communicate and fixed bugs. 

import subrocess 

import subrocess 

popen2 is deprecated in last python releases. Replaced with subprocess 

Removed most (but not quite all) traces of string exceptions. 

========== aci.py ====================================================================================

Get eject() and insert() working. The AML/2 is going away soon, but at least the media_changer_client.py has been tested. 

========== e_errors.py ====================================================================================

Instead of having the python version exactly match (2, 6) it must be greater than or equal to (2, 6). Also, fixed the EnstoreErrors string representation to be EnstoreError instead of EncpError. 

========== enstore.py ====================================================================================

Converted udp_client.UDPError and callback.TCPError to be replaced by e_errors.EnstoreError. 

Removed most (but not quite all) traces of string exceptions. 

========== enmv.py ====================================================================================

Added a flags argument to atomic.open2() to match that of the os.open() function. Modified file_utils.py, pnfs.py and enmv.py to use the new format. 

========== aml2.py ====================================================================================

Get eject() and insert() working. The AML/2 is going away soon, but at least the media_changer_client.py has been tested. 

========== accounting.py ====================================================================================

added standard header 

take into account Mike's commens in bugzilla ticket 479 

fix issue with IndexError reported by Mike 

========== dispatching_worker.py ====================================================================================

revert recent changes 

Replaced python 2.6 specific threading.current_thread() with python 2.4 compatible threading.currentThread(). 

udp_server.py: 1) Eliminated self.reply_address, self.current_id and self.client_number since they are not thread safe. 2) Added reply_to_caller2(). Differs from reply_to_caller() by taking two arguments, the first is the object to send, the second is a dictionary with the 'r_a' element. 3) Added a self.tsd (Thread Safe Data) member variable. Created the init_thread_specific_data() function to handle the initializing of the thread specific data. dispatching_worker.py: 1) Eliminated use of self.reply_address and other self.xxx member varialbles, since they are not threadsafe. 2) Updated invoke_function() to handle starting a function in another thread/process if the function name is in the self.run_in_parallel list. The default is to run it in the main thread. 3) Extend self.tsd.is_child to include spawned threads. 4) Added __getattr__() and __setattr__() to handle looking at self.xxx or self.tsd.xxx. 5) Removed dispatching_worker.run_in_thread(). dispatching_worker.DispatchingWorker.run_in_thread should be used instead. 

Moved the function processing logging/tracing time code to __invoke_function(). This will allow it to be accurate for all functions run in parallel, instead of reporting the time to create a new thread/process. Since the code is in test mode, the ability to run a function in thread or process has been added. At this time only the configuration server optionally uses this new feature. 

Limit the number of threads for the Enstore processes, when thread_name is None. If thread_name is given, then allow only one thread. 

revert back from Trace.log to Trace.trace in process_request 

replaced Trace.trace(5,...) with Trace.log(e_errors.INFO) 

Modified send_reply_with_long_answer_part1() to resend the udp reply every 5 seconds while waiting for the client to connect over UDP. 

make sure argument is tuple 

bug fix, use apply(function,args) 

use thread_wrapper for function invocation (needed to call after function) 

followed up on our e-mail exchange this morning - added function invoke_functon that can be overriden by subclasses. Modified file_clerk accordingly 

Patched generic_client and dispatching_worker to extend the client/server protocol to handle messages that are too long for UDP. The send() function in generic_client.py was modified and so was dispatching_worker.send_reply(). The function callback.connect_to_callback() handles most of the connection issues to establish the socket connection. This is for the opposite side of the already existing callback.get_callback() function. The connect_to_callback() function is used by generic_client.send(). In dispatching_worker.py, send_reply() may call the new function send_reply_with_long_answer() if reply_to_caller() fails becuase the reply message is too long. 

log error if thread fails to start 

code review changes 

removed confusing log lessage 

put get_fd_message into try --- except wrapper 

renamed run_in_thread to _run_in_thread to hide it from subclasses 

If dispatching worker is configured to use raw input it can run callback messages processing in a separate thread (event relay messages). It is enabled in raw mode. If there are multiple instances of we need only one callback messages processing thread. To disable spawnig this thread use disable_callback This use 

If using rwaUDP rawUDP.receiver starts in serve_forever method. This is done to provide spawning receiver thread (process) in a thread. Before it was done when UDPServer onbject was created (in main thread) 

define request in do_one_request 

more code for event_relay messages 

========== encp_user2.py ====================================================================================

Major bug 147 addressed. encp.py revision 1.889 introduced a defect that only effected encp when encp_admin.py, encp_user.py or encp_user2.py were used to make a frozen version. The problem was that encp would always return 0, even for failures. 

========== volume_family.py ====================================================================================

Added a comment per code review for ticket 435 

Moved hack() to volume_family.py and renamed it to match_volume_families() This was done as followup on library_manager.py code review for LM scalability, bugzilla ticket 435 

========== encp.py ====================================================================================

Modified the --copy switch help string have "(0 = primary)" instead of "(0 = original)". 

Added a missing return. Otherwise non-retriable errors trying to connect with the mover go ignored. 

Added additional "Time to" message for adjust_resubmit_request(). Also, Fixed "Atempting" to be "Attempting". 

These changes re-work the the looping of the code. The main change was the addition of wait_for_messages() that can wait for both the LM submision reply and the mover callback. 

Added "Time to" debug log messages for stall_read/write_transfer() functions. Also, upon some network errors, use callback.py's new MAC address finding capability to report additional information. 

Handle switching effective IDs when checking if layers 1 & 4 are emtpy or not. 

Modified encp when writing to add a handle_retries() call. The original error itself (in the known case the pnfs file was removed while encp was still running) was handled correctly, but file_utils.end_euid_egid() was called while not having the euid_lock acquired. 

Modified clients() so that volume_assert can use it without throwing tracebacks. 

Modified to support the encp regression testing using pnfs_agent in addition to a directly mounted pnfs mount point. 

Handle OSError tracebacks from file_utils.match_euid_egid() in read_hsm_file() and write_hsm_file(). 

Fixed bug introduced with 1.909 where submit_one_request_send() returns a different number of objects. 

More fixes to get encp to work with untrusted pnfs clients as user root. 

Added a debug log comment to better understand the "Noticed the local file changed" errors. 

Address some issues with testing if we have the permisions and setting the owner when writing from dcache instead of like normal. 

Fixed the ownership of file creation when running as root. Now, the file's temporary ownership os that of the owner of the directory that the file will go into. Then as part as set_outfile_permissions() if the real UID is root's then the ownership is set to that of the input file. 

Fixed bug introduced in encp.py 1.912. 

Added match_euid_egid() to file_utils.py. This is now used by encp.py, delete_at_exit.py and migrate.py to allow root to access pnfs on a non-trusted pnfs file system. 

bumping version to v3_7d because of encpCut 

Allow for encp to detect that uc=1: and c=1: are different in layer 2. 

Corrected an issue with encp considering zero and one seeded alder32 values inside of inputfile_check_pnfs(). If the site was already using 1 seeded values then converting it to the false 1 seeded value for comparision was wrong. Now it considers both. 

Fixed a bug when writing where handle_retries() was passed the entire write request list. It should only be given the one that is being tried at that time. (Bug #147) 

Modified submit_one_request(). handle_retries() now uses the new function resubmit_one_request(). submit_one_request() now composed of submit_one_request_send() and submit_one_request_recv(). Some return statements in read_from_hsm() and write_to_hsm() were changed to breaks. The returns prevented calculate_final_statistics() from getting called, which means some error messages were not sent to the log server. 

Only consider adler32 checksums in layer 2. These have c=1 (c equals one). Values other than one are now possible and need to be ingored by encp. 

bumping version to v3_7c because of encpCut 

Skip the verify_write_request_consistancy() call at the beginning of the encp for volume or migration/duplication requests for performance reasons. (Reads have already been doing this.) 

Fixed two issues. First, --volume now uses find_pnfs_file.find_pnfsid_path() to obtain the correct path, not just try what is in the file DB. Second, string TCP_EXCEPTIONs have been moved to seperate except lines since string exceptions are depricated in python 2.6. 

Added additional "Time to" messages that go to the debug log file. 

Previously, if a media error occured handle_retries() would attempt to fail over to any multiple copy, if available. However, fcc.bfid_info() and vcc.inquire_vol() were used directly instead of the get_clerks_info() wrapper function; get_clerks_info() inserts the address fields in the tickets. Obviously, get_clerks_info() is used now. (Bug #106) 

Encp will now use encp_port from the library's configuration for communicating with a library manager. If encp_port is not defined, then the normal port value from the configuration is used. 

Fixed a bug in create_zero_length_pnfs_files() where an IOError was not caught, but OSErrors are. Obviously, IOErrors are now caught too. 

Fixed the help. The parameters for admin and user2/dcache modes show correct usage. This is the inclusion of --get-bfid, --get-cache and --put-cache. 

Commented out the bin() function. Renamed use of variables format and bytes to other names; format and bytes are builtins in python 2.6. 

More refactoring to remove unnecessary PNFS accesses. 

Refactored verify_read_request_consistancy() and verify_write_request_consistancy() to decrease the number of pnfs queries that are performed. 

Added socket.error to the list of exceptions to catch in stall_write_transfer() and stall_read_transfer(). 

ticket['infile'] and ticket['outfile'] whenever they point to a pnfs file, will contain the .(access)() pathname, while the new keys ['infilepath'] and ['outfilepath'] will contain the normal pathname. 

Fixed some spelling errors. posistion => position and resonce => response 

set deafult return value in is_pnfs_local_path 

Added isdir(), isfile() and islink() as wrappers around get_stat(). Also, use Pnfs().get_stat() (this Pnfs is from module encp) now that it won't try the directory if the target doesn't exist consistantly between pnfs.py and pnfs_agent_client.py. 

Fixed encp working with the pnfs_agent. 

Support passing any error messages up to the migration. 

Modify do_work() so that it can be used from encp_wrapper.py instead of main(). 

bumping version to v3_7b because of encpCut 

Handle non-retirable errors returned by the mover correctly to stop trying to continue to transfer files. The known issue was when a volume had its wrapper set incorrectly, causing the mover to become confused, which in turn it did not help that encp didn't stop with the retries. 

The sequential filenames used by get have changed from <location_cookie> to <volume>:<location_cookie>. 

Fixed the errors returned when writing and the givin output path is a regular file. Previously, the input file was wrongly listed, now the output directory is correctly reported. 

This patch allows for encp to handle errors returned from the LM when submitting requests. It was possible for a resubmited request to not have the completion_status set to FAILER when a non-retriable error occured. 

Added more timing diagnostics to open_control_socket(). 

Bug fix in verify_file_size() when --override-deleted is used to read a deleted file. p.get_stat() was used, but it has a side effect to return the stats of the directory when the target file does not exist. Now, os.stat() is used directly. 

Fix a bug that causes encp on both reads and writes to exit early after a retriable error. This bug was introduced when finish_request() was started to be used by encp, get and put. 

Handle a possible tracback in handle_retries(). If the mover closes the control socket, getsockopt() raises an exception that previously was not caught. Also, adjusted the if statement for detecting when to read from standard in; the cron environment makes standard in a pipe, which confused encp. Encp now checks if input files are on the command line. If they are there, then the listed files are used. 

Comment out the ability for writes to tape to have standard in as there source. This new functionality was broken for writes running in cronjobs. 

Fixed --check. It would check if the LM was ready, but would still continue with the transfer instead of quiting. 

Cleanup code. Use constants for Trace.message() calls mostly. 

Added support for reading the input from standard in. It is supported on systems that have the /dev/fd/ file system. 

Cleaned up the get and encp code. This made for an easier creation of put.py. 

More scrubing between encp.py and get.py. Also, started work on the writing parts for the future put command. 

Modified encp and get to reduce the amount of duplicate code the two have. 

Minor code cleanup between encp.py and get. Some get specific things were removed from encp.py (and moved to get.py). 

Just some code cleanup. Nothing functional changed. 

1) Use enstore_functions3 module functions instead of local ones. 2) Modified verify_read_request_consistancy() to include checking the CRC and size in layer 2 *before* doing the transfer. Previously, it was only checked *after* the transfer which wasted resources if there was a mismatch. 

Added more debug logging for each seperate CRC comparison/check. Previously, only one was done that included all the various CRC checks. 

Include a way for processes like encp to state the logging of thread names via their Interface class. 

Send encp timing information to the debug log. 

bumping version to v3_7 because of encpCut 

Allow FQDN in the disk volume labels. For charset, hostnamecharset is now defined. 

On Solaris 10 /tmp is a swap partition. os.pathconf(PC_FILESIZEBITS) returns -1 instead of the number of bits. In this case use 32 for the number of bits that can store the size of a file. 

Include the user_level (ADMIN, USER or USER2) in the tickets for possible future use. 

Fixed the bug in encp that was preventing the RESUBMITS count from being incremented correctly. 

When --get-bfid and --override-deleted are test filename to be longer than 0. 

When sending an original request (with more copies to follow) update the work_ticket to include the number of copies still to come. 

Modified the "encp aborted from" output to include more info. 

The patch fixes a bug if --get-bfid matches to to many files for the pnfsid. It uses the bfid in layer 1 to determine which one it really wants. 

Use getattr(errno, 'EFSCORRUPTED', errno.EIO) instead of errno.EFSCORRUPTED to avoid pychecker warnings. Added a check in librarysize_check() to check the result of the returned library info from the config server. Currently, goes stait into pulling out data, when the error saying the library does not exist is ignored. 

Report a more accurate "Trouble with pnfs" error message in set_pnfs_settings. 

Corrected the /etc/mnttab filename for SunOS. Was previously /etc/mntab, which is the wrong name. Also, corrected the Trace.log() line that is supposed to output this error. 

Fixed a bug regarding errno module. It should have been errno.EIO and not errno["EIO"]. 

bumping version to v3_6i because of encpCut 

bumping version to v3_6h because of encpCut 

Added support for "encp --copy N" where N is the number of extra copies to make of the file. Also, included is a regression test. 

Fix encp.py for "get" to work correctly if --sequential-filenames is used. 

Support handling 0 or 1 seeded adler32 CRC values instead of just 0 seeded adler32 values. 

Fixed some bug that the regression testing found with the previous commit. 

Better dealing with metadata when a single machine mounts multiple pnfs servers. This goes for both of encp when reading and for enstore pnfs --path. 

Fix the anoying bug that causes sdsscp/get to create new copies of files that have already been read and their metadata created. 

bumping version to v3_6g because of encpCut 

Address the error handling when encp finds just whitespace located in pnfs layers. It didn't help that encp would set layers to a single space in clear_layers_1_and_4() (also fixed). 

bumping version to v3_6f because of encpCut 

Change --file-family-wrapper from and admin option to a user2/dcache option. 

Log the exception if it occurs in __is_pnfs_local_path(). This should give a clue to what was the real cause the next time it happens. Patched get_volume_clerk_info() to handle a None value for the returned vc_ticket. 

Fix a get specific issue related to the create_read_requests() function split into create_read_requests() and create_read_request(). 

Make the changes for encp to use the new alarm server functionality to send e-mail based on storage groups. 

Fixed a spelling error: uninque =? unique. 

Catch sys.stderr.write() errors. 

Fixed a pnfs_agent related bug. If encp was told to only use the pnfs_agent for PNFS access, then encp was re-throwing the OSError "Force use of pnfs_agent". This re-raise would cause a traceback. 

Do the same for create_write_requests() that was done for create_read_requests(). There are now create_write_requests() and create_write_request() functions. This is to provide better error reporting. 

Split create_read_requests() into to functions. The new function name is create_read_request(). This is to facilitate better error messages. 

If an exception occurs sending an error to the accounting server, don't worry about it. Just log the error and move on. Also, removed some code from create_read_requests() when reading layer 1. This functionality was moved to pnfs.py. 

Fixed a bug if the input file is non-existent in a non-pnfs filesystem. Previously an incorrect error message was given. Now the correct one stating that the file does not exist is given. 

Fixed is_pnfs_path() to honor REMOTE_ENCP. This was done by using __is_pnfs_remote_path() instead of doing the same (incorrectly) thing inline. 

Fixed a bug when reading a deleted file and the user used --override-deleted. The problem files were deleted files that had valid 'pnfs_name0' entires in the Enstore DB. encp was trying to stat() these files and failing the transfer over it. 

Fix "get" to work with the new udp_server.py changes. 

bumping version to v3_6d because of encpCut 

Cleanup of the HSM vs. RHSM file handling. 

Protect calls to get_pac() if the pnfs_agent should not be used. This should avoid future false 'pnfs_agent' configuration server errors. 

Yet another modification to get_stat(). This one is for it to better take into account the --pnfs-is-automounted switch. 

Modified get_stat() to handle intermitent pnfs errors better. This might be new with Linux 2.6, but the EIO errno value can be returned (in addition to or replace ENOENT?). Also, Added a check for the environmental variable REMOTE_ENCP to avoid yet another way to get the 'pnfs_agent' CONFIG error. 

Fix a bug where specifying the wrong inputname when reading was resulting in the ".(use)(1)()" file being returned instead of the actuall filename. 

bumping version to v3_6c because of encpCut 

This should allow for encp to ignore bogus callbacks. This is in response to the security team doing 65,535 port scans. Their scans find encp waiting for a mover to callback and connect. Since the scan does not send what encp is looking for it should ignore the connection. It previously was doing that, but doing so by doing a full retry. Now it goes back to waiting for another connection on the listening socket. 

Fix using --get-bfid and --override-deleted switches together. This was a recently introduced bug. Also, catch a situation in handle_retries() to aviod going into an infinit loop when we don't know yet what request attempt failed (aka TCP_EXCEPTION error). 

Fixed one more location where the: Got error while trying to obtain configuration: ('KEYERROR', "Configuration Server: no such name: 'pnfs_agent'") errors were comming from. 

Fixed a bug in read/write_stall_transfer(). There can be a socket.error raised that wasn't being caught. Now both select.error and socket.error are handled. Also, fixed a bug as to how encp notices if the input file is a directory. Thirdly, fixed a bug that would cause encp to use the wrong tags if the pnfsid contained and "F" because is_access_name() would fail. 

bumping version to v3_6b because of encpCut 

Support the building of a version of encp for dCache. Workaround for the PNFS ghost file problem. Instead of leaving the true filename as a ghost file, we will leave the temporary filename as a ghost file. 

Removed debugging statements. 

Missed a global statement that pychecker found. 

bumping version to v3_6a because of encpCut 

Update encp to allow for regression tests to force encp to use the pnfs agent; even if the specified filesystem is already mounted. 

bumping version to v3_6 because of encpCut 

Tweek the default behaviour when multiple copies are to be written to tape. Now if the tag has multiple libraries; that number of copies are made. --copies is only needed to override the default count. 

Report the os at the start to stdout (if requested) and to the log file. Fix a bug that should allow linux machines to raise alarms for "Filesystem is corrupt" errors. Previously only systems with the EFSCORRUPTED errno would raise an alarm. Removed the write_rhsm_file() function. 

Fix traceback bug involving clear_layers_1_and_4(). 

Reading a file from tape to /dev/null that is bigger than 2GB will fail (at least on linux 2.4). Skip this filesystem test if the output file is: /dev/null, /dev/zero, /dev/random or /dev/urandom. Also, if the input file is /dev/zero, /dev/random or /dev/urandom, then a random number of bytes is transfered. Default bounds are 0 to 2G bytes. ENSTORE_RANDOM_LB and ENSTORE_RANDOM_UB environmental variables can override these default bounds. 

bumping version to v3_5e because of encpCut 

Modification to the multiple copies feature. First, it is now enabled for users. Second, if you specify more copies than libraries the extra copies are ignored. 

Fix using --get-bfid and --override-deleted together. 

Rework how the clearing of layer 1 and layer 4 is done when a failure occurs. This should help fix problems with two competing encps. 

bumping version to v3_5d because of encpCut 

Bug fix for writes. Correctly munge the input file basename if necessary. It was doing it correctly for writes, but not reads. 

Removed some debugging print statements that got left in. 

bumping version to v3_5c because of encpCut 

If the user deleted the entire directory of the pnfs file, don't get confused when trying to re-read the non-existent file-family-width tag. This only applied to writes. 

Removed a debugging print.print() call. Fixed a defect in the NOACCES tape error message creating code (tuple usage bug). Lastly, fixed an error with the "media error automatic failover to duplicate copy" code in handle_retries(). 

Remove a warning about 'pnfs_agent' not being found in the current configuration. 

Fixed a bug in handle_retries. On a resubmit, the request_dictionary only contained the "status: (RESUBMITING, None)" value. This was passed to is_read() that did through a traceback. Now, things are rearanged so that the is_read is called only when there is a full request_dictionary. Added to new switches to encp. --mover-timeout and --resubmit-timeout. These allow the (admin) user to adjust these time values. 

bumping version to v3_5b because of encpCut 

Convert the file_size variable to a long. There is an issue with encp on the 64 bit alphas. 

Added a log message after the file is transfered but before waiting for the final dialog. 

Fixed a bug. Encp was trying to modify one element of a tuple. It now recreates the entire tuple modifying the one element it wanted to change in the first place. 

Multiple copy reads now work. Need to use --get-bfid. Also, fixed EncpError.__init__() to create self.args. 

Some adjustments for the 'new' way of doing multiple copies. 

Removed a nasty bug from improper tuple unpacking. 

Log information that pertains to a recursive loop between handle_retries() and internal_handle_retries(). 

Use the new atomic.py that does not use delete_at_exit. These changes use delete_at_exit directly for what atomic.py used to do. 

Fixed a bug that causes a traceback. verify_file_size() did not pass the filename to encp.Pnfs.get_file_size(). Now it does. 

Modification to determine what really caused a traceback in mover_handshake(). Some information is sent to the log file. 

Log when encp will clear layers 1 and 4. 

Fixed log_encp_start to look for the correct variables in the Interface class. Also, encp will now look at the uid and gid of the output file when doing a dCache write to correctly update the file DB. Otherwise, root.root is put in instead. Lastly, a patch for sdsscp/get (in encp.py) in create_read_requests() so that deleted files can be differentiated from those with partially created metadata. 

Oops. Forgot to uncomment something for testing purposes only. 

When resending a request grab the current file family width from the tag. If the user overrode the value on the command line, stick with the users value. 

Fixed a quoras bug originally reported by John Hendry. If the quota is zero there really is no quota. This fix stops using a zero value as the user having zero quota. 

A few more modifications related to getting encp to use the pnfs agent. 

Cleanup from previous commit (to get pnfs_agent working with encp). 

Merge usage of pnfs.Pnfs and pnfs_agent_client.PnfsAgentClient. The write_to_rshm and read_from_rhsm functions are gone too. 

Log the exiting of encp when the user aborts the transfer. 

This patch is for multiple copies and the munging of bfids. 

Fixed a bug in the previous commit. Moving forward. 

Handle a bug in print_data_access_layer(). If socket.gethostbyname() fails to obtain the host information catch the exception. Also, catch socket.gaierror and socket.herror at another use of gethostbyname_ex() and socket.getfqdn(). 

Made "Filesystem is corrupt" errors alarmable. Encp will fill in the description of a LM request submission NOACCESS/NOTALLOWED error. It will look similar to the message when encp asks the volume clerk directly for the state of the volume. 

Emergency bug fix. Attempt to stop encp from looking up the full name of the pnfs target directory when looking for the tags to create the beginning log message. Instead of just doing this for dCache writes with --shortcut it does this for all dCache writes. Also, removed one pnfs.Pnfs() class instantiation from create_write_requests(). 

remove extraneous print 

implemented write via pnfs_agent. this is first iteration needs a lot of work. But it should not break existing code 

moving forwatd with writes 

introduction of encp reads from remote enstore server pnfs_agent.py and pnfs_agent_client.py get functions from pnfs.Tag class encp.py has new function "read_from_rhsm" and couple of "if"s, new code will not be executed by joe user as it is protected by environment variable "REMOTE_ENCP" 

bumping version to v3_5a because of encpCut 

Replaced a debugging line of code with the real line that should be there. The debuggin line has the literal "/home/zalokar" instead of the variable request['outfile']. Replaced msg.strerror with str(msg) because the latter gives a better error message (complete with the name of the file that had the problem). 

bumping version to v3_5 because of encpCut 

Fixed encp so that the --no-crc switch actually works. 

This change makes sure that two encps don't clobber each other when writing to tape. Theoretically this collision is only possible with dcache writes, but this change addresses the "what if" it happend form normal writes too. 

Fixed a bug with --copies. If --copies was used, there was a problem with the copies failing the newly introduced layer 1 and layer 4 existence. Removed two other debugging print lines that were still in the code. 

Added a check in handle_retries() to see if layer 1 and/or layer 4 was set. This check is activated in two places (for writes only): 1) Just before transfer begins. 2) Just before setting the pnfs (and file db) metadata. 

When an error comes from EXfer close the data socket. Otherwise we run into a situation where the mover is waiting on the data socket and encp is waiting on the control socket. 

Modied encp to use the EXfer module's new quota capability. When a transfer will exeed a users quota the transfer will be aborted. If the transfer will exeed the users soft quota then a warning message will be printed to standard out. 

Added support for the encp option --override-deleted. This will allow a user to use --get-bfid and --override-deleted to read any file on a tape. 

In the check_crc() function, log the mover CRC and the encp CRC. Previously, only errors were reported. This patch is in responce to a Scientific Linux 3.0.3 with XFS using direct i/o bug. When reading a file larger than 4GB using direct i/o after the 4GB point the kernel/filesystem retrieves the wrong bytes. If it wasn't for a check against the CRC dCache/dccp put into layer 2 we would have stored a corrupted file on tape that would have been missed by CRC checks. 

Log the dictionary/ticket passed into is_read() before raising the "Inconsistant file types" exception. This is for debugging purposes. 

Reworked how set_pnfs_settings() works for copy transfers. The layers, file size and permsissions should never be changed when a copy is written. 

Modified encp to be able to handle using .(access)() filenames on dCache writes. This avoids intensive name lookups to pnfs. 

Added a Trace.log() message. In open_control_socket() if a second message is read in this message is logged. 

Fixed the --shortcut option for dcache reads. Modified encp to allow --shortcut to work for writes. Added option --override-path to allow the user to specify a path when --shortcut is used. CV: ------------------------------------------



Catch an EncpError that should not happen in the request dictionary was put together correctly. 

Fixed a bug that prevented the pnfsid to be set in the filedb for copies. 

Added original_bfid to the file clerk subticket. (It should have already been there). Place the copies in the master list of write requests. Before they were stored inside the ticket of the original request. This change was motivated when printing the requests for the original request were being cut off. Fixed a bug that compared the conanical path with a hard coded first 19 characters of the path. 19 works for /pnfs/fnal.gov/usr/ but not in the general case. Now it uses len(conanical_path). 

Moved the copy.deepcopy() call to inside the loop when creating the requests for copies. A traceback was occuring with the copy before the loop becuase the file_family was subticket entry was already removed. 

Fixed a problem at the beginning to recognize when a file is a pnfs or local file w.r.t the check for all three types of paths. The old way had problems with automounting paths not beginning with /pnfs/... Found a few more KEYERROR vs. NO_VOLUME/NO_FILE bugs. The copy numberi, when --copies is used, is relative to this encp. It is not absolute w.r.t. the number of copies of the file in the entire system. Also, the original bfid and original file family are not mangled on the encp side. They will be mangled on the mover side. 

Improved --check to return an exit status of 2 for 'temporary errors'. Also, take advantage of the new TIMEDOUT errors, and NO_VOLUME and NO_BFID. Lastly, place into the accounting db the new fields supported by the accounting client (like file_family, volume, drive, etc.). 

Modified --verbose with a level less than zero to also turn off the data access layer for both successes and failures. Also, fixed the "Not all input files are %s files" message to correctly list /pnfs/... or unix. 

Fixed two bugs with respect to --data-access-layer. First, was that successful transfers with this option enabled would place the success into the encp_error table in the accounting database. Second, on successes the information printed out to the screen with this option enabled was not printing out the correct information (it was leaving most values blank). 

Modified the "Volume clerk (%s) knows nothing about %s.\n" messages. If the volume clerk returned a KEYERROR then the old error is still logged. If a different error is returned then, "Failure communicating with volume clerk..." is logged instead. 

Attempt to handle an exception. If the output file did not exist when trying to get the directory, an OSError occured. It is now caught inside of the log_encp_start() function. 

Comment out the --copy option for the v3_4 cut. 

bumping version to v3_4 because of encpCut 

Added the --copy switch for encp. This switch allows for encp to write N copies of the file to different tapes. 

Fixed an error reported. Two cases exist. One is when get_file_clerk_info() is passed a ticket and not just the bfid when an error occurs. The other is when get_volume_clerk_info() also has an error when a ticket (and not just the external label) is passed to it. When the error string was put together the entire ticket was used instead of just the bfid or volume. 

Fixed e_access() to handle or-ed os.R_OK, os.R_OK and os.X_OK values. Not just one of them at a time. 

Use the new code in enstore_functions2.py 1.12 to handle reading filenames like: stkensrv2:7500//pnfs/test/testfile. Also, fixed a bug in reading some bfids. Some 2000 bfids from D0 have "DMS" bfids instead of "D0MS". Encp had problems with these bfids. The brand and bfid handling code has been fixed to handle brands with lengths other than that of four bytes. 

Modified print_data_access_layer_format() to check for sub-tickets to actually be dictionaries. There seems to be a way for a string to be named one of these sub-tickets that causes tracebacks. 

Use the new accounting server ability to handle None in the message field for log_encp_error(). 

Modify how encp, ensync and enmv use the option.Interface class's print_usage() function. All command line parsing errors, should now give an error return code. 

Don't pass None to log_encp_error() for the error paramter. Pass "" instead. 

Fixed the cause of an UNCAUGHT_EXCEPTION. The if...else branch did create a situation where an uninitialized variable could be used. 

Bug fix in the way encp handles bogus libraries. If the library specified does not exist, an UNGAUGHT_EXCEPTION would occur. This is now handled. 

Fixed a handle_retries bug such that the queue size is now correctly determined on errors. Also, when such error occurs, it is not deleted from the queue since the 'completion_status' ticket field is now used. 

It might be possible that an error while reading could be forgetten about when the exit_status is printed/returned. Modified the if...elif...else statement to protect against wrongly falling into the 'else' section. 

Encp resends on writes were being done twice instead of just once. This has been fixed. Also, the messages to the user and log file specifing that encp is trying to submit have been "cleaned up" and only occur from one spot in the code now, namely submit_one_request(), instead of all over. 

Added "get" option --skip-deleted-files. This option will cause get to skip over deleted files. 

Bug fix. Now it handles exceptions raised when the file has been deleted before it attempts to clobber layer 1 & 4 during a dcache write. 

Fixed the message string that is created when a volume is NOACCESS (the volume name was listed as the entire work_ticket as a string). Also, modified where print_data_access_layer_format() looks for the volume in the ticket to print the most accurate information. It was not handing the case where only the 'external_label' in the VC sub-ticket was known, but none of the others. 

The switch --bypass-filesystem-max-filesize-check was broken. Fixed it. 

Added support for encp to record failures in the accounting database. Added the UNCAUGHT_EXCEPTION error to give to users when encp would otherwise traceback. 

Fix a "get" bug. When get would attempt to read a file with only a partial entry in the file database and no corresponding pnfs file; the new pnfs file would not be created because the pnfs class instance wasn't getting instantiated correctly. Added a pnfs.Pnfs() call and bug fixed. 

Handle an AttributeError exception for "get" when the pnfs file does not exist when entering the check_crc() function. This check is for the dcache layer 2 check. 

Fixed use of the --check option. I had become broken. 

Fixed two bugs relating to ignoring of the --library and --file-family-wrapper switches. The first was only cosmetic. The First log file message printed the wrong values. The second was due to always looking at the output directory tags when checking the maximum size of the library and file family wrapper. 

Modified the control socket error detection section in handle_retries(). It might be eating messages. Now just check if the queue is empty or not after the select(). 

Modified encp to determine the next transfer similar to how "get" does so. This involves using the 'completion_status' field in the request ticket. This work is done it preperation of having an API (for automigration). 

Added CRC_DCACHE_MISMATCH to the list of errors that can be reported from encp. This differentiates this type of error from CRC_ENCP_MISMATCH which was used for both situations. 

Modified when/how the control socket is accessed before transfer_file(). There might have been eaten final dialogs for really small files. This entailed two new functions: stall_read_transfer() and stall_write_transfer() that encapsulate mostly existing inline functionality. 

Added code to detect (with multiple file transfers) if two input files will be copied to the same output file. (i.e. same name; two input dirs) 

I changed the timeout values when checking the control socket for any unexpected problems. Instead of 5 seconds it is now 1 second. 

Misspelled max_resumit as max_resubmits. 

Removed a comma that mylint.py did not like. 

Removed dependance on brands to determine if a file clerk knows about a bfid. Made a change to use the newer configuration_client.py caching mechanism. Started adding accounting_client code to have encp record information about failure to the accounting database. Still commented out. Moved max_attempts() to inside create_read/write_requests(). The retry/resubmit (and maxes) information is now placed inside a sub-ticket. Moved the external_label checks around. This is to avoid a check after each file (which is painful for get). Bug fix for get; input filenames were always getting the sequetial filenames even when the real names were given via --list. 

get_csc() can raise exceptions. Some places in encp/get did not catch them. They are now caught. 

Handle bfids with "L" appended to them correctly. This would cause an exception and the exception handling code had another bug that caused a traceback. Also, handle files where the file database metadata has None for the crc. This was also causing tracebacks. Lastly, make a preparatory change to EncpError to place the "status" error inside the optional ticket if not already done so. 

Fixed two bugs regarding encp not recognizing some bfids. Some older bfids (Nov 2000 were when the sample file's bfids were created) appended a long() "L" to the end of the bfid. This L is consistant between the pnfs metadata and the file database. Thus, encp will now recognize these correctly. The other bug was in the error handling code that tried to use the wrong undefined variable when forming the error string for the first bug mentioned. 

Fixed a bug where Pnfs.__init__() would succed, but if get_path() was passed as the parameter the empty string, a traceback would occur. Pnfs.get_path() can now throw ValueErrors (in addition to OSErrors or IOErrors), which are now handled by encp. 

Modified the code to deal with some occasional errors. These occur when __get_fcc() (and __get_vcc()) return None for the volume/bfid information. This can occur (correctly) for some cases; like None was passed into the function for the volume/bfid parameter. However, for these error cases there should have been a valid value. These changes should handle the error and simultaneously determine what is actually happening. 

bumping version to v3_3b because of encpCut 

Modified encp to avoid some uncesessary recreates of account_client class instances. This was anoying in that warning messages can be sent when test systems without accounting servers are used. (Now only one such message will appear.) 

Modified __str__() in EncpInterface to return a more useful string for printing. Added more "Time to" messages for debugging messages. In handle_retries() added code to resubscribe to the csc's erc to receive NEWCONFIGFILE messages. Added elapsed() and elapsed_string() functions to aid in the sanity of including "elapsed=..." to the end of terminal messages. 

Attempting to fix bugs in get. One is that the handling of NOACCESS errors in the previous encp.py commit is still broken. The other is to add various "Time to" messages throughout encp.py and get.py to find slow code. 

Handle the exception raised withing handle_retires() when it attempts to determine if the tape is NOACCESS or NOTALLOWED. The exception would lead to an encp/get traceback. 

Added carbage collection code. This is to force collection at otherwise sleeping times while waiting for responces. Modified handle_retries to be able to check the local file (for existance, etc.). This is to be able to better show that encp does not randomly delete files. Modified how final_say and delete_at_exit.quit() work together. This is to better support the automigration project. 

Modified these clients (encp and entv) to take advantage of caching items from the configuration. They both attempt to dump the entire configuraton at the beginning. Other changes include minimizing the number of other server queries too. 

Fixed how error from open_local_file() get processed. Errors like ENOENT are now classified as the non_retriable e_errors.FILE_MODIFIED error. Also, added a check in open_local_file() to compare the filesize too in addition to the inode. 

Small mods this time. Used is_read() where it wasn't used before. Added some comments to the option/switch dictionary. Fixed an exception raised in is_read() if the argument passed in is invalid. 

Addressed a traceback that would occur if the library tag (on writes) named a non-existent library. Also, modified the handling of the --max-retry and --max-resubmit command line switches to support understanding the string 'None' as a value. 

Added setting the uid and gid in the file database at the end of a write. Also, reset the mover_timeout back to 600 seconds (I had commited a debug change that shank this number). 

Cleaned up the udp_server instance usage in open_udp_socket(). It was looping twice (once in open_udp_socket and once outside) for the same information to be recieved. This combined with a bug (now fixed in 1.23) in cleanUDP.select() allowed for twice the specified timeout to be waited. 

Added encp admin options --file-family-width and --ignore-storage-group for use with automigration. Fixed a bug in option.py. In some situations it wouldn't parse the command line correctly. Also added an example that shows how to set more than one variable without having any additional arguments. 

Added check incase the same input file is listed twice. This used to be done, but I must have removed it at some point. 

These changes give encp/get a usable --check option. Most of the changes are for allowing encp/get to turn off the logging of messages (without having explicit if statements throughout the code). Others are simple cleanup changes (from pychecker). 

Fixed the error message given when either create_read_requests() or create_write_requests() fails. Previously, the reason given to the user was not very useful. 

A bug introduced into encp.py revision 1.680 was that the command line was not being sent to the log server. This is now fixed. 

Use the power of the new enroute2 (using arping) to handle the situation where the interfaces are on the same subnet and avoid the wrong arp response problem. 

bumping version to v3_3a because of encpCut 

encp has been modifed to no longer need the UDP socket to obtain routing information from the mover. The control socket (and data socket) can now survive past a routing change that previously would have rendered it useless; thus the UDP socket hack. Even though get still needs to use the UDP socket, it is now compatible with the changes in encp. 

Added the options --storage-group, --file-family-wrapper and --library to encp for use in the automigration project. 

Cleaned up pychecker warnings. Note: One change does require callback.py 1.100. 

bumping version to v3_3 because of encpCut 

Fixed some situations where encp does not print as much information that is known in the data_access_layer_format. Notably: it is not printing the filesize when the sizes do not match when writing from dcache. 

Fixed a bug. Copy paste error in transfer_file() from when the bytes_not_transfered fix was done. 

bumping version to v3_2 because of encpCut 

Added timeout to the get_brand() and get_bfid() file clerk client calls. 

Fixed an inconsistancy in the way the bytes_not_transfered was utilized from EXfer. 

Commented out a no longer useful log message. Modified the check for looking for inconsistancies between the files pnfs layers and the file database on reads. 

Included some information in the exceptions raised when testing for valid filenames, filesystem filesize limitations, library filesize limitations, etc. that includes the filenames for the print_data_access_layer_format(). 

Modifications to hit pnfs less frequently. There were far more stats happening than needed to be. 

When writing to enstore, if the output pnfs file is moved to a new location or renamed then encp will use the pnfs id to find the new location. If the pnfs file is removed, then the behavior is unchanged; the transfer fails. 

When an error occurs writing to enstore via dcache, layer 1 and layer 4 are now cleared. 

More fixes like in revision 1.657. 

Added a pstatinfo() (really a pstatdecode()) call to the verify_file_size() function. This should force the filesize to be decoded before it is used. 

At some point the "get" option --sequential-filenames was broken. Now fixed. 

Fixed the order things are done for creating the wrapper sub ticket. Mode should come from the local file when writting to enstore, but was getting overridden by the mode for the directory where the pnfs file would be created. 

Modified what gets logged when sending request to the LM. Some difference if the error was retriable or non-retriable. If the error was e_errors.MALFORMED then the entire ticket that was sent is logged. 

Fixed a holdover bug from previous commit. It did work with /dev/null as the output directory when I tested it, but didn't work with a real directory until now. Added comments on the large if...elif...else statement in create_read_requests() and what to keep in mind when modifying a branch within it. 

Fixed a bug for "get". There was a variable that could be referenced before being defined when there was no metadata available. 

Modified the code to remove unecessary pnfs queries. 

Changed how the default wrapper fields are filled in. 

Added some flush() calls to keep the terminal output up to date. 

Added a \n to a message to standard out. 

Added check to make sure that the fcc.server_address and vcc.server_address values are legit and not None. 

Modified the warning/information message given when sdsscp/get reads a tape for the first time when no metadata is known. 

Add support for get to have a --sequential-filenames option to override any existing filename metadata and use sequentially numbered filenames instead. 

Fixed two bugs related to less than perfect handling of the default enstore system "going away" (i.e. stopped, shutdown, powered off). The first resulted in a confusing warning message. The other resulted in a traceback when trying to resumit a request. 

Attempt to handle "connection reset by peer" errors on the data socket with shutdown(). Added the string 'mover' and 'encp' to the crc mismatch error messages. Tweeked transfer_file() for use by get. Added the crc to the MSG_TYPE=ENCP_XFER log messages. 

Fixed a bug when the requested volume is not known to any enstore system. Fixed a bug that could cause "get" to miss a renamed file and create a duplicate filename entry. 

Fixed a bug in handle_retries. If there were 3 errors and the new "error" was RESUBMITTING it would incorrectly interpret it as a TOO_MANY_RETRIES. It should have remained a RESUBMITTING "error." 

Added SystemExit to occurances of KeyboardInterrupt before blanket excepts. Socket creation failures (from callback mostly) are now handled. Volume requests to the volume clerk for None volumes has been stopped. 

Fixed a bug that would raise an alarm when fcc.set_pnfsid() fails, but would not abort the transfer. This would result in complete metadata. Only observed in get transfers though. The tags in the "command line" info message on --put-cache writes now display correct info, instead of "unknown". The accounting server is now sent the version when a transfer completes. 

Moved a trace message to contain accurate information with respect to location on the tape. 

Two fixes. One, one call of tape_ticket remained that tried to turn the tape_ticket['tape_list'] from a dictionary into a list. Newer fcc return this as a list already. Two, stopped using fcc.get_bfids() for volume (aka "get") transfers. 

Removed a debugging print statement. Added a raise of KeyError so a warning message will get displayed for "get". 

Added one more reason to the comment describing what can cause the pnfs filesystem to be unwriteable. This reason was that the node was not in the trusted list of nodes. 

Fixed a bug that caused encp to ask the volume clerk about the volume consiting of the empty string, instead of a string containing the volume name. 

This modification handles re-raising exceptions correctly. If you call "raise sys.exc_info()" it does not work (as far as I can tell it should). They have been replaced with: raise sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2] to re-raise the exception without creating tracebacks. 

Attempting to fix a problem with a traceback on stkendca8a. A mod for get to correctly handle unknown files. 

Lower-level functions won't exit out directly. They pass the error up to higher levels for processing. More cleanup/optimization of the volume with list code in create_read_requests(). 

Encp now remembers the inode of the file when first stat()ed. This required splitting create_zero_length_files() into create_zero_length_pnfs_files() and create_zero_length_local_files(). verify_file_size() and open_local_file() now have checks in them using inode values. Since all of the direct i/o code is now in EXfer, old/unused code was removed from open_local_file(). 

Added two new functions, get_vcc() and get_fcc(). They work similar to get_csc() in that a cached global variable is stored after the first call. The access_check() function is placed in more places. This will hopefully reduce automounting pnfs related errors (when --pnfs-is-automounted is used). Handles exceptions raised from select.select(). 

Last few bugs w.r.t. get working. Added some log messages for the few errors that remain. 

Major fixes for get to work: acc_daily_summary.py accounting_client.py accounting.py accounting_query.py accounting_server.py aci.py alarm_client.py alarm.py alarm_server.py aml2_dummy.py aml2_log.py aml2.py atomic.py backup_backup.py backup_client.py backup.py bfid_db.py bytes_per_day_plotter_module.py callback.py cern_wrapper.py change_loc_cookie.py change_s_i.py charset.py checkdb.py checkdbs.py check_pnfs_db.py cleanUDP.py configuration_client.py configuration_server.py cpio_odc_wrapper.py create_sg_db.py CVS db_compare.py db_dump.py db.py db_retrieve_backup.py dbs.py dcache_make_queue_plot_page.py dcache_monitor.py delete_at_exit.py discipline.py disk_driver.py dispatching_worker.py drivestat2.py drivestat_client.py drivestat_server.py drive_utilization_plotter_module.py duplicate.py duplication_util.py ecron_util.py edb.py e_errors.py ejournal.py encp_admin.py encp.py encp_rate_multi_plotter_module.py encp_ticket.py encp_user2.py encp_user.py encp_wrapper.py en_eval.py enmail.py enmv_admin.py enmv.py enmv_user.py enstore_admin.py enstore_alarm_cgi.py enstore_alarm_search_cgi.py enstore_constants.py enstore_display.py enstore_erc_functions.py enstore_file_listing_cgi.py enstore_files.py enstore_functions2.py enstore_functions3.py enstore_functions.py enstore_html.py enstore_log_file_search_cgi.py enstore_mail.py enstore_make_generated_page.py enstore_make_log_calendar.py enstore_make_plot_page.py enstore_overall_status.py enstore_pg.py enstore_plots.py enstore_plotter_framework.py enstore_plotter_module.py enstore.py enstore_restart.py enstore_saag_network.py enstore_saag.py enstore_show_inventory_cgi.py enstore_show_inv_summary_cgi.py enstore_start.py enstore_status.py enstore_stop.py enstore_system_html.py enstore_up_down.py enstore_user2.py enstore_user_cgi.py enstore_user.py enstore_utils_cgi.py ensync_admin.py ensync.py ensync_user.py entv.py esgdb.py espion.py estart.py estop.py event_relay_client.py event_relay_messages.py event_relay.py fake_quota.py fdbdump.py file_clerk_client.py file_clerk.py file_family_analysis_plotter_module.py fileinfo.py file_utils.py find_pnfs_file.py flip_tab_acsls.sh flip_tab_das.sh ftt_driver.py ftt.py generic_alarm.py generic_client.py generic_driver.py generic_server.py get_all_bytes_counter.py get_cron_title.py get.py get_total_bytes_counter.py histogram.py hostaddr.py host_config.py html_main.py idlemovers.py info_client.py info_server.py inquisitor_client.py inquisitor_plots.py inquisitor.py interface.py inventory.py journal.py label_tape.py library_manager_client.py library_manager.py lintit lm_list.py lm_que_length.py log_client.py log_finish_event.py log_server.py log_start_event.py log_trans_fail.py m2.py Makefile make_ingest_rates_html_page.py make_migrated_as_duplicate.py make_original_as_duplicate.py makeplot.py make_pyc_files.py manage_queue.py match_syslog.py media_changer_client.py media_changer.py media_changer_test.py migrate.py migration_scope.py migration_summary_plotter_module.py module_trace.py monitor_client.py monitored_server.py monitor_server.py mounts_plot.py mounts_plotter_module.py movcmd_mc.py mover_client.py mover_constants.py mover-nanny.py mover.py mpq.py multiple_interface.py net_directory.py net_driver.py null_driver.py null_wrapper.py on-call.py operation.py option.py plotter_main.py plotter.py pnfs_agent_client.py pnfs_agent.py pnfs_backup_plot.py pnfs_backup_plotter_module.py pnfsidparser.py pnfs.py priority_selector.py put.py quickquota.py quota.py quotas_plotter_module.py ratekeeper_client.py ratekeeper_plotter_module.py ratekeeper.py ratemeter.py rate_test.py rawUDP_p.py rawUDP.py readonly_volumes.py recent_file_listing.py report_volume_quotas.py restoredb.py restore.py rm_volmap.py run1.py safe_dict.py scanfiles.py send_alive.py set_lm_noread.py setpath.py sg_db.py show_file_cgi.py show_volume_cgi.py slots_usage_plotter_module.py stethoscope.py string_driver.py summary_bpd_plotter_module.py summary_burn_rate_plotter_module.py summary_plots.py swap_original_and_copy.py tab_flipping_exemption.py tab_flipping_nanny.py take_out_acsls.sh take_out_das.sh tapes_burn_rate_plotter_module.py time_fifo.py timeofday.py Trace.py udp_client.py udp_cl.py udp_common.py udp_load_test.py udp_server.py udp_srvr.py vdbdump.py volume_assert.py volume_assert_wrapper.py volume_clerk_client.py volume_clerk.py volume_family.py web_server.py weekly_summary_report.py write_protection_alert.py www_server.py yank.py Fixed a bug that determines the correct CS knowing the volume. acc_daily_summary.py accounting_client.py accounting.py accounting_query.py accounting_server.py aci.py alarm_client.py alarm.py alarm_server.py aml2_dummy.py aml2_log.py aml2.py atomic.py backup_backup.py backup_client.py backup.py bfid_db.py bytes_per_day_plotter_module.py callback.py cern_wrapper.py change_loc_cookie.py change_s_i.py charset.py checkdb.py checkdbs.py check_pnfs_db.py cleanUDP.py configuration_client.py configuration_server.py cpio_odc_wrapper.py create_sg_db.py CVS db_compare.py db_dump.py db.py db_retrieve_backup.py dbs.py dcache_make_queue_plot_page.py dcache_monitor.py delete_at_exit.py discipline.py disk_driver.py dispatching_worker.py drivestat2.py drivestat_client.py drivestat_server.py drive_utilization_plotter_module.py duplicate.py duplication_util.py ecron_util.py edb.py e_errors.py ejournal.py encp_admin.py encp.py encp_rate_multi_plotter_module.py encp_ticket.py encp_user2.py encp_user.py encp_wrapper.py en_eval.py enmail.py enmv_admin.py enmv.py enmv_user.py enstore_admin.py enstore_alarm_cgi.py enstore_alarm_search_cgi.py enstore_constants.py enstore_display.py enstore_erc_functions.py enstore_file_listing_cgi.py enstore_files.py enstore_functions2.py enstore_functions3.py enstore_functions.py enstore_html.py enstore_log_file_search_cgi.py enstore_mail.py enstore_make_generated_page.py enstore_make_log_calendar.py enstore_make_plot_page.py enstore_overall_status.py enstore_pg.py enstore_plots.py enstore_plotter_framework.py enstore_plotter_module.py enstore.py enstore_restart.py enstore_saag_network.py enstore_saag.py enstore_show_inventory_cgi.py enstore_show_inv_summary_cgi.py enstore_start.py enstore_status.py enstore_stop.py enstore_system_html.py enstore_up_down.py enstore_user2.py enstore_user_cgi.py enstore_user.py enstore_utils_cgi.py ensync_admin.py ensync.py ensync_user.py entv.py esgdb.py espion.py estart.py estop.py event_relay_client.py event_relay_messages.py event_relay.py fake_quota.py fdbdump.py file_clerk_client.py file_clerk.py file_family_analysis_plotter_module.py fileinfo.py file_utils.py find_pnfs_file.py flip_tab_acsls.sh flip_tab_das.sh ftt_driver.py ftt.py generic_alarm.py generic_client.py generic_driver.py generic_server.py get_all_bytes_counter.py get_cron_title.py get.py get_total_bytes_counter.py histogram.py hostaddr.py host_config.py html_main.py idlemovers.py info_client.py info_server.py inquisitor_client.py inquisitor_plots.py inquisitor.py interface.py inventory.py journal.py label_tape.py library_manager_client.py library_manager.py lintit lm_list.py lm_que_length.py log_client.py log_finish_event.py log_server.py log_start_event.py log_trans_fail.py m2.py Makefile make_ingest_rates_html_page.py make_migrated_as_duplicate.py make_original_as_duplicate.py makeplot.py make_pyc_files.py manage_queue.py match_syslog.py media_changer_client.py media_changer.py media_changer_test.py migrate.py migration_scope.py migration_summary_plotter_module.py module_trace.py monitor_client.py monitored_server.py monitor_server.py mounts_plot.py mounts_plotter_module.py movcmd_mc.py mover_client.py mover_constants.py mover-nanny.py mover.py mpq.py multiple_interface.py net_directory.py net_driver.py null_driver.py null_wrapper.py on-call.py operation.py option.py plotter_main.py plotter.py pnfs_agent_client.py pnfs_agent.py pnfs_backup_plot.py pnfs_backup_plotter_module.py pnfsidparser.py pnfs.py priority_selector.py put.py quickquota.py quota.py quotas_plotter_module.py ratekeeper_client.py ratekeeper_plotter_module.py ratekeeper.py ratemeter.py rate_test.py rawUDP_p.py rawUDP.py readonly_volumes.py recent_file_listing.py report_volume_quotas.py restoredb.py restore.py rm_volmap.py run1.py safe_dict.py scanfiles.py send_alive.py set_lm_noread.py setpath.py sg_db.py show_file_cgi.py show_volume_cgi.py slots_usage_plotter_module.py stethoscope.py string_driver.py summary_bpd_plotter_module.py summary_burn_rate_plotter_module.py summary_plots.py swap_original_and_copy.py tab_flipping_exemption.py tab_flipping_nanny.py take_out_acsls.sh take_out_das.sh tapes_burn_rate_plotter_module.py time_fifo.py timeofday.py Trace.py udp_client.py udp_cl.py udp_common.py udp_load_test.py udp_server.py udp_srvr.py vdbdump.py volume_assert.py volume_assert_wrapper.py volume_clerk_client.py volume_clerk.py volume_family.py web_server.py weekly_summary_report.py write_protection_alert.py www_server.py yank.py Removed costly requests of the file/volume clerk for volume w/ list transfers. It now uses tape_ticket values. acc_daily_summary.py accounting_client.py accounting.py accounting_query.py accounting_server.py aci.py alarm_client.py alarm.py alarm_server.py aml2_dummy.py aml2_log.py aml2.py atomic.py backup_backup.py backup_client.py backup.py bfid_db.py bytes_per_day_plotter_module.py callback.py cern_wrapper.py change_loc_cookie.py change_s_i.py charset.py checkdb.py checkdbs.py check_pnfs_db.py cleanUDP.py configuration_client.py configuration_server.py cpio_odc_wrapper.py create_sg_db.py CVS db_compare.py db_dump.py db.py db_retrieve_backup.py dbs.py dcache_make_queue_plot_page.py dcache_monitor.py delete_at_exit.py discipline.py disk_driver.py dispatching_worker.py drivestat2.py drivestat_client.py drivestat_server.py drive_utilization_plotter_module.py duplicate.py duplication_util.py ecron_util.py edb.py e_errors.py ejournal.py encp_admin.py encp.py encp_rate_multi_plotter_module.py encp_ticket.py encp_user2.py encp_user.py encp_wrapper.py en_eval.py enmail.py enmv_admin.py enmv.py enmv_user.py enstore_admin.py enstore_alarm_cgi.py enstore_alarm_search_cgi.py enstore_constants.py enstore_display.py enstore_erc_functions.py enstore_file_listing_cgi.py enstore_files.py enstore_functions2.py enstore_functions3.py enstore_functions.py enstore_html.py enstore_log_file_search_cgi.py enstore_mail.py enstore_make_generated_page.py enstore_make_log_calendar.py enstore_make_plot_page.py enstore_overall_status.py enstore_pg.py enstore_plots.py enstore_plotter_framework.py enstore_plotter_module.py enstore.py enstore_restart.py enstore_saag_network.py enstore_saag.py enstore_show_inventory_cgi.py enstore_show_inv_summary_cgi.py enstore_start.py enstore_status.py enstore_stop.py enstore_system_html.py enstore_up_down.py enstore_user2.py enstore_user_cgi.py enstore_user.py enstore_utils_cgi.py ensync_admin.py ensync.py ensync_user.py entv.py esgdb.py espion.py estart.py estop.py event_relay_client.py event_relay_messages.py event_relay.py fake_quota.py fdbdump.py file_clerk_client.py file_clerk.py file_family_analysis_plotter_module.py fileinfo.py file_utils.py find_pnfs_file.py flip_tab_acsls.sh flip_tab_das.sh ftt_driver.py ftt.py generic_alarm.py generic_client.py generic_driver.py generic_server.py get_all_bytes_counter.py get_cron_title.py get.py get_total_bytes_counter.py histogram.py hostaddr.py host_config.py html_main.py idlemovers.py info_client.py info_server.py inquisitor_client.py inquisitor_plots.py inquisitor.py interface.py inventory.py journal.py label_tape.py library_manager_client.py library_manager.py lintit lm_list.py lm_que_length.py log_client.py log_finish_event.py log_server.py log_start_event.py log_trans_fail.py m2.py Makefile make_ingest_rates_html_page.py make_migrated_as_duplicate.py make_original_as_duplicate.py makeplot.py make_pyc_files.py manage_queue.py match_syslog.py media_changer_client.py media_changer.py media_changer_test.py migrate.py migration_scope.py migration_summary_plotter_module.py module_trace.py monitor_client.py monitored_server.py monitor_server.py mounts_plot.py mounts_plotter_module.py movcmd_mc.py mover_client.py mover_constants.py mover-nanny.py mover.py mpq.py multiple_interface.py net_directory.py net_driver.py null_driver.py null_wrapper.py on-call.py operation.py option.py plotter_main.py plotter.py pnfs_agent_client.py pnfs_agent.py pnfs_backup_plot.py pnfs_backup_plotter_module.py pnfsidparser.py pnfs.py priority_selector.py put.py quickquota.py quota.py quotas_plotter_module.py ratekeeper_client.py ratekeeper_plotter_module.py ratekeeper.py ratemeter.py rate_test.py rawUDP_p.py rawUDP.py readonly_volumes.py recent_file_listing.py report_volume_quotas.py restoredb.py restore.py rm_volmap.py run1.py safe_dict.py scanfiles.py send_alive.py set_lm_noread.py setpath.py sg_db.py show_file_cgi.py show_volume_cgi.py slots_usage_plotter_module.py stethoscope.py string_driver.py summary_bpd_plotter_module.py summary_burn_rate_plotter_module.py summary_plots.py swap_original_and_copy.py tab_flipping_exemption.py tab_flipping_nanny.py take_out_acsls.sh take_out_das.sh tapes_burn_rate_plotter_module.py time_fifo.py timeofday.py Trace.py udp_client.py udp_cl.py udp_common.py udp_load_test.py udp_server.py udp_srvr.py vdbdump.py volume_assert.py volume_assert_wrapper.py volume_clerk_client.py volume_clerk.py volume_family.py web_server.py weekly_summary_report.py write_protection_alert.py www_server.py yank.py Fixed an error handling bug that would increase each resubmission by 2. acc_daily_summary.py accounting_client.py accounting.py accounting_query.py accounting_server.py aci.py alarm_client.py alarm.py alarm_server.py aml2_dummy.py aml2_log.py aml2.py atomic.py backup_backup.py backup_client.py backup.py bfid_db.py bytes_per_day_plotter_module.py callback.py cern_wrapper.py change_loc_cookie.py change_s_i.py charset.py checkdb.py checkdbs.py check_pnfs_db.py cleanUDP.py configuration_client.py configuration_server.py cpio_odc_wrapper.py create_sg_db.py CVS db_compare.py db_dump.py db.py db_retrieve_backup.py dbs.py dcache_make_queue_plot_page.py dcache_monitor.py delete_at_exit.py discipline.py disk_driver.py dispatching_worker.py drivestat2.py drivestat_client.py drivestat_server.py drive_utilization_plotter_module.py duplicate.py duplication_util.py ecron_util.py edb.py e_errors.py ejournal.py encp_admin.py encp.py encp_rate_multi_plotter_module.py encp_ticket.py encp_user2.py encp_user.py encp_wrapper.py en_eval.py enmail.py enmv_admin.py enmv.py enmv_user.py enstore_admin.py enstore_alarm_cgi.py enstore_alarm_search_cgi.py enstore_constants.py enstore_display.py enstore_erc_functions.py enstore_file_listing_cgi.py enstore_files.py enstore_functions2.py enstore_functions3.py enstore_functions.py enstore_html.py enstore_log_file_search_cgi.py enstore_mail.py enstore_make_generated_page.py enstore_make_log_calendar.py enstore_make_plot_page.py enstore_overall_status.py enstore_pg.py enstore_plots.py enstore_plotter_framework.py enstore_plotter_module.py enstore.py enstore_restart.py enstore_saag_network.py enstore_saag.py enstore_show_inventory_cgi.py enstore_show_inv_summary_cgi.py enstore_start.py enstore_status.py enstore_stop.py enstore_system_html.py enstore_up_down.py enstore_user2.py enstore_user_cgi.py enstore_user.py enstore_utils_cgi.py ensync_admin.py ensync.py ensync_user.py entv.py esgdb.py espion.py estart.py estop.py event_relay_client.py event_relay_messages.py event_relay.py fake_quota.py fdbdump.py file_clerk_client.py file_clerk.py file_family_analysis_plotter_module.py fileinfo.py file_utils.py find_pnfs_file.py flip_tab_acsls.sh flip_tab_das.sh ftt_driver.py ftt.py generic_alarm.py generic_client.py generic_driver.py generic_server.py get_all_bytes_counter.py get_cron_title.py get.py get_total_bytes_counter.py histogram.py hostaddr.py host_config.py html_main.py idlemovers.py info_client.py info_server.py inquisitor_client.py inquisitor_plots.py inquisitor.py interface.py inventory.py journal.py label_tape.py library_manager_client.py library_manager.py lintit lm_list.py lm_que_length.py log_client.py log_finish_event.py log_server.py log_start_event.py log_trans_fail.py m2.py Makefile make_ingest_rates_html_page.py make_migrated_as_duplicate.py make_original_as_duplicate.py makeplot.py make_pyc_files.py manage_queue.py match_syslog.py media_changer_client.py media_changer.py media_changer_test.py migrate.py migration_scope.py migration_summary_plotter_module.py module_trace.py monitor_client.py monitored_server.py monitor_server.py mounts_plot.py mounts_plotter_module.py movcmd_mc.py mover_client.py mover_constants.py mover-nanny.py mover.py mpq.py multiple_interface.py net_directory.py net_driver.py null_driver.py null_wrapper.py on-call.py operation.py option.py plotter_main.py plotter.py pnfs_agent_client.py pnfs_agent.py pnfs_backup_plot.py pnfs_backup_plotter_module.py pnfsidparser.py pnfs.py priority_selector.py put.py quickquota.py quota.py quotas_plotter_module.py ratekeeper_client.py ratekeeper_plotter_module.py ratekeeper.py ratemeter.py rate_test.py rawUDP_p.py rawUDP.py readonly_volumes.py recent_file_listing.py report_volume_quotas.py restoredb.py restore.py rm_volmap.py run1.py safe_dict.py scanfiles.py send_alive.py set_lm_noread.py setpath.py sg_db.py show_file_cgi.py show_volume_cgi.py slots_usage_plotter_module.py stethoscope.py string_driver.py summary_bpd_plotter_module.py summary_burn_rate_plotter_module.py summary_plots.py swap_original_and_copy.py tab_flipping_exemption.py tab_flipping_nanny.py take_out_acsls.sh take_out_das.sh tapes_burn_rate_plotter_module.py time_fifo.py timeofday.py Trace.py udp_client.py udp_cl.py udp_common.py udp_load_test.py udp_server.py udp_srvr.py vdbdump.py volume_assert.py volume_assert_wrapper.py volume_clerk_client.py volume_clerk.py volume_family.py web_server.py weekly_summary_report.py write_protection_alert.py www_server.py yank.py Split get_clerk_info() functionality into get_file_clerk_info() and get_volume_clerk_info(). The original is now implemented using the to new functions. "Get" can use the newer versions more efficently. acc_daily_summary.py accounting_client.py accounting.py accounting_query.py accounting_server.py aci.py alarm_client.py alarm.py alarm_server.py aml2_dummy.py aml2_log.py aml2.py atomic.py backup_backup.py backup_client.py backup.py bfid_db.py bytes_per_day_plotter_module.py callback.py cern_wrapper.py change_loc_cookie.py change_s_i.py charset.py checkdb.py checkdbs.py check_pnfs_db.py cleanUDP.py configuration_client.py configuration_server.py cpio_odc_wrapper.py create_sg_db.py CVS db_compare.py db_dump.py db.py db_retrieve_backup.py dbs.py dcache_make_queue_plot_page.py dcache_monitor.py delete_at_exit.py discipline.py disk_driver.py dispatching_worker.py drivestat2.py drivestat_client.py drivestat_server.py drive_utilization_plotter_module.py duplicate.py duplication_util.py ecron_util.py edb.py e_errors.py ejournal.py encp_admin.py encp.py encp_rate_multi_plotter_module.py encp_ticket.py encp_user2.py encp_user.py encp_wrapper.py en_eval.py enmail.py enmv_admin.py enmv.py enmv_user.py enstore_admin.py enstore_alarm_cgi.py enstore_alarm_search_cgi.py enstore_constants.py enstore_display.py enstore_erc_functions.py enstore_file_listing_cgi.py enstore_files.py enstore_functions2.py enstore_functions3.py enstore_functions.py enstore_html.py enstore_log_file_search_cgi.py enstore_mail.py enstore_make_generated_page.py enstore_make_log_calendar.py enstore_make_plot_page.py enstore_overall_status.py enstore_pg.py enstore_plots.py enstore_plotter_framework.py enstore_plotter_module.py enstore.py enstore_restart.py enstore_saag_network.py enstore_saag.py enstore_show_inventory_cgi.py enstore_show_inv_summary_cgi.py enstore_start.py enstore_status.py enstore_stop.py enstore_system_html.py enstore_up_down.py enstore_user2.py enstore_user_cgi.py enstore_user.py enstore_utils_cgi.py ensync_admin.py ensync.py ensync_user.py entv.py esgdb.py espion.py estart.py estop.py event_relay_client.py event_relay_messages.py event_relay.py fake_quota.py fdbdump.py file_clerk_client.py file_clerk.py file_family_analysis_plotter_module.py fileinfo.py file_utils.py find_pnfs_file.py flip_tab_acsls.sh flip_tab_das.sh ftt_driver.py ftt.py generic_alarm.py generic_client.py generic_driver.py generic_server.py get_all_bytes_counter.py get_cron_title.py get.py get_total_bytes_counter.py histogram.py hostaddr.py host_config.py html_main.py idlemovers.py info_client.py info_server.py inquisitor_client.py inquisitor_plots.py inquisitor.py interface.py inventory.py journal.py label_tape.py library_manager_client.py library_manager.py lintit lm_list.py lm_que_length.py log_client.py log_finish_event.py log_server.py log_start_event.py log_trans_fail.py m2.py Makefile make_ingest_rates_html_page.py make_migrated_as_duplicate.py make_original_as_duplicate.py makeplot.py make_pyc_files.py manage_queue.py match_syslog.py media_changer_client.py media_changer.py media_changer_test.py migrate.py migration_scope.py migration_summary_plotter_module.py module_trace.py monitor_client.py monitored_server.py monitor_server.py mounts_plot.py mounts_plotter_module.py movcmd_mc.py mover_client.py mover_constants.py mover-nanny.py mover.py mpq.py multiple_interface.py net_directory.py net_driver.py null_driver.py null_wrapper.py on-call.py operation.py option.py plotter_main.py plotter.py pnfs_agent_client.py pnfs_agent.py pnfs_backup_plot.py pnfs_backup_plotter_module.py pnfsidparser.py pnfs.py priority_selector.py put.py quickquota.py quota.py quotas_plotter_module.py ratekeeper_client.py ratekeeper_plotter_module.py ratekeeper.py ratemeter.py rate_test.py rawUDP_p.py rawUDP.py readonly_volumes.py recent_file_listing.py report_volume_quotas.py restoredb.py restore.py rm_volmap.py run1.py safe_dict.py scanfiles.py send_alive.py set_lm_noread.py setpath.py sg_db.py show_file_cgi.py show_volume_cgi.py slots_usage_plotter_module.py stethoscope.py string_driver.py summary_bpd_plotter_module.py summary_burn_rate_plotter_module.py summary_plots.py swap_original_and_copy.py tab_flipping_exemption.py tab_flipping_nanny.py take_out_acsls.sh take_out_das.sh tapes_burn_rate_plotter_module.py time_fifo.py timeofday.py Trace.py udp_client.py udp_cl.py udp_common.py udp_load_test.py udp_server.py udp_srvr.py vdbdump.py volume_assert.py volume_assert_wrapper.py volume_clerk_client.py volume_clerk.py volume_family.py web_server.py weekly_summary_report.py write_protection_alert.py www_server.py yank.py Moved where items are removed from the ticket to subit_one_request() from handle_retries(). 

Fixed a bug that prevented encp from handling CRCs that did not fit in a C-style signed int. 

Fixed a problem with the crc check. The values are compared in hex, but encp did not correctly handle zero padded hex strings versus non zero padded hex string. Thus the comparisons would not match despite being correct. 

Fixed a recently introduced bug in encp. The change was added for "Get". The broken change prevented normal encps from updating their metadata correctly. Now it correctly handles the situation for encp and get cases. 

Fixed bug(s) relating to detecting the correct enstore system to use based on the volume. 

Address error handling in the new layer 2 crc check. 

Added a working check for encp to compare the crc with the crc stored in layer 2 from dcache. 

Added the CRC comparison with the layer 2 dcache crc. This code is left commented out, because of an issue with the seed value used to calulate the crcs. Also, did some cleanup because a newer pychecker complained about things. 

Changed the way emailable alarms are handled. Previously, emailable alarms were also sent a normal alarm copy. Now only the normal alarm is sent when the error is not emailable. 

1) Fixed bug when writing large files from dcache. 2) create_zero_length_files() will raise exceptions instead of quiting (the default) if an argument is specifed. (Need for get). 3) Added additional verbose messages to set_pnfs_settings(). 4) For "get" with --list, basename is applied to specified files. 

Moved the signal setup calls to earlier in the code. Also, fixed a bug the prevented encp from finding the correct enstore system for volume reads. 

Added some verbose output for some get debugging. 

Fixed a traceback that would occur if the pnfs id specifed with dcache writing/reading did not exists. Now an error message is given. Also, another dcache related fix. When writing (with --put-cache) encp will now check to make sure the filesizes of the input file matches that of the output file. Dcache is supposed to set the output filesize before starting encp, but that may not always be happening. 

Added the --bypass-filesystem-max-filesize_check option to avoid failing a transfer because the filesystem does not support large files. 

Fixed a bug for encp --volume or Get when the request volume is not declared in any enstore system. Instead of tracebacking, the user will get a NOVOLUME error. 

Fixed a bug that broke encp's ability to switch between the different pnfs paths on reads. 

Modified the set_pnfs_settings() function to use the file family from the volume family rather than from unreliable existance of a stand alone file family element in the dictionary. 

Minor change to the list of exceptions that are more likely to happen. 

Fixed some problems with the formation of valid requests. Specifically dealing with known metadata that contains different filename information that what is passed to "Get" via --list. 

Modification to handle an error situation when the file does not exist on --get-bfid reads. A traceback was generated that should have been caught. This type of error was found when trying to read a file file a valid i-node but the directory entry (supposidly) pointing to it was broken (too many i-nodes for valid directory entries problem of CDF). 

Speeded up the create_read_request() function for volume based transfers. 

Fixed a spelling error. 

Finished modifying the ability to determine which enstore system a particular volume belongs to. This is used for "Get" and the encp --volume option. 

Changed submition to submission. Also, made a change to submit_one_request() to change the 'method' ticket item to "read_tape_start". Retries were failing because it was still holding 'read_next'. 

More "Get" fixes. Currently, files without metadata and --list is specified can be read. 

Added two return statements so that the real error gets returned right away for set_pnfs_settings(). 

Changed some log messages. "Waiting" -> "Listening" 

These changes are for get to properly determine what metadata is available. 

More edits for "Get". These include more create_read_request() changes in encp.py and a go-back-to-step-one loop in get.py. 

Encp will now record the crc in layer 4 of the file. All internal encp checks have been updated to handle this. Also, all internal changes to pnfs.py have been made to handle this extra piece of data. 

Fixed a bug preventing encp from reading files without brands. Also, made a change to remove a pychecker warning on IRIX. 

Handle the non-optional routing communication for "Get" correctly. 

Fixed a problem with encp.py working with get.py correctly. 

bumping version to v3_1 because of encpCut 

encp.py now uses fullpath() from enstore_functions2.py. Fixes include improved usage of the newly rewritten pnfs.is_pnfs_path() function. This allows for better checking for "unix to unix" or "hsm to hsm" at the beginning of the program, but still leaves the actual existance, permission, etc. checks for later. 

bumping version to v3_0 because of encpCut 

Fixed more branding problems. Clamped down on valid brands. Fixed bug that returned default csc even after determining which csc it should use. 

Fixed problems with branding and determining which enstore system has the requested file. 

Fix bug preventing encp from reading files with thier bfid brands containing non-alphanumeric characters (notably B0MS and D0MS with zeros). 

For some reason the 'inode' field was always set to 0 instead of the actual inode. The actual inode is now used. 

Added 'address' to the volume clerk sub-ticket. 

Handle a "Get" related problem when the filesize is not known and using python 2.0. 

Changes for mylint.py to be happy. 

Another change for encp.py to support "Get". This time, the 'mover' field is not removed from the ticket before a ticket is resent to the LM. 

First commit of encp after starting modification for use in the "get" program for SDSS and KTEV. All pre-get functionality should continue to work as it did before. 

Slight modification to the EncpInterface file consitancy check. When reading if the directory two (or more) levels up did not exist, then a cryptic ENODATA error was given to the user. Now it is "No such file or directory". 

Fixed a permission bug. A number of ways could trigger it, but the original was a regular user trying to write into a directory owned by root. In this case the user got an error of ENODATA. All changes were in e_access(). 

Added accounting changes to record the new rates. 

new fields in encp_xfer 

Modified the dcache write error when the file has already been written to reflect that the file already exists. Added the new (and old) rates to the log file message in such a way that does not break the inquisitor (hopefully). 

Volume assert was broken. Is fixed now. 

Fixed a bug where the target (or possibly tag) does not exist, because the directory it was supposed to be in does not exist. The bug was that it should have reported the diretory as being missing but was incorrectly stating the target. 

Included to modifications to error/warning messages. The log message, "unable to register bfid" has been removed. The "Paranoid CRC mismatch" message has been changed to "CRC readback mismatch". 

These changes have the encp wait for the mover to send one byte on the data socket when writing. This gives encp a chance to know when the mover is done mounting and positioning the tape on writes. This gives encp a chance at getting more acurate rates. 

Fixed a bug where the wrong error message was given on writes and the file does not exist. The code was trying to test a non-pnfs file as a pnfs file and was then giving the wrong error message. 

Modified encp.py and pnfs.py to agree on what a pnfs directory is. Previously, encp would consider any directory named /pnfs to be a pnfs directory. The "enstore pnfs" commands were more stringent and required /pnfs to be the very first directory in the path. This current fix is based on the looser encp version. In addition to just checking the pathname, a check for a pnfs specific "hidden" file is also performed. 

Modifed the final message that encp gives (with verbosity) to include all of the rates calculated (overall, transfer, network, tape/drive and disk). 

Fixed some rate calculation and reporting problems/inconsistancies. There are now 5 rates: network, tape, disk, overall and transfer. 

bumping version to v2_20_b because of encpCut 

Cleanup of the last sys.exc_info()/tb resource leak. 

Modified to avoid things like: exc, msg, tb = sys.exc_info() and instead do something like: exc, msg = sys.exc_info()[:2] Otherwise letting the traceback get set to a local variable (tb) causes a cyclic reference. 

Removed a debugging print statement. 

Added some timing diagnostics to the verbose equal to level 9 output. This mostly includes the time it takes to set the file metadata on writes. 

Modified encp to use host_config.update_cached_config() to force encp to use updated routes on machines where/when the enstore.conf file changes. 

Added a check for layer 1 and layer 4 being empty on writes from dcache. Before this check it appears the dcache occasionaly could write the same file twice creating two (nearly) identical files in enstore. Now the second attempt will fail. 

On reads, encp should now try all three paths to a file in pnfs (/pnfs/xyz, /pnfs/fs/usr/xyz and /pnfs/fnal.gov/usr/xyz). 

Fixed one problem with the CRC data access value. Most changes though, deal with adding the --override-ro-mount option. 

Added the crc value to the data access layer output. 

On a multi-file read, the tape with the last set of files would 'win' in determining the exit status of the entire encp process. This has been fixed. This did not effect single read requests, multifile reads involving a single tape or writes. If the routing socket udp_server object failed to reaquire the same port when reinitializing; the code used to error out. Now on this 'error' it will reaquire an unused port. This may cause some 'Connection timed out' errors from the mover, but that is life. Lastly, some underpinnings for printing the CRC in the data_access_layer have been included. However, this information is not used yet for anything. 

bumping version to v2_20_a because of encpCut 

When encp stopped using interface.py and started using option.py the switches --ephemeral and --file-family were accidentally dropped. 

Encp will no longer raise alarms if non-critical server are not accessible. 

Fixed an error handling bug when generating an error message. The error was a server replying with OK, but not returning everything it should with a quit message. 

Include conditional import for fcntl functionality. The FCNTL module is depricated in 2.2. 

Added accounting server to list of servers to check when encp first starts. 

Moved the setup_signal_handling and signal_handler functions into the delete_at_exit python module. This generalizes the code for encp, ensyc and entv. 

For multi-file-transfers when writing, the delayed dismount for the first (n - 1) transfers will be at least 3 minutes. The last transfer will continue to use the default or user specified value. 

Cleaned up some of the direct i/o code. 

Fixed a bug regarding --ecrc and the permissions needed for the original file. It should have only required readable not read/writable. 

1) The message at the beginning of the program of the tags would give incorect values if the output specified was the directory of the target and not the target itself. 2) If the alarm or log servers are not running, a warning should appear, but the code should not abort the transfer. Previous to the fix it would abort. 

Fixed a bug that caused the real error reported from the mover to be ignored. Also, fixed an error message spelling error. 

These changes are in advance of encp v3. They are for future files to use them based on the user being an admin or user. 

Fixed a bug that prevented --threaded from working with the new option.py handling of command line parsing. 

Includes changes in the paranoid ECRC message. Supports e-mailable alarms. Switched over to option.py from interface.py for interpreting the command line arguments. 

feeding information to accounting server 

Include support for --ecrc in encp. This option (for reads) means that after the transfer is complete encp will run an ecrc check back over the file. 

Handle mover timeouts better internaly. Set the error to be RESUBMITTING instead of ETIMEDOUT when no mover info is known in handle_retries(). 

Fix 'unique_id' traceback error on retry/resubmit. 

Bug fix. There is the possibility that some elements may not exist do to errors. This fix tests for the elements existance first. 

Changed comparing types of variables to type(()), type([]) or type("") to the coresponding value in modules types. 

Uses the new CRC_ENCP_ERROR instead of CRC_ERROR. 

Bug fixes: 1) open_control_socket() will now check the control socket after reading the inital ticket for possible socket closed by mover case. 2) handle_retries() bug fixed that could have resulted in "mover imposter" error messages. A copy of a dictionary item was returned rather than a reference to it. 3) Slow rate errors from EXfer (from the read()/write() calls hanging in the kernel to long) are now handled specially/correctly. 

Fixed the os.getcwd() vulnerability. Added the hostname to the cwd output when verbosity is turned on. 

Handles the socket.socket() errors now. Tickets returned by the mover are checked for consitancy (which is being very parinoid). The gids were being incorrectly listed at the beginning of the transfer. 

When an error occurs on reads the output file is truncated. Also, there are now is_read and is_write functions for use in functions used in reads and writes that return true if the transfer(s) is/are reads or writes accordingly. 

Minor fix for a bug that prevented writing to /dev/null under some conditions. 

Small bug fix. Wrong value types were specified into some print_data_access_layer_format() calls. 

Moved where the $ENSTORE_SPECIAL_LIB environmental variable is processed on reads. Code moved from submit_one_request() to create_read_requests(). 

Added --shortcut switch. This is used in conjunction with the --get-cache switch to bypass full file path extrapolation. This avoids linear searches of all pnfs ids for each component in the full file path. This works similar to the --get-bfid switch. If the --shortcut switch is not given then the original --get-cache functionality remains unchanged. This change has no effect on the --put-chache switch. 

Includes a fix for the way the full file paths are put together. Also, there is now a --get-bfid option for encp. 

use environment variable to specify LM for read requests 

Fixed how the file-family-wrapper was read in at the begining for verbose output. It was always returning as "Unknown" because there was an extra set of () trying to call the integer returned as a function. 

Modified to call verify_read/write_request_consistancy() after receiving callback ticket from mover. 

Included the current working directory in the verbose and log output. 

Modified mover_handshake to return complete tickets. This should fix the "Error processing retry of <unique-id>" errors. Also, modified the code to be more resilant against 'problem' tickets when processing them in handle_retries(). Specificaly, with the 'resubmits' key. 

Encp checks to see if all critical servers are running at the begging of the program. Also, encp now handles the "KeyError: system_inhibit" traceback error. 

Fixed the format of one of the new verbose output lines. 

Added gid/group and uid/user_name info to log and terminal output. Modified the request verify functions incase the database contains incomplete data. On writes, the tag info is included in the verbose output. 

Fixed a bug so the previous version passes my (current) set of regression tests. The bug was that mmap io needs a file opend for read and write. If the file only has read permissions encp will fall back to posix io. 

These files (encp.py, interface.py, EXfer.c) allow for encp to accept which EXfer optimizations to use from the command line. 

Encp now passes more paramaters to EXfer. These allow for encp to optionally select which optimizations: threaded, direct io or memory mapped io; to use. Requires Exfer.c 1.71 to work. 

Reuse the address and port when reinitalizing the routing socket on retry/resubmit. 

Fixed "Linix" vs. "Linux" bug for direct io. Better error handling when direct io no implemented. 

Undue previous commit. 

Put in hack to handle calculating write rates when very large buffer sizes are used. 

Modified encp to use O_DIRECT on xfs on linix. 

bumping version to v2_20 because of encpCut 

Modified the code to handle the timing statistics from the threaded version of EXfer.c. 

bumping version to v2_19 because of encpCut 

Fixed more potential problems with errno usage. 

Included a check on the input file for reads to make sure the os filesize and the pnfs filesize match. 

Fixed a bug when writing to enstore from dcache. If the file only had read permissions then an unecessary test for write permissions (file and directory) would falsly fail the transfer. 

Fixed a dcache interfacing problem. Encp was trying to make sure the output file had write priledges. It shouldn't even care when dcache is involed what the output files permissions are. I cannot be assumed that all system exceptions contain the attribute errno. Defaults are now in place where needed. 

Moved the FSCORRUPTED test to atomic.py. This removed doing a lisdir for each write transfer. 

Moved a call to os.listdir() outside of a loop. This could be a permformace hit for large directories and multi-file transfers. Added the unique id to some more log messages... 

Added some log messages. These are to help trace when encp does certain things. Others are to make the unique_id more usable. 

Cleaned up the code to use new functions from e_errors for checking the status fields of tickets. 

Spelling fix: recieved -> received. Created the setup_signal_handling() function. Moved code from "__main__" to do so. 

Added a log message that associates unique_id with filenames. Changed FNCTL.O_NONBLOCK to os.O_NONBLOCK in anticipation of using python 2.2. 

bumping version to x2_18_2 because of encpCut 

Fixed an internal comment. 

Made changes to handle problems with 64bit OSF nodes making encp requests. These machines could handle file sizes larger than 2GB-1 within a C int type variable. When the integer is placed in the stringified dictionary it was not containing an appending L for long type. It was this missing L that caused the problemd for the library manager since it runs on a 32bit Linux node. 

venor is now spelled vendor. "unable to registor bfid" error now a warning not informational. Bug fix to the internal error handling mechanism. 

bumping version to x2_18_1 because of encpCut 

move non enstore import functions to enstore_functions2 

Change to pass mylint.py. 

Three bug fixes. 1) Empty permissions left after read. 2) OS file size zero and pnfs layer 4 size correct after writes. 3) Files writing under 2) were allowed to be read. 

bumping version to v2_18 because of encpCut 

Fixed one exception catch where the msg.errno attribute was accessed, but there isn't always an errno attribute. 

Undo a development change that should have been done for the previous commit. 

After timing out waiting for the mover to call back, reinitialize the routing socket server before resending the ticket to the library manager. 

Contains a number of fixes. pathconf errors are handled better. encp_interface is added to ENCP_XFER log message. Sufficent disk space checked on reads. Some changes in routing. New interface between encp.py and EXfer.c. Needs EXfer.c 1.58 or higher. 

Networking fix for the d0ola cluster. 

bumping version to v2_17 because of encpCut 

Encp was retrying to early. Up the wait time from 30 seconds to 15 minutes (standard timeout time). This only had to do with multiple interfaces. 

Handle dcache filesize setting correctly. 

Error handling bug fix for filesystem_check(). 

bumping version to v2_16 because of encpCut 

add more information in conflict alarm 

Added the user (effective and real) name to the log file output. 

Removed an eroneous error message. 

Added username to things printed at beginning of encp with verbosity turned on. Added KeyError to list of exceptions caught when an error occurs trying to determine ownership of files. 

Encp was incorrectly putting the remote filename in the fullname section of the wrapper subticket. It now uses the local filename. 

Put in signal handling code to make encp.py pass pychecker leaving only one warning left. Removed a debug print statement. Added inputfile_check() to create_write_requests(). 

bumping version to x2_16_1 because of encpCut 

Fixed little things, mostly those found by pychecker. 

"volume <volume> is maked DELETED" errors shoud be "file <filename> is marked as deleted". 

There was a problem if the /etc/enstore.conf file was not there. Fixed. 

Added the start time, command line and version to the stdout output if verbosity turned on. Also, made a change in regard to the reporting of the final error status. 

This version appears to handle antispoofing! Only needs testing. 

Added the function reply_to_caller_using_interface_ip() to udp_server. Added a __del__() function to cleanUDP. encp.py uses reply_to_caller_using_interface_ip() for the routing reply. 

Finally the first version that works with the new mover/encp handshake. 

If all goes well the versions of these files will fix the anti-spoofing problem. 

The routes were being deleted to early for the TCP encp-mover data transfer. Some packets were being sent incorrectly. 

The tickets would grow in size for each file in a multi-file transfer. This no longer happens. Also, read requests are sorted by the location cookie before being sent to the library manager. 

These files were change how routes are deleted. The first enstore/encp command given will setup the static routes to the server nodes. They will remain in place and will not be deleted. The encp transfers with the mover nodes will have their routes deleted. 

These changes allow for encp/enstore to correctly select which ethernet interface to send outgoing packets on. (This is the version done after looking at the packets with the analyzer.) 

Fixes a problem if the destination "file" is /dev/null. 

This version includes the fix for the D0 permission denied error when the local file does not have write permissions on writes. The actual failure occurs when trying to set metadata without write permissions on the real file. This fix moves the setting of the file permissions to after setting the filesize (which must be the last metadata set), but done so in such a way not to cause a major failure should an error occur. 

Bug fix inside of e_access(). And the first have of the bug fix for the "CMS marked as deleted bug." 

Bug fix for the last access and modififed times not being updated correctly. 

The last access and modificatin times are now updated for the input and output files, respectively. 

The storage group has been added to ENCPs EXFER log message. This data will be used by the inquisitor for web page information. 

Second attempt at the route selection problem. 

e_access(): encp now uses this instead of os.access(). os.access() uses the real uid/gid and not the effective uid/gid. 

Revert to previous version. There was a problem with Linux. 

These changes alter the way that routes are selected and configured. This should fix the ACLS problem (hopefully). 

bumping version to v2_15 because of encpCut 

Fix for dcache. The output file already exists, skip the creation step. 

NOACCESS/NOTALLOWED errors did not print a data access layer if they were discovered inside create_read_requests(). Now it is printed. 

There was the possibility of crashing trying to unregister a bfid when there was not a bfid in the ticket. Now the KeyError is caught in addition to the IndexError. 

Changed the UNKNOWN error - when the pnfs data is empy - to PNFS_ERROR. Also, added yet another fix for get_clerks_info(). 

Fixed two bugs that were the same problem (from copy|paste). Two () should have been []. 

Added a \n to a write to stderr. If get_clerks_info() failed to obtain an error free ticket from the file clerk, it would crash. It now checks the status field. 

Fix for a bug when the library manager responce ticket is not obtained. 

These changes will send the deleted=yes condition for all files left in its list of unfinished transfers. There was the possibility that an error would occur after encp was done with the mover. When this happened, the file was left in an 'unknown' state, now it is marked 'yes' for deleted. 

Changes made so that bfid brands are used better when reading. The most important change is that there are now timeouts in the queries to the file clerk about its brand. Otherwise, it could get stuck waiting for the wrong file clerk. 

Running out of space on a local device is now handled as a non-retriable error. 

Removal of debugging print lines. 

Better error handling wrt get_file_size(). Fix for EXfer error message formating. Added missing rmajor and rminor values that is required for cpio_odc wrapper. 

same_cookie() handles disk location cookied correctly. Better error catching/reporting with discrepencies between what is in the database and in pnfs layer 4. The responce from the library manager that it is locked/readonly/writeonly has been confirmed to be interpreted correctly. 

Fixed a serious bug w.r.t reads when a non-retriable error occured during a multi-file transfer. 

Lots of changes. 1) Write requests are processed in the same order as writes. They are still submited as before. 2) EncpError class. 3) Removed volmap support. 4) Other misc. changes. 

A change to allow encp to work on IRIX. os.path.split() behaves differently than it does on Linux. 

Lots of changes: Added a "starting transfer" message. Correctly determines which volume and file clerks to contact wrt brands. Fixed error handling in set_pnfs_settings() wrt file clerk. Better error reporting for USERERRORS on file checks. Better error reporting for atomic.open() failures. 

Changes to the bfid brand code. 

Fixes a bug in determining which file clerk to contact when the known_config_servers field is not present in the configuration file. (ie. if it is not there it uses the default.) Also contains some cleanup of the filesystem, wrapper and library size checks. 

This version has a work around the mylint.py blessing problem. It also, has a fix for the pathconf() filesystem size check because of OSF1. This is the first blessable version with BFID branding support (untested). Not to mention the first blessable version with the handle_retries() bug fixed. 

Bug fix for the problem of not checking the status the LM sends back on any resend of a ticket. Note: This version does not pass mylint.py. 

Cleanup. 

This version contains a few various changes. 1) Constants for verbose levels. 2) Checks on the max size for a file for a wrapper, volume and filesystem. 3) Max directory components can contain 199 instead of 200 (for the NULL). 4) All interfaces can now be listed in the enstore history page, not just the default interface. 5) The error information when an error occurs doing an atomic open is no longer thrown away. 6) First attempt at handling the bfid brands correctly. 

When an error occurs trying to atomically open the output file, these changes prevent the specific detailed information about the actuall error from being thrown out. 

Changed a default value. 

Fixed the occurence of the "no such file or directory' error that was being printed. Finished the library max filesize check. 

Fix for checking the filesystem during a read. 

Fixed a problem with testing the max file size a file system allows when writing. 

encp now checks the maximum file size the output file system allows. If the file size is greater, then the transfer is aborted. 

This version has a few changes. The maximum file/directory component can be 199 characters long instead of 200. The field used to report what machine was used in the transfer on the encp history page now uses 'data_ip' (if present) instead of 'host'. Other general changes. 

The changes in these 4 files enable encp to read/write large files. These changes have only been tested with null movers so far. 

Fixed a problem that would cause encp to loop inifinatly when trying to write. 

Fixed the behavior that caused the code to go into an infinite loop when the LM retured the VERSION_MISMATCH error on writes. 

bumping version to v2_14 because of encpCut 

These changes reflect checks on the filename to make sure it does not contain non-printable characters. In encp.py a second check has been introduced to check that each segment in every input files absolute path is less than 200 characters. 

check file size set in pnfs and produce and alarm if size is wrong 

bumping version to v2_13 because of encpCut 

[1] let pnfs file size to be set later than any other metadata, even later than the file permission is set. [2] deal with automounter, add --pnfs-is-automounted switch. [3] add 2G-2K file size limit, bump out if file is larger than the limit [4] force file size to be long int if it exceeds 2G (for 64 bit FS) 

set pnfs file size in the end after all other meta being set 

to make pychecker happy 

Fix a minor bug. When comparing two location cookies, only the last portion are compared. 

bumping version to v2_12 because of encpCut 

comment out 'Old file clerk format detected.' message 

Includes a number of fixes. Added a fix that checks data in the file clerk database against the data in pnfs layer 4. If the file clerk does not have the crc in its database, then a warning is printed, but encp will now continue instead of stop. 

Added a check to the read request consistancy check to forbid transfers when the file clerk database and pnfs layer 4 differ for a file. 

Contains fixes to two main problems. One, resends don't always resend. Two, uses enstore.conf for interface selection with udp (along with udp_client.py and host_config.py). 

Bug fix. Under some situations, the code would not actually resubmit/retry when it said it did. 

bumping version to v2_11 because of encpCut 

bumping version to v2_10 because of encpCut 

Fixed a bug that prevented encp from opening a local file if it didn't have both read and write permissions. 

Improved error handling when an error occurs trying to set the pnfs information when writing a file into pnfs. 

Fixed a bug in mover_handshake that caused a traceback. When building a string a comma was used instead of a percent sign. 

Tested to work with the protocol for the library manager to reject old encp clients attempting to connect. 

Fixed some issues when the file clerk only sends the "new" format. Some, code still looked in the old locations. 

Fixed the "Setting signal 0 to <function signal_handler at 0x834baa4> failed." error message encp printed to stderr. 

Added a try...except to help identify a "KeyError: mover" error. 

Catches an exception and dumps an error message to stderr. 

bumping version to x2_10 because of encpCut 

Same as previous version, but this one passes lint. 

In conjunction with the new pnfs.py, this version *should* resolve the "no library" bug. 

More general improvments. Replaced pass statements after excepts with sys.stderr.write()s. 

Fixed two tracebacks related to the changes made in the previous cvs version. TypeError: unpack non-sequence UnboundLocalError: Local variable 'EXfer_ticket' referenced before assingment 

Lots of code cleanup. Now uses Trace.message(). All Pychecker warnings in encp (not including imported modules) are gone. Uses the configuration client interface in a better and more standard method. 

I think this finally fixes the CRC bug. Extranious print statements still remain until proven it works. 

Same as last time. 

Latest attempt at the CRC error bug. 

Still test version. Fixes a bug to a fix that amazingly isn't the CRC error, but something else. Wrong spelling for the dictionary. 

Another attempt to discover the source of the CRC errors. 

TEST VERSION. No volume error fixed. Handling of alarms has been rolled into handle_retries. In theory this should fix the CRC MISMATCH errors. 

Test version to track down the double data access layer bug. 

New encp to test for bug fixes. NOVOLUME traceback. KeyError: bfid traceback. 

Contains some debugging output to track down some bugs. Perhapse some fixes if they work. 

Debugging version to track down no bfid errors. 

Includes the change that differentiates between retrying a transfer after a failure and resubmitting it if the mover hasn't called back. 

bumping version to v2_9 because of encpCut 

Delayed dismount can now be set using command line. Valid range is 0 to 10 (or specicfied by the mover) minutes. If --delayed-dismount is not given then None is sent to the mover, and the mover uses the default. 

Changed the "E"s to "W"s for errors inside XFer that get printed to the log file. Added a line to the log file output that prints out a similar message to resubmitions for retries after a failure. 

Should fix the mover did not return crc errors. 

Disable this "feature" reqarding leaving the zero length files when SIGTERM is caught. Will be enabled later. 

Fixed a bug with respect to resubmitions. 

Handles 'retries' and 'resubmitions' in their own appropriate way. RESUBMITTING is displayed instead of NET_ERROR because this confused people. NOACCESS errors are checked durring the transfer setup process, not just at the very beginning (on reads). The control socket is checked for messages just before encp would block trying to write. Most likely this is from a mount failure. 

THIS IS A BROKEN VERSION!!! Use at your own risk. 

Checks for NOACCESS errors along with control socket messages if an error occurs durring the pre-transfer setup. 

Prints out data access layer information instead of blanks when a NOACCESS error occurs. 

Log file changes have been coordinated with Eileen. There was no conflict. 

Added --pnfs-mount-point for use with the dcache. Other dcache improvments have been made. Rates reported to the user are calculated correctly now. Those changes needed for the log file to be changed still need to be coordinated with Eileen. 

This is a debug version to determine various net errors. Regular users should not use. 

Trying to fix various NET_ERRORs. Still investigating with these changes. 

Presumabley fixes error handling trying to set file permissions. If the output file doen't have zero length for dcache put, fail the transfer. Output more info to the log file in an attempt to track down various NET_ERRORs. 

Hacked in some code to work with initial testing of the dcache. 

Fixes the infinite loop error when the control socket fails to open on a read. 

Includes fix for the uncought "TCP connection close" bug that would occasionaly happen. 

bumping version to v2_8 because of encpCut 

Fixed exit status bug. Now it will return 1 for error, 0 for success instead of 0 every time. Fixed output of data access layer to actually output usefull info to the fields instead of blanks. Removed some newlines from text sent to the log file. The newlines are there for readability on the terminal and can screew up log file parsers that look for one entry per line. 

bumping version to v2_7 because of encpCut 

Will correctly catch the error when the file clerk and volume clerk return different 'external_labels". 

Last entry changes, only having actually saved the file first. 

Removed file size verification for writes. Everything used what the file clerk returned. So, comparing what the file clerk returns with what the file clerk returns is not necessary. 

I think errors reguarding mover failers not being detected have been fixed. Also, control-c's will remove zero lenght files. And if the file isn't transfered in tacted/entirity it is deleted to avoid leaving a zero length file. 

Fixed a bug involving KeyErrors in handle_retries(). Fixed another bug in handle_retires() by adding ValueError to the list of error for the try...except to catch when deleting something from a list. 

Test version to help catch a KeyError. 

Bug fixes (hopefully) for "TCP connection closes" and "KeyError: vc". 

Help debug a hard to replicate error. 

Changed how command line options (and their defaults) are passed to the rest of the program. Also, encp now utilizes a change in the return code from atomic.py to print usefull error messages. 

Bug fixed with respect to read verification. Bug fix with respect to getting the bfid for a write. Corrected verification for reads. Used to check some pnfs tags, no longer does that portion. 

New protocol established between encp and file clerk. 

Replaced all explicit upd sends (and associated recvs) with calls via the the associated client. Fixed a small bug in handle_retries(). 

check_crc will not break if encp wasn't given a 'complete_crc' value. 

Verification tests for valid request values have been sorted out as to which are read tests and write tests. priority and delayed dismount commands work again. 

Fixed some wrapper problems. Now gets wrapper from volume family. Volume information is obtained from the volume clerk. Before the file clerk would obtain the file info from itself and also query the volume clerk then send the two pieces of info to encp. 

Changed a few error handling reporting spots. Nothing Earth shatering, just trying to convey more meaning. 

Major changes in the code. Much has been functionalized. Big additions include: Verifying pnfs tags contain valid values. A check to make sure that the volume clerk and pnfs agree on which wrapper to use. More reliable and standardized error reporting. This includes getting rid of EPROTO's. 

Major changes in the code. Much has been functionalized. Big additions include: Verifying pnfs tags contain valid values. A check to make sure that the volume clerk and pnfs agree on which wrapper to use. More reliable and standardized error reporting. This includes getting rid of EPROTO's. 

revert to 1.343 

bumping version to v2_6 because of encpCut 

Simplifing the code. 

encp will no longer print errors when it will retry them again. The environmental variable "ENCP_DAQ" is checked and the data is put it the request ticket sent to the library manager. Two lines of questionable code (from a comment by cgw) have been commented out. They appear to be the cause of random 'socket.error's. 

Added a check to make sure that the external labels from the file clerk and the volume clerk for reads are the same. 

All uncaught errors now give a full traceback, instead of having them "caught" and print out useless information. "TCP connection closed None" errors are now handled. A few more spots in the code now exit calling print_data_access_layer_format. All connect() calls properly timeout if the connection fails as described by Stevens. 

Reset the timeout time to 15 minutes. Durring debugging it had been set to 20 seconds. 

Re-added a print queue line changing the level of verbosity needed to print it out. 

Removed a verbose line that printed out all the information for every transfer in the queue. 

This is a somewhat working version. It does work with real data. It is not known if it works with null data yet (or if it is a null mover bug). 

read_from_hsm: initialize retry_flag to 0 

log sockname and peername rather than socket (which isn't very interesting!) 

fix bug in outputfile_check 

add a lot of comments add TOTAL_TIME as a synonym for TIME2NOW (which should be deprecated) log some errors which were just being traced before alarm on an unhandled ENCP exception 

add a comment 

========== ratekeeper.py ====================================================================================

revert recent changes 

Various patches to bring the servers into alignment with dispatching_worker.py 1.189 and upd_server.py 1.56. 

========== pnfs_agent.py ====================================================================================

revert recent changes 

Various patches to bring the servers into alignment with dispatching_worker.py 1.189 and upd_server.py 1.56. 

use run_in_thread from dispatching_worker 

removed confusing log lessage 

========== enstore_functions2.py ====================================================================================

Use socket.getfqdn() instead of socket.gethostbyname() in fullpath() and fullpath2(). 

Added is_migration_file_family(), is_duplication_file_family() and is_migration_related_file_family() functions. 

========== scanfiles.py ====================================================================================

Catch exception to avoid deadlock. The exception itself is not understood, since root should never fail to set an effective ID; thus more error reporting is also added. 

Patched such that Ctrl-C works again. Also, moved file system related calls to use file_utils.py. 

Avoid tracebacks for partially written layer 4 information. Also, handle the situation for mulitple copy files that have attempted to be migrated. 

1) Added code to give more accurate errors and warnings for files in the middle states of being migrated/duplicated. 2) Added the ability to make additional duplicates. This would involve making a _copy_2 file if the _copy_1 duplicate already exists. 3) Patched get_pnfsid() to use file_utils.open(). 

Deal with some reporting issues regarding migration/duplication files. 

Correctly identify situations were the duplicated files primary/copy status is out-of-sync between layer 4 and the active_files_copy table. Also, correctly identify where migration files are out-of-sync between layer 4 and the migration table. 

========== mover.py ====================================================================================

Added library_list and current_priority to library manager ticket in disk mover 

Return correct errors when assert fails.(bugzilla ticket 460) Also changed some trace lavels. 

Removed locally defined CRC_ERROR and replaced it with e_errors.CRC_ERROR Code review followup for ticket 463 

Mover incorrectly alarmed CRC error when encp interrupts transfer (ticket 463) 

In assert mode mover was failing when encp was gone because self.header_labels was not defined (bugzilla #430) 

For cern wrapper mover was incorrectly treating interrupted writes (ENCP_GONE). This was causing a tape to get set to NOACCESS. (bugzilla #430). This pacth fixes this problem. Additional changes: changed trace levels for often repeated output to deeper levels. 

revert recent changes 

Various patches to bring the servers into alignment with dispatching_worker.py 1.189 and upd_server.py 1.56. 

Changes in responce to code review comments: 1. Added comments to log_processes 2. Changed the order of set_system_readonly and Trace.alarm in some places. 

1. Change error logging to alarming for cases when tape is set to readonly due to write error. 2. Set tape to NOACCESS when it is set to readonly. This change may be reverted later. 3. log all running processes when write error occurs. Add log_processes method These modifications address problem tickets: 349, 350, 352 

Replaced string exceptions with exception class. Python does not support string exceptions beginning with version 2.6 

1. Chaged controll socket connect timeout from 15 to 5 and the number of retries from 4 to 3 This should be more than enough. ENCP should already wait for connection. 2. Changed data socket connection to from 60s to 20s. This also should be enough. 

added current_time to lm ticket 

fixed crc check drivestat log message 

new drivestat log message format 

========== callback.py ====================================================================================

Added function get_unacked_packet_count(). This function returns the number of un-ACKed packets on the sender side. 

Patched generic_client and dispatching_worker to extend the client/server protocol to handle messages that are too long for UDP. The send() function in generic_client.py was modified and so was dispatching_worker.send_reply(). The function callback.connect_to_callback() handles most of the connection issues to establish the socket connection. This is for the opposite side of the already existing callback.get_callback() function. The connect_to_callback() function is used by generic_client.send(). In dispatching_worker.py, send_reply() may call the new function send_reply_with_long_answer() if reply_to_caller() fails becuase the reply message is too long. 

Converted udp_client.UDPError and callback.TCPError to be replaced by e_errors.EnstoreError. 

========== udp_client.py ====================================================================================

chnged trace 

Be more verbose in the unit_test output. Include the current thread name, and callback address in that output. 

Moved the thread_specific_data to a member of UDPClient() class instead of being a global. 

Removed use of the local Container() class to hold thread specific data and replaced it with the threading.local() class. Also, modified the unit test to instantiate the UDPclient() class in one thread, but run the send/receive test in another. This is in response to bug #367. 

Catch a key error trying to delete a sometimes non-existent ID from a list of transaction IDs. 

Added parameter exponential_to to send() by default exponential_to is set to False if set to True in indefinite retry mode the timeout will grow exponentially Otherwise in indefinite retry mode the timeout will be constant 

Handle the situation where a message, using repeat_deferred(), is going to be sent, but it has already been accepted by another thread and no longer in the sent-but-not-received queue. 

Added recv_deferred2(). This returns a tuple of the message and the transaction ID instead of just the message like recv_deferred() returns. 

Use expnential reply timeout only if initial timeout is set to 0. Which means: try forever. 

Converted udp_client.UDPError and callback.TCPError to be replaced by e_errors.EnstoreError. 

1. Use same timestamp for all messages for the same UDPClient object as was set originally 2. Do not include txn_counter into message id. These changes are done to identify "retried" messages in rawUDP 

create a new time stamp for each message. Before it was creted once, when UDPClient object was created 

Make message identifier unique for multithreded processes. 

Added functions repeat_deferred() and drop_deferred(). They are used when the caller schedules its own resending timeout schedule. 

Grow receive respose timeout by 2^n, where n - number of retries. The growth stops when n==MAX_EXPONENT MAX_EXPONENT=6 

Raise UDPError instead of errno.errorcode[errno.ETIMEDOUT]. This is to avoid raising string exceptions that python 2.6 no longer supports. 

========== ftt_driver.py ====================================================================================

Replaced string exceptions with exception class. Python does not support string exceptions beginning with version 2.6 

========== media_changer_client.py ====================================================================================

Return the location information for STK robots for the --show-volume command. 

Get --eject and --insert working for media_changer_client. Added --ioarea and --remove for media_changer_client. 

Converted udp_client.UDPError and callback.TCPError to be replaced by e_errors.EnstoreError. 

========== migration_summary_plotter_module.py ====================================================================================

Added a comment explaining why some min() functions were changed to max() functions. It explains that for migrated, recycled and migrated (again) tapes XXOO00 contains the combined volume history for XXOO00 and XXOO00.deleted and that max() is needed to correctly reported their dates of migration. 

1) Corrected the started and migrated totals reported. 9940 tapes migrated and recycled back to 9940 tapes were resulting in an under-reported values. 2) The closed total was over-reporting the numbers. As long as one destination tape was scanned and recorded in the migration_history table the source tape was reported as scanned. Now it checks that at least one destination tape was scanned and closed AND that no source-to-destination pairs are left unclosed for the source tapes. 

========== delete_at_exit.py ====================================================================================

Removed the now unused Container class. 

Replaced the local Container() class for providing thread specific data with the threading.local() class. 

Modified the detection of stale information in the thread_specific_data object. Added an explicit test in get_deletion_lists() if the obtained container object's thread ID does not match the current thread's ID. 

Don't depend on SIGRTMIN to be defined, but use it if available. 

Linux uses some signals not included in signal.h (and not included in the python signal module either) that are used to syncronize information between threads (like updating the uid & gid). We shouldn't install our own signal handlers for these signals. 

========== enstore_constants.py ====================================================================================

Added a comment per code review for ticket 435 

Moved some common for library_manager.py and volume_clerk.py constants to enstore_constants.py This was done as followup on library_manager.py code review for LM scalability, bugzilla ticket 435 

added new constant : FILE_DELETED_FLAGS list of supported delete flags check value of deleted string in file_clerk_client and file_clerk. 

Fixed the rate constants for LTO3 and LTO4 drives. The new values match those in the configuration. 

========== cern_wrapper.py ====================================================================================

replaced string exceptions 

========== pnfs.py ====================================================================================

Restrict a user from setting a file_family tag to end in -MIGRATION or _copy_# as these are mangled migration/duplication file_family patterns. This is for bugzilla #143. 

Added a flags argument to atomic.open2() to match that of the os.open() function. Modified file_utils.py, pnfs.py and enmv.py to use the new format. 

Handle the empty string passed as a pathname to is_pnfs_path(). 

Use file_utils.py functions open(), chown(), chmod(), utime() and remove() instead of the python provided versions. 

========== volume_clerk_client.py ====================================================================================

Provided a mechanism for talking to the file_clerk or volume_clerk instead of the info_server. The default remains the info_server for commands that don't modify anything, but allowing a means for the clerks to be used in testing is useful. The trigger is --force on the command line; --force will not be listed by --help. 

Added these functions to support migration working through the volume clerk: list_migrated_files() list_duplicated_files() set_migration_history() set_migration_history_closed() 

These changes have these Enstore servers using dispatching_worker.send_reply_with_long_answer() instead of their local copy of this function. Also, the commented out duplicated code has been removed too. 

========== get.py ====================================================================================

Major bug 147 addressed. encp.py revision 1.889 introduced a defect that only effected encp when encp_admin.py, encp_user.py or encp_user2.py were used to make a frozen version. The problem was that encp would always return 0, even for failures. 

Removed most (but not quite all) traces of string exceptions. 

========== ftt.py ====================================================================================

beginning with swig 1.3.21 the list is returned instead of tuple this workaround fixes the incompatibility issue 

========== log_server.py ====================================================================================

revert recent changes 

Various patches to bring the servers into alignment with dispatching_worker.py 1.189 and upd_server.py 1.56. 

========== accounting_server.py ====================================================================================

revert recent changes 

Various patches to bring the servers into alignment with dispatching_worker.py 1.189 and upd_server.py 1.56. 

========== encp_admin.py ====================================================================================

Major bug 147 addressed. encp.py revision 1.889 introduced a defect that only effected encp when encp_admin.py, encp_user.py or encp_user2.py were used to make a frozen version. The problem was that encp would always return 0, even for failures. 

========== inquisitor.py ====================================================================================

revert recent changes 

Various patches to bring the servers into alignment with dispatching_worker.py 1.189 and upd_server.py 1.56. 

revert back from combining two exceptions into tuple. Sasha explained that this might have unpredictable behaviour when we switch to python 2.6.2 

BUG FIX: Fixed uninitialized variable use. Name threads as "class_name.method_name" 

remove confusing log message 

========== file_clerk_client.py ====================================================================================

The commands --find-original, --find-the-original, --find-duplicates, --find-all-copies and --find-copies commands are now available to users through the info server. Admins can now use them using the "enstore file" or "enstore info" commands (though the "enstore file" variants points to the info server). In addition to this the enstore info --show-copies now works like it was supposed to. 

http://www-ccf.fnal.gov/Bugzilla/show_bug.cgi?id=422 take into account Mike's comments: 

Provided a mechanism for talking to the file_clerk or volume_clerk instead of the info_server. The default remains the info_server for commands that don't modify anything, but allowing a means for the clerks to be used in testing is useful. The trigger is --force on the command line; --force will not be listed by --help. 

added new constant : FILE_DELETED_FLAGS list of supported delete flags check value of deleted string in file_clerk_client and file_clerk. 

Added these functions to support migration working through the file clerk: find_migration_info() set_copied() unset_copied() set_swapped() unset_swapped() set_checked() unset_checked() set_closed() unset_closed() 

These changes have these Enstore servers using dispatching_worker.send_reply_with_long_answer() instead of their local copy of this function. Also, the commented out duplicated code has been removed too. 

Corrected the --mark-bad and --unmark-bad help strings to be more useful. Specifically in the area of when the optional [bfid] parameter should/needs to be included. 

Handle records with empty paths and pnfsid to avoid tracebacks. 

Some seteuid() patches to make --restore work in more situations. 

========== library_manager.py ====================================================================================

On line 3120 Trace.alarm was replaced with Trace.log (ticket # 454) 

Corrected a bug found during code review of bugzilla ticket 431. 

More changes to make Admin (HIPRI) requests to correctly override regular priority requests. 

Fixed bug in mover_error "IDLE" instead of IDLE 

Fixed bug in get_host_name_from_ticket 

created a method get_host_name_from_ticket to replace multiple occurences of the same code, recommended by Michael. 

1. Backed off to rev. 1.658 2. If there are idle movers then do not attempt to preempt a volume, for which last work had regular pririty, by Admin Priority request. This dimishes the number of mounts/dismounts and improves the overall rates. 

In restric_host_access try to get hostname from callback address, this is important for multihomed hosts. 

Changed list to look in for busy movers in restrict_host_access. (bugzilla # 431) 

Do not make preemptive tape dismount if admin priority request is for would get rejected by discipline for idle mover. (bugzilla # 431) 

revert recent changes 

Various patches to bring the servers into alignment with dispatching_worker.py 1.189 and upd_server.py 1.56. 

When mover is removed from at_movers list do not send alarm, just log the error 

in check send alarm only once 

comments corrected 

Library manager may not be able to respond to a mover on time which results in the mover retry message. The mover requests may also be kept in the udp buffer before getting processed by the library manager. Both cases result in sending a work to the mover and then removing work from the active list as a result of the second idle request to avoid this problem compare the time of the mover request submission with the time when the work for the same mover became active. This code requires a new key in the mover ticket 

send alarm for a given transfer only once 

Do not remove work from active list, only send an alarm. Removing from active list causes tape mounts while they are still in use in another drive. 

========== udp_server.py ====================================================================================

revert recent changes 

Removed some debugging output. 

udp_server.py: 1) Eliminated self.reply_address, self.current_id and self.client_number since they are not thread safe. 2) Added reply_to_caller2(). Differs from reply_to_caller() by taking two arguments, the first is the object to send, the second is a dictionary with the 'r_a' element. 3) Added a self.tsd (Thread Safe Data) member variable. Created the init_thread_specific_data() function to handle the initializing of the thread specific data. dispatching_worker.py: 1) Eliminated use of self.reply_address and other self.xxx member varialbles, since they are not threadsafe. 2) Updated invoke_function() to handle starting a function in another thread/process if the function name is in the self.run_in_parallel list. The default is to run it in the main thread. 3) Extend self.tsd.is_child to include spawned threads. 4) Added __getattr__() and __setattr__() to handle looking at self.xxx or self.tsd.xxx. 5) Removed dispatching_worker.run_in_thread(). dispatching_worker.DispatchingWorker.run_in_thread should be used instead. 

code review followup (bugzilla ticket 284) 1. Removed enable_raw_queue_print 2. Added comments for disable_reshuffling 3. in send_with_list do not send a reply if deepcopy failed 

1. Added fuctions to control rawUDP 1.1. enable_raw_queue_print() - for debugging 1.2. disable_reshuffle() - when reinserting ticket into incoming queue do not change thge original place in the queue - this done for better processing of mover requests 1.3. set_keyword() - address messages in the queue by specified keyword instead of message id - this is for mover requests. Keyword: "mover" 2. in reply_with list() wrap list_copy = copy.deepcopy(list) into try...except see comments in reply_with list() for details. 

socket.sendto() silently truncates long UDP messages in python 2.4. In 2.6 an exception is raised. This patch catches long messages before they are truncated and raises the exception. 

Removed Trace.handle_error() calls. Now that dispatching_worker and generic_client can handle long messages, these errors need to be passed up to those layers so that they can do the correct thing. 

Modifications after code inspection. 1. Changed a raw message format. Not it is : (message, (sender_ip, sender_port)) 2. Use Types 

If using rwaUDP rawUDP.receiver starts in serve_forever method. This is done to provide spawning receiver thread (process) in a thread. Before it was done when UDPServer onbject was created (in main thread) 

added monitor 

Do not check message if used with rawUDP, because it is already checked in rawUDP 

changed trace statement 

process NameError and ValueError that could be risen by r_eval for envent_relay messages 

Turned on selection of rawUDP or rawUDP_p depending on python version 

Some message processing was moved out of _get_raw_message to rawUDP:put 

========== pnfs_agent_client.py ====================================================================================

Added some ifs to detect errors in some functions that were missing them. Added some Trace.log() calls to get_stat and get_pnfsstat() to furthur understand a reported traceback. Both changes are related to bugzilla #469. 

Use the default timeout and retry values while waiting for responses from the pnfs_agent. 

========== encp_user.py ====================================================================================

Major bug 147 addressed. encp.py revision 1.889 introduced a defect that only effected encp when encp_admin.py, encp_user.py or encp_user2.py were used to make a frozen version. The problem was that encp would always return 0, even for failures. 

========== file_utils.py ====================================================================================

intriduce euid/geuid protected wrapper to call os module functions should replace many functions in this module. 

Make set_euid_egid reset the euid back to root if the egid needs to be changed, otherwise we don't have the permissions to change the egid. 

1) added function rmdir to file_utils that effectively executes "rm -rf path" 2) modified checkdb.py so that it cleans up after itself not leaving old stuff behind. This change makes it immune to postgresql version changes 

These changes are in response to Sasha's review comments in preperation for releasing encp v3_9. Any exceptions from os.seteuid() and os.setegid() are now caught, the lock released and then the exception is re-raised. Also, the descriptive comment for the listdir() function was corrected. 

Added a wrapper for os.listdir(). Also, added an option to get_stat() to be able to use os.stat() by default or os.lstat() if need be. 

Added a flags argument to atomic.open2() to match that of the os.open() function. Modified file_utils.py, pnfs.py and enmv.py to use the new format. 

Added functions: open(), chmod(), chown(), utime() and remove() to handle locking the use of os.seteuid() around file operations. 

If the new euid and egid already are correct, skip setting it again. 

Refine the seteuid locking code. 

</pre></body></html>
