dmwm/CRABClient — pull request #4351 by AndresTanasijczuk (2014-12-11 12:19:07+00:00)
Title: Get username from SiteDB when uploading log file.

Tests:

$ crab uploadlog -d crab_test_cmscp_no_local_stgout_tlT_toT_1
Fetching user enviroment to log file
Uploading log file...
Success: Log file uploaded successfully.
Retrieving username from SiteDB...
Username is: atanasi
Will append the username in the log file URL.
Log file URL: https://cmsweb-testbed.cern.ch/crabcache/logfile?name=141210_153826_crab3test-5:atanasi_crab_test_cmscp_no_local_stgout_tlT_toT_1.log&username=atanasi
Log file is /afs/cern.ch/work/a/atanasi/CRAB3-tutorial/CMSSW_7_0_5/src/crab_test_cmscp_no_local_stgout_tlT_toT_1/crab.log

In case of not being able to retrieve username from SiteDB:
$ crab uploadlog -d crab_test_cmscp_no_local_stgout_tlT_toT_1
Fetching user enviroment to log file
Uploading log file...
Success: Log file uploaded successfully.
Retrieving username from SiteDB...
Error: Unable to retrieve username from SiteDB.
Note: Make sure you have the correct certificate mapped in SiteDB (you can check what is the certificate you currently have mapped in SiteDB by searching for your name in https://cmsweb.cern.ch/sitedb/prod/people). For instructions on how to map a certificate in SiteDB, see https://twiki.cern.ch/twiki/bin/viewauth/CMS/SiteDBForCRAB.
Warning: The log file URL printed below misses the username.
Log file URL: https://cmsweb-testbed.cern.ch/crabcache/logfile?name=141210_153826_crab3test-5:atanasi_crab_test_cmscp_no_local_stgout_tlT_toT_1.log
Log file is /afs/cern.ch/work/a/atanasi/CRAB3-tutorial/CMSSW_7_0_5/src/crab_test_cmscp_no_local_stgout_tlT_toT_1/crab.log