Yeah in EC2 driver creating a node actually results in two HTTP requests:

1. create a server
2. add a tag with key 'name' to the server

Occasionally #2 fails.

You could solve this problem by wrapping your create_node call in try /
except block and when a tag creation exception is thrown try to re-create a
tag with a key 'name' and a value kwargs['name'].

On Tue, Jan 17, 2012 at 10:34 AM, Yaron Naveh <yaron...@gmail.com> wrote:

> Thanks. I have finally chosen another path but have one issue:
>
> I use create_node to create instances.  I always assign a unique "name" to
> the new instance via create_node, however intermittently it is not applied
> and the EC2 console shows an empty name.
>
> Is there anything in libcloud which may cause this or is it purely an ec2
> issue?
>
> Yaron
>
> >Currently you cannot do that using libcloud, but implementing an extension
> >method which does this should be pretty easy. Let us know if you need help
> >with it.
>
> On Tue, Jan 17, 2012 at 3:32 AM, Yaron Naveh <yaron...@gmail.com> wrote:
>
> > Hi
> >
> > I use libcloud to create an ec2 instance via the create_node api.
> >
> > How to set a shutdown behavior of "terminate" to this instance?
> >
> > I want to get the same effect as if I used:
> >
> > $> ec2-modify-instance-attribute instance_id
> > --instance-initiated-shutdown-behavior terminate
> >
> > Thanks,
> > Yaron
> >
>

Reply via email to