libcloud-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Toma┼ż Muraus <to...@tomaz.me>
Subject Re: change ec2 shutdown behavior with libcloud
Date Wed, 18 Jan 2012 08:26:50 GMT
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 <yaronn01@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 <yaronn01@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
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message