<div dir="ltr"><div>Thanks for getting back to me.  I added the email below as a comment on the github track: <a href="https://github.com/jtriley/StarCluster/issues/348">https://github.com/jtriley/StarCluster/issues/348</a></div>
<div>----------------------------------</div><div>I think I figured out the problem and I have a solution that works for creating a starcluster under the VPC BUT you can&#39;t change its attributes after creation other than doing a force termination.</div>
<div><br></div><div>Starcluster works in EC2-Classic because they don&#39;t limit the Tag Values to a certain size, but with EC2-VPC Tag Values are limited to size 255 characters. I think this was discussed before if you use the following link <a href="https://github.com/jtriley/StarCluster/issues/21">https://github.com/jtriley/StarCluster/issues/21</a>  and search for words “3) StarCluster + VPC limitation:&quot;  you can read more about this issue.  </div>
<div><br></div><div>Basically the @sc-core Tag&#39;s value can be greater than 255 characters in length, if this is the case then Starcluster software will fail to create a cluster under the VPC.  This is why for my one AMI (had @sc-core Tag value less than 255 characters) I could successfully create a starcluster under the VPC, but for all other AMI&#39;s I wasn&#39;t able to.</div>
<div><br></div><div>Temporary Solution:</div><div>1 ) Locate the .../starcluster/cluster.py file and open it up in your favorite editor</div><div>2) Go to line 681 this should be the first line of the method &quot;_add_tags_to_sg&quot;  and it should have following text &quot;def _add_tags_to_sg(self, sg):&quot;</div>
<div>3) The value for &#39;static.CORE_TAG&#39; is the Tag Name &#39;@sc-core&#39; and it&#39;s value is &#39;core_settings&#39;.  The issue occurs in adding this Tag with line 698 &#39;sg.add_tag(static.CORE_TAG, core_settings)&#39;. If the value of &#39;core_settings&#39; is greater than 255 then this is where the program fails.  Add the following 3 lines of code (indicated by (+)) between lines 697 &#39;if not static.CORE_TAG in sg.tags:&#39; and 698 &#39;sg.add_tag(static.CORE_TAG, core_settings)&#39;</div>
<div>-------------------------------- Code Change -------------------------------------------------------------------------------</div><div>697           if not static.CORE_TAG in sg.tags:</div><div>698(+)            if(len(core_settings) &gt; 255):</div>
<div>699(+)               print &quot;\nWarning: For &quot;, static.CORE_TAG, &quot; truncating core_settings from &quot;, len(core_settings), &quot; to length 255.&quot;</div><div>700(+)               core_settings=core_settings[:255]</div>
<div>701                sg.add_tag(static.CORE_TAG, core_settings)</div><div>-------------------------------- Code Change -------------------------------------------------------------------------------</div><div><br></div>
<div>WARNING - there are implications of making this code change.  In doing so you will not be able to change the cluster other than a forced termination IF the core_settings value was truncated (warning appears during creation).</div>
<div><br></div><div>Seems like the @sc-core Tag holds cluster settings for a cluster that have been serialized and then compressed and the tag value is that compressed value.  Truncating this value allows you to create a cluster BUT you can&#39;t change attributes once it is created because the software needs a non-truncated value to link back to the cluster (I think?).</div>
<div><br></div><div>Once up and running the cluster runs fine, but ultimately for Starcluster to work consistently with EC2-VPC the code would need to be changed as to limit the @sc-core value to only 255 characters or fewer.  Maybe eliminating some of the options in the core tag, better compression algorithm, or ?? might be an easy fix to keep from having to do a big re-write of the code.  My temporary solution works for a &#39;static&#39; cluster under the VPC.</div>
<div><br></div><div>Thanks,</div><div>-Jennifer</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Dec 12, 2013 at 12:09 PM, Justin Riley <span dir="ltr">&lt;<a href="mailto:jtriley@mit.edu" target="_blank">jtriley@mit.edu</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Jennifer,<br>
<br>
Sorry you&#39;re having issues and thanks for reporting. I&#39;ve created an<br>
issue on github to track this:<br>
<br>
<a href="https://github.com/jtriley/StarCluster/issues/348" target="_blank">https://github.com/jtriley/StarCluster/issues/348</a><br>
<br>
Would you mind commenting on that issue with a copy of your config so<br>
that I can take a look? Please remove all sensitive parts of your config<br>
first.<br>
<br>
Thanks!!<br>
<br>
~Justin<br>
<div><div class="h5"><br>
On Tue, Dec 10, 2013 at 11:23:19AM -0500, Jennifer Staab wrote:<br>
&gt;    I have had limited success getting Starcluster to successfully launch a<br>
&gt;    cluster with EC2-VPC nodes under the development version (0.9999). Using a<br>
&gt;    certain AMI I can easily launch a Starcluster cluster with EC2-VPC nodes,<br>
&gt;    but using a different AMI it fails to launch.  I do set the config<br>
&gt;    variables &quot;VPC_ID&quot; and &quot;SUBNET_ID&quot; and the only difference between the two<br>
&gt;    cluster templates is the AMI that is used.<br>
&gt;    Both AMIs used successfully launch a Starcluster cluster with EC2-classic<br>
&gt;    nodes.  The only noted difference between the AMIs is that the one that<br>
&gt;    successfully launches a Starcluster cluster with VPC-EC2 nodes is a<br>
&gt;    private AMI that is &quot;shared&quot; with the account that I am running my VPC<br>
&gt;    within.  The AMI that doesn&#39;t work with Starcluster-VPC is one that is<br>
&gt;    private AMI &quot;owned&quot; by the account I am running my VPC within.   <br>
&gt;    I believe the error I am getting has something to do with the Tags,<br>
&gt;    specifically the &quot;@sc-core&quot; tag&#39;s value being beyond 255 characters, but I<br>
&gt;    could be wrong.  Below I have included an example of the successful<br>
&gt;    launch, the failed launch (including error message), and the listed<br>
&gt;    clusters after both commands.<br>
&gt;    Any suggestions on how to address this issue would be greatly appreciated.<br>
&gt;    Thanks in advance for the help,<br>
&gt;    -Jennifer<br>
&gt;    -------------------------------------------------------------------------------------------------<br>
&gt;    ------ Below is what it looks like when I have a successful launch ---<br>
&gt;    -------------------------------------------------------------------------------------------------<br>
&gt;    (starcluster)root@xxxxxxxxxxx:~# starcluster start -c testvpcA vpcA<br>
</div></div>&gt;    StarCluster - ([1]<a href="http://star.mit.edu/cluster" target="_blank">http://star.mit.edu/cluster</a>) (v. 0.9999)<br>
<div class="im">&gt;    Software Tools for Academics and Researchers (STAR)<br>
</div>&gt;    Please submit bug reports to [2]<a href="mailto:starcluster@mit.edu">starcluster@mit.edu</a><br>
<div><div class="h5">&gt;    &gt;&gt;&gt; Validating cluster template settings...<br>
&gt;    &gt;&gt;&gt; Cluster template settings are valid<br>
&gt;    &gt;&gt;&gt; Starting cluster...<br>
&gt;    &gt;&gt;&gt; Launching a 1-node cluster...<br>
&gt;    &gt;&gt;&gt; Creating security group @sc-vpcA...<br>
&gt;    Reservation:r-2843fa4e<br>
&gt;    &gt;&gt;&gt; Waiting for cluster to come up... (updating every 30s)<br>
&gt;    &gt;&gt;&gt; Waiting for all nodes to be in a &#39;running&#39; state...<br>
&gt;    1/1 ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||<br>
&gt;    100%<br>
&gt;    &gt;&gt;&gt; Waiting for SSH to come up on all nodes...<br>
&gt;    1/1 ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||<br>
&gt;    100%<br>
&gt;    &gt;&gt;&gt; Waiting for cluster to come up took 1.574 mins<br>
&gt;    &gt;&gt;&gt; The master node is<br>
&gt;    &gt;&gt;&gt; Configuring cluster...<br>
&gt;    &gt;&gt;&gt; Running plugin starcluster.clustersetup.DefaultClusterSetup<br>
&gt;    &gt;&gt;&gt; Configuring hostnames...<br>
&gt;    1/1 ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||<br>
&gt;    100%<br>
&gt;    &gt;&gt;&gt; Creating cluster user: sgeadmin (uid: 1007, gid: 1000)<br>
&gt;    1/1 ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||<br>
&gt;    100%<br>
&gt;    &gt;&gt;&gt; Configuring scratch space for user(s): sgeadmin<br>
&gt;    1/1 ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||<br>
&gt;    100%<br>
&gt;    &gt;&gt;&gt; Configuring /etc/hosts on each node<br>
&gt;    1/1 ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||<br>
&gt;    100%<br>
&gt;    &gt;&gt;&gt; Starting NFS server on master<br>
&gt;    &gt;&gt;&gt; Setting up NFS took 0.113 mins<br>
&gt;    &gt;&gt;&gt; Configuring passwordless ssh for root<br>
&gt;    &gt;&gt;&gt; Configuring passwordless ssh for sgeadmin<br>
&gt;    &gt;&gt;&gt; Running plugin starcluster.plugins.sge.SGEPlugin<br>
&gt;    &gt;&gt;&gt; Configuring SGE...<br>
&gt;    &gt;&gt;&gt; Setting up NFS took 0.000 mins<br>
&gt;    &gt;&gt;&gt; Removing previous SGE installation...<br>
&gt;    &gt;&gt;&gt; Installing Sun Grid Engine...<br>
&gt;    &gt;&gt;&gt; Creating SGE parallel environment &#39;orte&#39;<br>
&gt;    1/1 ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||<br>
&gt;    100%<br>
&gt;    &gt;&gt;&gt; Adding parallel environment &#39;orte&#39; to queue &#39;all.q&#39;<br>
&gt;    &gt;&gt;&gt; Configuring cluster took 0.679 mins<br>
&gt;    &gt;&gt;&gt; Starting cluster took 2.307 mins<br>
&gt;    The cluster is now ready to use. To login to the master node<br>
&gt;    as root, run:<br>
&gt;        $ starcluster sshmaster vpcA<br>
&gt;    If you&#39;re having issues with the cluster you can reboot the<br>
&gt;    instances and completely reconfigure the cluster from<br>
&gt;    scratch using:<br>
&gt;        $ starcluster restart vpcA<br>
&gt;    When you&#39;re finished using the cluster and wish to terminate<br>
&gt;    it and stop paying for service:<br>
&gt;        $ starcluster terminate vpcA<br>
&gt;    Alternatively, if the cluster uses EBS instances, you can<br>
&gt;    use the &#39;stop&#39; command to shutdown all nodes and put them<br>
&gt;    into a &#39;stopped&#39; state preserving the EBS volumes backing<br>
&gt;    the nodes:<br>
&gt;        $ starcluster stop vpcA<br>
&gt;    WARNING: Any data stored in ephemeral storage (usually /mnt)<br>
&gt;    will be lost!<br>
&gt;    You can activate a &#39;stopped&#39; cluster by passing the -x<br>
&gt;    option to the &#39;start&#39; command:<br>
&gt;        $ starcluster start -x vpcA<br>
&gt;    This will start all &#39;stopped&#39; nodes and reconfigure the<br>
&gt;    cluster.<br>
&gt;    -------------------------------------------------------------------------------------------------<br>
&gt;    ------ Below is what it looks like when I have a FAILED launch ---<br>
&gt;    -------------------------------------------------------------------------------------------------<br>
&gt;    (starcluster)root@xxxxxxxxxxx:~# starcluster start -c testvpcB vpcB<br>
</div></div>&gt;    StarCluster - ([3]<a href="http://star.mit.edu/cluster" target="_blank">http://star.mit.edu/cluster</a>) (v. 0.9999)<br>
<div class="im">&gt;    Software Tools for Academics and Researchers (STAR)<br>
</div>&gt;    Please submit bug reports to [4]<a href="mailto:starcluster@mit.edu">starcluster@mit.edu</a><br>
<div><div class="h5">&gt;    &gt;&gt;&gt; Validating cluster template settings...<br>
&gt;    &gt;&gt;&gt; Cluster template settings are valid<br>
&gt;    &gt;&gt;&gt; Starting cluster...<br>
&gt;    &gt;&gt;&gt; Launching a 1-node cluster...<br>
&gt;    &gt;&gt;&gt; Creating security group @sc-vpcB...<br>
&gt;    !!! ERROR - InvalidParameterValue: Tag value exceeds the maximum length of<br>
&gt;    255 characters<br>
&gt;    Traceback (most recent call last):<br>
&gt;      File &quot;/root/.virtualenvs/starcluster/starcluster/starcluster/cli.py&quot;,<br>
&gt;    line 274, in main<br>
&gt;        sc.execute(args)<br>
&gt;      File<br>
&gt;    &quot;/root/.virtualenvs/starcluster/starcluster/starcluster/commands/start.py&quot;,<br>
&gt;    line 220, in execute<br>
&gt;        validate_running=validate_running)<br>
&gt;      File<br>
&gt;    &quot;/root/.virtualenvs/starcluster/starcluster/starcluster/cluster.py&quot;, line<br>
&gt;    1537, in start<br>
&gt;        return self._start(create=create, create_only=create_only)<br>
&gt;      File &quot;&lt;string&gt;&quot;, line 2, in _start<br>
&gt;      File &quot;/root/.virtualenvs/starcluster/starcluster/starcluster/utils.py&quot;,<br>
&gt;    line 111, in wrap_f<br>
&gt;        res = func(*arg, **kargs)<br>
&gt;      File<br>
&gt;    &quot;/root/.virtualenvs/starcluster/starcluster/starcluster/cluster.py&quot;, line<br>
&gt;    1552, in _start<br>
&gt;        self.create_cluster()<br>
&gt;      File<br>
&gt;    &quot;/root/.virtualenvs/starcluster/starcluster/starcluster/cluster.py&quot;, line<br>
&gt;    1066, in create_cluster<br>
&gt;        self._create_flat_rate_cluster()<br>
&gt;      File<br>
&gt;    &quot;/root/.virtualenvs/starcluster/starcluster/starcluster/cluster.py&quot;, line<br>
&gt;    1091, in _create_flat_rate_cluster<br>
&gt;        force_flat=True)[0]<br>
&gt;      File<br>
&gt;    &quot;/root/.virtualenvs/starcluster/starcluster/starcluster/cluster.py&quot;, line<br>
&gt;    859, in create_nodes<br>
</div></div>&gt;        cluster_sg = [5]<a href="http://self.cluster_group.name" target="_blank">self.cluster_group.name</a><br>
<div><div class="h5">&gt;      File<br>
&gt;    &quot;/root/.virtualenvs/starcluster/starcluster/starcluster/cluster.py&quot;, line<br>
&gt;    657, in cluster_group<br>
&gt;        self._add_tags_to_sg(sg)<br>
&gt;      File<br>
&gt;    &quot;/root/.virtualenvs/starcluster/starcluster/starcluster/cluster.py&quot;, line<br>
&gt;    698, in _add_tags_to_sg<br>
&gt;        sg.add_tag(static.CORE_TAG, core_settings)<br>
&gt;      File<br>
&gt;    &quot;/root/.virtualenvs/starcluster/local/lib/python2.7/site-packages/boto-2.19.0-py2.7.egg/boto/ec2/ec2object.py&quot;,<br>
&gt;    line 82, in add_tag<br>
&gt;        dry_run=dry_run<br>
&gt;      File<br>
&gt;    &quot;/root/.virtualenvs/starcluster/local/lib/python2.7/site-packages/boto-2.19.0-py2.7.egg/boto/ec2/connection.py&quot;,<br>
&gt;    line 4026, in create_tags<br>
&gt;        return self.get_status(&#39;CreateTags&#39;, params, verb=&#39;POST&#39;)<br>
&gt;      File<br>
&gt;    &quot;/root/.virtualenvs/starcluster/local/lib/python2.7/site-packages/boto-2.19.0-py2.7.egg/boto/connection.py&quot;,<br>
&gt;    line 1158, in get_status<br>
&gt;        raise self.ResponseError(response.status, response.reason, body)<br>
&gt;    EC2ResponseError: EC2ResponseError: 400 Bad Request<br>
&gt;    &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br>
&gt;    &lt;Response&gt;&lt;Errors&gt;&lt;Error&gt;&lt;Code&gt;InvalidParameterValue&lt;/Code&gt;&lt;Message&gt;Tag<br>
&gt;    value exceeds the maximum length of 255<br>
&gt;    characters&lt;/Message&gt;&lt;/Error&gt;&lt;/Errors&gt;&lt;RequestID&gt;1f589605-8f30-472d-8989-22ea120aea14&lt;/RequestID&gt;&lt;/Response&gt;<br>
&gt;    -----------------------------------------------------------------------------------------------------------------<br>
&gt;    ------ When if FAILS it creates only a security group see &quot;listclusters&quot;<br>
&gt;    below ---<br>
&gt;    -----------------------------------------------------------------------------------------------------------------<br>
&gt;    (starcluster)root@xxxxxxxxxxx:~# starcluster listclusters<br>
</div></div>&gt;    StarCluster - ([6]<a href="http://star.mit.edu/cluster" target="_blank">http://star.mit.edu/cluster</a>) (v. 0.9999)<br>
<div class="im">&gt;    Software Tools for Academics and Researchers (STAR)<br>
</div>&gt;    Please submit bug reports to [7]<a href="mailto:starcluster@mit.edu">starcluster@mit.edu</a><br>
<div class="im">&gt;    -------------------------------<br>
&gt;    vpcB (security group: @sc-vpcB)<br>
&gt;    -------------------------------<br>
&gt;    Launch time: N/A<br>
&gt;    Uptime: N/A<br>
&gt;    Zone: N/A<br>
&gt;    Keypair: N/A<br>
&gt;    EBS volumes: N/A<br>
&gt;    Cluster nodes: N/A<br>
&gt;    -------------------------------<br>
&gt;    vpcA (security group: @sc-vpcA)<br>
&gt;    -------------------------------<br>
&gt;    Launch time: 2013-12-10 14:39:36<br>
&gt;    Uptime: 0 days, 00:04:23<br>
&gt;    Zone: us-east-1b<br>
&gt;    Keypair: Starcluster_VPC<br>
&gt;    EBS volumes: N/A<br>
&gt;    Cluster nodes:<br>
&gt;         master running i-1d745b65 10.0.0.138<br>
&gt;    Total nodes: 1<br>
&gt;    (starcluster)root@xxxxxxxxxxx:~#<br>
&gt;<br>
</div>&gt; References<br>
&gt;<br>
&gt;    Visible links<br>
&gt;    1. <a href="http://star.mit.edu/cluster" target="_blank">http://star.mit.edu/cluster</a><br>
&gt;    2. mailto:<a href="mailto:starcluster@mit.edu">starcluster@mit.edu</a><br>
&gt;    3. <a href="http://star.mit.edu/cluster" target="_blank">http://star.mit.edu/cluster</a><br>
&gt;    4. mailto:<a href="mailto:starcluster@mit.edu">starcluster@mit.edu</a><br>
&gt;    5. <a href="http://self.cluster_group.name/" target="_blank">http://self.cluster_group.name/</a><br>
&gt;    6. <a href="http://star.mit.edu/cluster" target="_blank">http://star.mit.edu/cluster</a><br>
&gt;    7. mailto:<a href="mailto:starcluster@mit.edu">starcluster@mit.edu</a><br>
<br>
&gt; _______________________________________________<br>
&gt; StarCluster mailing list<br>
&gt; <a href="mailto:StarCluster@mit.edu">StarCluster@mit.edu</a><br>
&gt; <a href="http://mailman.mit.edu/mailman/listinfo/starcluster" target="_blank">http://mailman.mit.edu/mailman/listinfo/starcluster</a><br>
<br>
</blockquote></div><br></div>