[torquedev] reverting 'hostname -f' change in torque.setup from September

Brian Pendleton bpendleton at clusterresources.com
Fri Nov 30 11:33:52 MST 2007


Here's why the change was originally checked in:

The torque.setup script will fail on any GNU system where the server's  
full dns name is listed in the first column of /etc/hosts.
For example:

bpendleton at server:~$ hostname
server

bpendleton at server:~$ cat /var/spool/torque/server_name
server

bpendleton at server:~$ head /etc/hosts
127.0.0.1       localhost.localdomain localhost
192.168.0.1     server.domain          server

bpendleton at server:~$ echo set server operators += bpendleton at server | qmgr  
-a
Max open servers: 4
qmgr obj= svr=default: Bad ACL entry in host list MSG=First bad host:  
server

The command 'set server operators += bpendleton at server' will fail in the  
torque.setup script.  It appears that when torque checks the ACL, it will  
only check against the first column of the host in /etc/hosts, causing the  
check to fail even though it should succeed.  CRI support ran into this  
issue with customers fairly regularly, so a change was made to the setup  
script which fixed the issue.  If hostname -f isn't portable, it should  
removed, but a fix still needs to be implemented so that customers don't  
run into this issue.  A better fix might be to fix the ACL check so that  
it accepts all columns of /etc/hosts as valid.

Please let me know if I can provide you with more information or be of any  
assistance on this issue.

Thanks,
-Brian Pendleton


On Thu, 29 Nov 2007 10:37:41 -0700, Garrick Staples <garrick at usc.edu>  
wrote:

> I'm reverting this change because 'hostname -f' only works on GNU  
> systems (it
> will set the hostname to "-f" on other systems).  Even if that wasn't a
> problem, it doesn't seem to make sense anyways.
>
> ------------------------------------------------------------------------
> r1544 | bpendleton | 2007-09-05 13:45:14 -0700 (Wed, 05 Sep 2007) | 2  
> lines
>
> Added check to try long hostname if short hostname fails when setting  
> server operators.
>
>
> Index: torque.setup
> ===================================================================
> --- torque.setup        (revision 1544)
> +++ torque.setup        (revision 1543)
> @@ -30,18 +30,12 @@
> pbs_server -t create
> -echo set server operators += $USER | qmgr -a  2> /dev/null
> +echo set server operators += $USER | qmgr
> if [ "$?" -ne "0" ] ; then
> -  USER=$1@`hostname -f`
> -  echo set server operators += $USER | qmgr -a
> -
> -  if [ "$?" -ne "0" ] ; then
> -    echo "ERROR: cannot set TORQUE admins"
> -    qterm
> -    exit 1;
> -  fi
> -
> +  echo "ERROR: cannot set TORQUE admins"
> +  qterm
> +  exit 1;
>  fi
> echo set server managers += $USER | qmgr
>



-- 
Brian Pendleton
Cluster Resources Inc.
Email: bpendleton at clusterresources.com
IM (jabber): bpendleton.cri at gmail.com


More information about the torquedev mailing list