[gridengine users] issues with USERNAME variable in batch jobs
iqtcub at gmail.com
Tue Nov 22 10:21:59 UTC 2011
On 11/22/2011 10:44 AM, Reuti wrote:
> Am 22.11.2011 um 10:03 schrieb iqtcub:
>> Hi all,
>> We're having an issue in our cluster. We are running SLES10 and SLES11 in the execution hosts(each OS separated with hostgroups, with each hostgroup having its own queue), with LDAP. Our SGE version is GE6.2u5.
>> I've done a simple script that runs 'env'. The problem is that in some nodes, the USERNAME variable has root as value, while in other nodes it isn't defined at all.
>> In a node that the USERNAME isn't defined, if i restart the sge_execd daemon, now it gets defined.
> The sge_execd will inherit the variables which are defined when it's started. If it's started via init, nothing (or at least less) is defined. If you log in as root and start it, all variables set at that time will be inherited.
> You can check `man sge_conf` topic "INHERIT_ENV" to control the behavior.
> -- Reuti
>> All the nodes use the same image, so everything is exactly the same, except the name of the node(it gets defined using dhcp).
>> The sge_execd daemon gets executed as the sgeadmin user, which is a local user.
>> The problem comes since we have something setup in /etc/profile, to ignore some stuff we manually set. But again, the /etc/profile is the same on all nodes.
>> Thanks, if you need more info let me know.
>> users mailing list
>> users at gridengine.org
Thanks for the answers!
- Petter, LOGNAME works, so we'll use that instead of USERNAME
- Reuti, thanks for the explanation, you are right. We started the
sge_execd daemons using different methods, so that was it.
More information about the users