Re: [galaxy-dev] Galaxy users on virtual machine

2012-12-18 Thread Oleksandr Moskalenko

On Dec 18, 2012, at 12:05 PM, Ganote, Carrie L cgan...@iu.edu wrote:

 Hi all,
 
 Right now I have drmaa running with Torque.  I have a virtual machine with 
 Galaxy installed on it, a filesystem mounted on the virtual machine that 
 holds the dataset info, and a cluster that runs big jobs and also has access 
 to the mounted filesystem.  When running Galaxy as a real user, I get an 
 error because the real user has no pwd listing in the virtual machine.  In 
 this entry there is mention of galaxy_user.username; where is that and how is 
 it populated?  I use kerberos to authenticate through apache.
 
 Any clues appreciated!
 
 Here's the dump:
 galaxy.jobs ERROR 2012-12-18 11:29:01,871 (989) Failed to change ownership of 
 /Filesystem/job_working_directory/000/989, making world-writable instead
 Traceback (most recent call last):
   File /Prefix/galaxy-dist/lib/galaxy/jobs/__init__.py, line 893, in 
 change_ownership_for_run
 self._change_ownership( self.user_system_pwent[0], str( 
 self.user_system_pwent[3] ) )
 TypeError: 'NoneType' object is unsubscriptable
 galaxy.jobs.runners.drmaa ERROR 2012-12-18 11:29:01,928 Uncaught exception 
 queueing job
 Traceback (most recent call last):
   File /Prefix/galaxy-dist/lib/galaxy/jobs/runners/drmaa.py, line 145, in 
 run_next
 self.queue_job( obj )
   File /Prefix/galaxy-dist/lib/galaxy/jobs/runners/drmaa.py, line 237, in 
 queue_job
 log.debug( '(%s) submitting with credentials: %s [uid: %s]' % ( 
 galaxy_id_tag, job_wrapper.user_system_pwent[0], 
 job_wrapper.user_system_pwent[2] ) )
 TypeError: 'NoneType' object is unsubscriptable
 
 Carrie Ganote

Hi Carrie,

I run a crontab job every 5 minutes that repopulates the galaxy database with 
the real user names we use instead of the email style user names by updating 
the galaxy_user.username column.

Then, I patch jobs/__init__.py as follows:

#self.__user_system_pwent = pwd.getpwnam( 
job.user.email.split('@')[0] )
self.__user_system_pwent = pwd.getpwnam( job.user.username )

Regards,

Alex 

___
Please keep all replies on the list by using reply all
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:

  http://lists.bx.psu.edu/

Re: [galaxy-dev] Galaxy users on virtual machine

2012-12-18 Thread Ganote, Carrie L
Hi Alex,

I see what you are saying, but I think our situations are slightly different.
The line
self.__user_system_pwent = 
pwd.getpwnam(job.user.email.split('@')[0] )
*does* return the correct username, however, that user is not present in the 
Virtual machine that is running Galaxy, so when the job runner calls for 
pwd.getpwuid(), there is nothing there.  By the way, the VM uses key 
authentication only, not passwords.

The problem I think I'm having is that the /etc/passwd file I want to use is 
located on the cluster, not on the virtual machine.  I'm not sure if I can just 
copy that file over.  How else can I get ahold of the uid of the user who 
cannot log in to the machine Galaxy is running on?

Thanks for the help,

Carrie Ganote

__


Hi Carrie,

I run a crontab job every 5 minutes that repopulates the galaxy database
with the real user names we use instead of the email style user names by
updating the galaxy_user.username column.

Then, I patch jobs/__init__.py as follows:

#self.__user_system_pwent = pwd.getpwnam(
job.user.email.split('@')[0] )
self.__user_system_pwent = pwd.getpwnam( job.user.username )

Regards,

Alex

___
Please keep all replies on the list by using reply all
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:

  http://lists.bx.psu.edu/


Re: [galaxy-dev] Galaxy users on virtual machine

2012-12-18 Thread Oleksandr Moskalenko
We're using ldap authentication on our cluster, so our /etc/passwd files don't 
have any user data and the credentials are returned by ldap. You will have to 
adjust this to your situation. You can rsync /etc/passwd from elsewhere or 
fiddle with PAM to work something out for your key-based setup. Sorry, I don't 
have more insight into that part.

Regards,

Alex

On Dec 18, 2012, at 2:27 PM, cgan...@iu.edu wrote:

 Hi Alex,
 
 I see what you are saying, but I think our situations are slightly different.
 The line 
self.__user_system_pwent = 
 pwd.getpwnam(job.user.email.split('@')[0] )
 *does* return the correct username, however, that user is not present in the 
 Virtual machine that is running Galaxy, so when the job runner calls for 
 pwd.getpwuid(), there is nothing there.  By the way, the VM uses key 
 authentication only, not passwords.
 
 The problem I think I'm having is that the /etc/passwd file I want to use is 
 located on the cluster, not on the virtual machine.  I'm not sure if I can 
 just copy that file over.  How else can I get ahold of the uid of the user 
 who cannot log in to the machine Galaxy is running on?
 
 Thanks for the help,
 
 Carrie Ganote


___
Please keep all replies on the list by using reply all
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:

  http://lists.bx.psu.edu/