Bug 615504

Summary: condor_chirp relies on getenv("_CONDOR_SCRATCH_DIR")
Product: Red Hat Enterprise MRG Reporter: Matthew Farrellee <matt>
Component: condorAssignee: Matthew Farrellee <matt>
Status: CLOSED ERRATA QA Contact: Martin Kudlej <mkudlej>
Severity: high Docs Contact:
Priority: high    
Version: 1.2CC: fnadge, mkudlej
Target Milestone: 1.3   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Previously, condor_chirp could not find its configuration when run from job hooks due to an insufficient definition of the CONDOR_SCRATCH_DIR for job hooks. With this update, the condor_chirp runs as expected.
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-10-14 16:09:04 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Matthew Farrellee 2010-07-16 21:02:00 UTC
Description of problem:

condor_chirp cannot find its config when run from job hooks.

_CONDOR_SCRATCH_DIR is not defined for job hooks. Using condor_chirp within the HOOK_UPDATE_JOB_INFO requires setting _CONDOR_SCRATCH_DIR=$PWD explicitly. Two ways around this issue: 1) set _CONDOR_SCRATCH_DIR for hooks; 2) allow condor_chirp to search CWD as well as _CONDOR_SCRATCH_DIR for chirp.config


Version-Release number of selected component (if applicable):

7.4.4-0.4


How reproducible:

100%


Steps to Reproduce:

1. Config,

   PRIV_HOOK_UPDATE_JOB_INFO = /opt/hook-privs/hook_update_job_info.sh

2. /opt/hook-privs/hook_update_job_info.sh

#!/bin/sh
LOG=/tmp/hook-priv.log
env >> $LOG
/usr/libexec/condor/condor_chirp set_job_attr ChirpHook $(date | tr ' :' '_.') 2>> $LOG
exit $?

3. Run a job.

   echo 'cmd=/bin/sleep\nargs=1d\n+wantioproxy=true\n+hookkeyword="priv"\nqueue' | condor_submit


Actual results:

$ cat /tmp/hook-priv.log

TERM=xterm
_CONDOR_ANCESTOR_1600=2871:1278810651:3740169993
CONDOR_PARENT_ID=woods:29097:1279310098
CONDOR_PROCD_ADDRESS_BASE=/var/run/condor/procd_pipe
PATH=/sbin:/usr/sbin:/bin:/usr/bin
PWD=/var/lib/condor/execute/dir_29097
LANG=en_US.UTF-8
_CONDOR_EXECUTE=/var/lib/condor/execute
SHLVL=3
CONDOR_INHERIT=29097 <127.0.0.1:35543> 0 0
_CONDOR_ANCESTOR_29097=29614:1279310866:2862494259
_CONDOR_ANCESTOR_2871=29097:1279310098:3155706933
CONDOR_PROCD_ADDRESS=/var/run/condor/procd_pipe.STARTD
_=/bin/env
Can't open (null)/chirp.config file
cannot chirp_connect to shadow


Expected results:

$ condor_q -l | grep -i chirp
ChirpHook = Fri_Jul_16_16.56.02_EDT_2010

Comment 1 Matthew Farrellee 2010-07-16 23:38:13 UTC
https://condor-wiki.cs.wisc.edu/index.cgi/tktview?tn=1511

Built post 7.4.4-0.4

Comment 3 Martin Kudlej 2010-09-15 15:38:31 UTC
I've tested it on RHEL 5.5/4.8 x i386/x86_64 with condor-7.4.4-0.4 and I've seen Can't open (null)/chirp.config file
cannot chirp_connect to shadow
in /tmp/hook-priv.log.

I've tested it on RHEL 5.5/4.8 x i386/x86_64 with condor-7.4.4-0.9 and there is no error like above. -->VERIFIED

Comment 4 Florian Nadge 2010-10-07 15:28:21 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Previously, condor_chirp could not find its configuration when run from job hooks due to an insufficient definition of the CONDOR_SCRATCH_DIR for job hooks. With this update, the condor_chirp runs as expected.

Comment 6 errata-xmlrpc 2010-10-14 16:09:04 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2010-0773.html