Return-Path: X-Original-To: apmail-libcloud-users-archive@minotaur.apache.org Delivered-To: apmail-libcloud-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B1404B238 for ; Wed, 18 Jan 2012 08:27:55 +0000 (UTC) Received: (qmail 93762 invoked by uid 500); 18 Jan 2012 08:27:55 -0000 Delivered-To: apmail-libcloud-users-archive@libcloud.apache.org Received: (qmail 93712 invoked by uid 500); 18 Jan 2012 08:27:50 -0000 Mailing-List: contact users-help@libcloud.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@libcloud.apache.org Delivered-To: mailing list users@libcloud.apache.org Received: (qmail 91258 invoked by uid 99); 18 Jan 2012 08:27:42 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Jan 2012 08:27:42 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of kami@k5-storitve.net designates 209.85.210.45 as permitted sender) Received: from [209.85.210.45] (HELO mail-pz0-f45.google.com) (209.85.210.45) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Jan 2012 08:27:33 +0000 Received: by dadi2 with SMTP id i2so334575dad.18 for ; Wed, 18 Jan 2012 00:27:11 -0800 (PST) Received: by 10.68.196.228 with SMTP id ip4mr2685407pbc.98.1326875231468; Wed, 18 Jan 2012 00:27:11 -0800 (PST) MIME-Version: 1.0 Sender: kami@k5-storitve.net Received: by 10.142.217.4 with HTTP; Wed, 18 Jan 2012 00:26:50 -0800 (PST) In-Reply-To: References: From: =?ISO-8859-2?Q?Toma=BE_Muraus?= Date: Wed, 18 Jan 2012 00:26:50 -0800 X-Google-Sender-Auth: S5-9IJtaOOej6iAyH_6ThUy_5r4 Message-ID: Subject: Re: change ec2 shutdown behavior with libcloud To: users@libcloud.apache.org Content-Type: multipart/alternative; boundary=e89a8ff1c87cd53c6504b6c936f1 X-Virus-Checked: Checked by ClamAV on apache.org --e89a8ff1c87cd53c6504b6c936f1 Content-Type: text/plain; charset=ISO-8859-1 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 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 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 > > > --e89a8ff1c87cd53c6504b6c936f1--