{"action":"created","issue":{"url":"https://api.github.com/repos/dmwm/CRABServer/issues/4774","labels_url":"https://api.github.com/repos/dmwm/CRABServer/issues/4774/labels{/name}","comments_url":"https://api.github.com/repos/dmwm/CRABServer/issues/4774/comments","events_url":"https://api.github.com/repos/dmwm/CRABServer/issues/4774/events","html_url":"https://github.com/dmwm/CRABServer/issues/4774","id":70372465,"number":4774,"title":"Make sure we can run (and debug) the PreJob","user":{"login":"mmascher","id":1586246,"avatar_url":"https://avatars.githubusercontent.com/u/1586246?v=3","gravatar_id":"","url":"https://api.github.com/users/mmascher","html_url":"https://github.com/mmascher","followers_url":"https://api.github.com/users/mmascher/followers","following_url":"https://api.github.com/users/mmascher/following{/other_user}","gists_url":"https://api.github.com/users/mmascher/gists{/gist_id}","starred_url":"https://api.github.com/users/mmascher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmascher/subscriptions","organizations_url":"https://api.github.com/users/mmascher/orgs","repos_url":"https://api.github.com/users/mmascher/repos","events_url":"https://api.github.com/users/mmascher/events{/privacy}","received_events_url":"https://api.github.com/users/mmascher/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-04-23T10:28:35Z","updated_at":"2015-04-23T10:47:29Z","closed_at":null,"body":"This recipe is broken with the recent changes: https://twiki.cern.ch/twiki/bin/view/CMSPublic/Crab3OperatorDebugging#To_run_a_pre_job_on_the_schedd\r\n\r\nI had to change the permission of the prejob log directory [1], and the resubmit_info dir. Besides, the .job.ad is not there [2] and I had to recreate a new .job.ad file with `sudo condor_history -l 2248902.0 > /tmp/.job.ad`. If there is no other way at least this should be documented.\r\n\r\n[1]\r\n```\r\nGot a fatal exception: [Errno 13] Permission denied: '/data/srv/glidecondor/condor_local/spool/467/0/cluster2250467.proc0.subproc0/prejob_logs/prejob.3.1.txt'\r\nTraceback (most recent call last):\r\n  File \"/usr/lib64/python2.6/runpy.py\", line 122, in _run_module_as_main\r\n    \"__main__\", fname, loader, pkg_name)\r\n  File \"/usr/lib64/python2.6/runpy.py\", line 34, in _run_code\r\n    exec code in run_globals\r\n  File \"/data/srv/glidecondor/condor_local/spool/467/0/cluster2250467.proc0.subproc0/TaskWorker/TaskManagerBootstrap.py\", line 96, in <module>\r\n    retval = bootstrap()\r\n  File \"/data/srv/glidecondor/condor_local/spool/467/0/cluster2250467.proc0.subproc0/TaskWorker/TaskManagerBootstrap.py\", line 28, in bootstrap\r\n    return PreJob.PreJob().execute(*sys.argv[2:])\r\n  File \"TaskWorker/Actions/PreJob.py\", line 440, in execute\r\n    fd_prejob_log = os.open(prejob_log_file_name, os.O_RDWR | os.O_CREAT | os.O_TRUNC, 0644)\r\nOSError: [Errno 13] Permission denied: '/data/srv/glidecondor/condor_local/spool/467/0/cluster2250467.proc0.subproc0/prejob_logs/prejob.3.1.txt'\r\n```\r\n\r\n[2]\r\n```\r\nTraceback (most recent call last):\r\n  File \"TaskWorker/Actions/PreJob.py\", line 156, in get_task_ad\r\n    self.task_ad = classad.parseOld(open(os.environ['_CONDOR_JOB_AD']))\r\nIOError: [Errno 2] No such file or directory: '.job.ad'\r\n```"},"comment":{"url":"https://api.github.com/repos/dmwm/CRABServer/issues/comments/95536171","html_url":"https://github.com/dmwm/CRABServer/issues/4774#issuecomment-95536171","issue_url":"https://api.github.com/repos/dmwm/CRABServer/issues/4774","id":95536171,"user":{"login":"juztas","id":646582,"avatar_url":"https://avatars.githubusercontent.com/u/646582?v=3","gravatar_id":"","url":"https://api.github.com/users/juztas","html_url":"https://github.com/juztas","followers_url":"https://api.github.com/users/juztas/followers","following_url":"https://api.github.com/users/juztas/following{/other_user}","gists_url":"https://api.github.com/users/juztas/gists{/gist_id}","starred_url":"https://api.github.com/users/juztas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juztas/subscriptions","organizations_url":"https://api.github.com/users/juztas/orgs","repos_url":"https://api.github.com/users/juztas/repos","events_url":"https://api.github.com/users/juztas/events{/privacy}","received_events_url":"https://api.github.com/users/juztas/received_events","type":"User","site_admin":false},"created_at":"2015-04-23T10:47:29Z","updated_at":"2015-04-23T10:47:29Z","body":"From 8.3.2 version job.ad is written by schedd and yes, it is owned by root. If it would be not owned by root, IIRC it will allow to do condor_ssh_to_job for anyone and we don't want that. "}}