[StarCluster] Adding users after cluster creation (bug or misunderstanding)?

Eduardo Gurgel Valente evalente at navteca.com
Mon Mar 9 10:41:37 EDT 2015


Let's say I have defined several CreateUsers plugins as follows:

[plugin createAuser]
setup_class = starcluster.plugins.users.CreateUsers
usernames = user_a

[plugin createBuser]
setup_class = starcluster.plugins.users.CreateUsers
usernames = user_b

[plugin createCuser]
setup_class = starcluster.plugins.users.CreateUsers
usernames = user_c

And I define a cluster to run at creation time the createAuser pluging, but
at some later date I would like to add user_b to that same cluster.

I should be able to run the command "starcluster runplugin createBuser
<clustername>" and get user_b propagated into that cluster should I not?

If so, I am not getting the desired behavior.

 In fact this mechanism for adding a user evalente after cluster creation
outputs the following:

$ starcluster runplugin create_evalente_user i04dft
StarCluster - (http://star.mit.edu/cluster) (v. 0.95.6)
Software Tools for Academics and Researchers (STAR)
Please submit bug reports to starcluster at mit.edu

>>> Running plugin create_evalente_user
>>> Creating 1 cluster users
4/4 ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
100%
>>> Configuring passwordless ssh for 1 cluster users
!!! ERROR - Error occured while running plugin 'create_evalente_user':
!!! ERROR - Unhandled exception occured
Traceback (most recent call last):
  File
"/usr/lib/python2.7/site-packages/StarCluster-0.95.6-py2.7.egg/starcluster/cli.py",
line 274, in main
    sc.execute(args)
  File
"/usr/lib/python2.7/site-packages/StarCluster-0.95.6-py2.7.egg/starcluster/commands/runplugin.py",
line 40, in execute
    self.cm.run_plugin(plugin_name, cluster_tag)
  File
"/usr/lib/python2.7/site-packages/StarCluster-0.95.6-py2.7.egg/starcluster/cluster.py",
line 380, in run_plugin
    cl.run_plugin(plug, name=plugin_name)
  File
"/usr/lib/python2.7/site-packages/StarCluster-0.95.6-py2.7.egg/starcluster/cluster.py",
line 1722, in run_plugin
    func(*args)
  File
"/usr/lib/python2.7/site-packages/StarCluster-0.95.6-py2.7.egg/starcluster/plugins/users.py",
line 82, in run
    auth_conn_key=True)
  File
"/usr/lib/python2.7/site-packages/StarCluster-0.95.6-py2.7.egg/starcluster/node.py",
line 500, in generate_key_for_user
    home_folder = user.pw_dir
AttributeError: 'NoneType' object has no attribute 'pw_dir'

!!! ERROR - Oops! Looks like you've found a bug in StarCluster
!!! ERROR - Crash report written to:
/home/evalente/.starcluster/logs/crash-report-24900.txt
!!! ERROR - Please remove any sensitive data from the crash report
!!! ERROR - and submit it to starcluster at mit.edu

**************************************************************

I tracked down users.py and found that the self._usernames contains
evalente, but newusers gets a list of existing users back from the
self._get_newusers_batch_file
 call.

Has anyone else used the plugin in this manner successfully?  What other
ways have people used to achieve user creation post cluster creation?

Thanks,
Eduardo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/starcluster/attachments/20150309/f9a222c2/attachment.htm


More information about the StarCluster mailing list