BmnRoot
Loading...
Searching...
No Matches
file_inspector.py File Reference

Go to the source code of this file.

Namespaces

namespace  file_inspector
 

Functions

 file_inspector.argument_parser ()
 
 file_inspector.add_failed_check (inspection_check_id, file_guid, error_type, error_details, conn)
 
 file_inspector.transfer_file (source_cluster, source_storage, source_file_path, source_xrootd_url, source_file_size, source_file_checksum, destination_cluster, destination_storage, destination_file_path, destination_xrootd_url, transfer_protocol_code, source_ssh_prefix, destination_ssh_prefix, start_tmp_dir, conn)
 
 file_inspector.check_files (file_list, catalogue_files, cluster_name, storage_name, xrootd_url, access_protocol, ssh_prefix, full_check, catalogue_matches, start_tmp_dir, conn, inspection_check_id)
 
 file_inspector.define_transfer_protocol (so_transfer_protocol, si_transfer_protocol, oi_transfer_protocol, io_transfer_protocol)
 
 file_inspector.compare_storages (inspect_cluster, inspect_storage, inspect_storage_path, inspect_xrootd_url, origin_cluster, origin_storage, origin_storage_path, origin_xrootd_url, replica_flags, start_cluster, start_tmp_dir, si_check_protocol, si_transfer_protocol, si_ssh_prefix, conn)
 
 file_inspector.send_email (from_address, mail_address, subject, body)
 

Variables

str file_inspector.mail_address = "gertsen@jinr.ru"
 
str file_inspector.function_file_path = os.path.dirname(os.path.realpath(__file__)) + "/../function_set.py"
 
 file_inspector.code = compile(source_file.read(), function_file_path, "exec")
 
 file_inspector.config = json.load(open("file_inspector.json"))
 
 file_inspector.conn = psycopg2.connect(("dbname=%s user=%s host=%s password=%s") % (config["db_name"], config["db_user"], config["db_host"], config["db_pass"]))
 
 file_inspector.cursor = conn.cursor()
 
 file_inspector.cursor_result = cursor.fetchall()
 
 file_inspector.cluster_dictionary = list(chain(*cursor_result))
 
list file_inspector.storage_dictionary_expanded = ["*"]
 
list file_inspector.storage_dictionary = []
 
int file_inspector.cnt_all_files = 0
 
 file_inspector.start_cluster
 
 file_inspector.inspect_storage_address
 
 file_inspector.storage_2cron_address
 
 file_inspector.cluter_host = socket.gethostname()
 
 file_inspector.start_tmp_dir
 
 file_inspector.start_ssh_prefix
 
 file_inspector.current_script_path = os.path.realpath(__file__)
 
str file_inspector.storage_2cron_cluster = "*"
 
str file_inspector.storage_2cron_storage = "*"
 
 file_inspector.storage_2cron_array = storage_2cron_address.split(":")
 
str file_inspector.storage_request = "select s.check_interval,s.cluster_name,s.storage_name from storage_ s "
 
 file_inspector.storage_2cron_list = cursor.fetchall()
 
 file_inspector.process_output = process_output.strip()
 
 file_inspector.process_error
 
 file_inspector.process_returncode
 
 file_inspector.inspect_storage_array = inspect_storage_address.split(":")
 
 file_inspector.inspect_cluster = inspect_storage_array[0]
 
 file_inspector.inspect_storage = inspect_storage_array[1]
 
 file_inspector.inspection_starttime = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
 
 file_inspector.inspect_storage_path
 
 file_inspector.inspect_storage_type
 
 file_inspector.inspect_xrootd_url
 
 file_inspector.inspect_storage_interval
 
 file_inspector.inspect_storage_full
 
 file_inspector.check_flags
 
 file_inspector.replica_cluster
 
 file_inspector.replica_storage
 
 file_inspector.replica_flags
 
 file_inspector.inspect_ssh_prefix
 
 file_inspector.si_check_protocol
 
 file_inspector.si_transfer_protocol
 
bool file_inspector.full_check = False
 
 file_inspector.catalogue_files = cursor.fetchall()
 
list file_inspector.catalogue_matches = []
 
 file_inspector.catalogue_file_count = len(catalogue_files)
 
 file_inspector.inspection_check_id = cursor.fetchone()[0]
 
 file_inspector.all_files = glob.glob(inspect_storage_path + '/**/*', recursive=True)
 
bool file_inspector.ssh_failed = True
 
 file_inspector.returncode
 
 file_inspector.xrd_file_list = get_files_xrd(inspect_storage_path, inspect_xrootd_url)
 
 file_inspector.eos_file_list = get_files_eos(inspect_storage_path, inspect_xrootd_url)
 
tuple file_inspector.delete_absent_files = ("d" in check_flags)
 
 file_inspector.catalogue_file_guid
 
 file_inspector.catalogue_file_path
 
 file_inspector._
 
 file_inspector.replica_storage_path
 
 file_inspector.replica_xrootd_url
 
 file_inspector.inspection_endtime = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
 
 file_inspector.found_errors = cursor.fetchone()[0]
 
str file_inspector.from_address = "<inspector@jinr.ru>"
 
str file_inspector.subject = "File Inspector - Integrity Results"
 
tuple file_inspector.body