<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hello,<br>
<br>
I'm currently working as an intern with NASA at the Goddard Space Flight Center. We have decided to move<br>
some regression tests we run on our own high performance computer system into the cloud.
<br>
I have been assigned the task of setting up a continuous integration server and setting up the scripts which will
<br>
instantiate clusters that will be used for the builds/regression test. I was shown StarCluster by a system architect here
<br>
and needless to say, it's an extremely impressive tool! <br>
<br>
I am currently using a CI server called Hudson which is running smoothly on a micro AMI instance which mimics the OS image we run on our cluster.
<br>
The Hudson Server runs under a user (user Hudson) on the instance and can run scripts as that user on the system when triggered.<br>
The point is to, when triggered, create a cluster (using StarCluster) that will mimic the cluster we run here,<br>
and use that cluster to build and do a regression test against a clients code repository, and subsequently tear the<br>
cluster down upon completion. <br>
<br>
I have StarCluster installed under user Hudson, and when I shell into user Hudson, StarCluster works without a hitch.
<br>
My problem occurs when I try to run any StarCluster command through the Hudson Web Servlet. I have a job going on Hudson<br>
which, when triggered, will execute a shell command (currently &quot;starcluster help&quot;) under user Hudson. After setting up the $PATH to StarCluster<br>
through the Hudson UI, the starcluster command is recognized.<br>
<br>
But for some reason, which I've been struggling with all day, I get this error as output when I run any starcluster command:<br>
<br>
<br>
#######Hudson Console Output#######<br>
<pre style="font-family: Tahoma;">Started by user admin
[workspace] $ /bin/bash -xe /tmp/hudson6888230102812979297.sh <span style="color: rgb(255, 0, 0);">## [workspace] is a directory under user Hudson. When the same command</span><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n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bsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; <span style="color: rgb(255, 0, 0);">## run from this directory through ssh, it runs just fine.</span><br><br>&#43; starcluster help &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <span style="color: rgb(255, 0, 0);">##This is the command in /tmp/hudsonxxxxx.sh. A whoami shows this command running under user Hudson</span>.
!!! ERROR - /root/.starcluster *must* be a directory&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: rgb(255, 0, 0);">##This is what has me baffled, why does anything in /root need to be referenced/exist?</span> <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: rgb(255, 0, 0);"> ##Again, this isn't the case when this command is run directly under user Hudson (through ssh).</span><br>&nbsp;!!! ERROR - /root/.starcluster *must* be a directory
Traceback (most recent call last):
  File &quot;/usr/local/bin/starcluster&quot;, line 9, in &lt;module&gt;
    load_entry_point('StarCluster==0.93.3', 'console_scripts', 'starcluster')()
  File &quot;/usr/local/lib64/python2.6/site-packages/StarCluster-0.93.3-py2.6.egg/starcluster/cli.py&quot;, line 310, in main
    logger.configure_sc_logging()
  File &quot;/usr/local/lib64/python2.6/site-packages/StarCluster-0.93.3-py2.6.egg/starcluster/logger.py&quot;, line 129, in configure_sc_logging
    backupCount=2)
  File &quot;/usr/lib64/python2.6/logging/handlers.py&quot;, line 112, in __init__
    BaseRotatingHandler.__init__(self, filename, mode, encoding, delay)
  File &quot;/usr/lib64/python2.6/logging/handlers.py&quot;, line 64, in __init__
    logging.FileHandler.__init__(self, filename, mode, encoding, delay)
  File &quot;/usr/lib64/python2.6/logging/__init__.py&quot;, line 827, in __init__
    StreamHandler.__init__(self, self._open())
  File &quot;/usr/lib64/python2.6/logging/__init__.py&quot;, line 846, in _open
    stream = open(self.baseFilename, self.mode)
IOError: [Errno 13] Permission denied: '/root/.starcluster/logs/debug.log'
[DEBUG] Skipping watched dependency update for build: Test Build #30 due to result: FAILURE
Finished: FAILURE<br><br>.starcluster exists at /var/lib/hudson/.starcluster and is shown as the default path to the config file when &quot;starcluster help&quot; is run on user Hudson (through ssh).<br>I have passed that directory as a  (starcluster -c &quot;path_to_config&quot;) argument in the Hudson script, and still get the same error. <br>Permissions for /var/lib/hudson/.starcluster are rwxr-xr-x. <br><br>Any help would be greatly appreciated!<br><br>Thanks for the great work,<br>Garrison<br></pre>
<br>
</div>
</body>
</html>