From users-return-341-apmail-libcloud-users-archive=libcloud.apache.org@libcloud.apache.org Thu Oct 1 08:13:16 2015 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 441BF189B2 for ; Thu, 1 Oct 2015 08:13:16 +0000 (UTC) Received: (qmail 47437 invoked by uid 500); 1 Oct 2015 08:13:16 -0000 Delivered-To: apmail-libcloud-users-archive@libcloud.apache.org Received: (qmail 47420 invoked by uid 500); 1 Oct 2015 08:13:16 -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 47409 invoked by uid 99); 1 Oct 2015 08:13:15 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Oct 2015 08:13:15 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 740B41A36AB for ; Thu, 1 Oct 2015 08:13:15 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 4.501 X-Spam-Level: **** X-Spam-Status: No, score=4.501 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=3, KAM_LAZY_DOMAIN_SECURITY=1, KAM_NOCONFIDENCE=0.5, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id zp3zHWWUKMRV for ; Thu, 1 Oct 2015 08:13:02 +0000 (UTC) Received: from sender163-mail.zoho.com (sender163-mail.zoho.com [74.201.84.163]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id 0C256231A3 for ; Thu, 1 Oct 2015 08:13:01 +0000 (UTC) Received: from mail.zoho.com by mx.zohomail.com with SMTP id 1443687173825528.5245995055141; Thu, 1 Oct 2015 01:12:53 -0700 (PDT) Date: Thu, 01 Oct 2015 13:42:53 +0530 From: anu To: "users@libcloud.apache.org" Message-ID: <15022760e2a.1206b38c210879.2355607979365201961@opencollective.in> In-Reply-To: References: Subject: Re: device parameter errors out while attaching a volume in openstack MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_10795_1696840589.1443687173673" X-Priority: Medium User-Agent: Zoho Mail X-Mailer: Zoho Mail ------=_Part_10795_1696840589.1443687173673 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Hi Markos, Setting device parameter to None resolved the error. Openstack is now automatically assigning a device. driver.attach_volume(instances[0], volumes[0], device = None) However omitting device parameter resulted in same error. -- Greetings Anu Bhaskar ---- On Thu, 01 Oct 2015 13:07:15 +0530 Markos Gogoulos <mgogoulos@mist.io> wrote ---- Hi, I haven't used these functions, but I see on http://developer.openstack.org/api-ref-compute-v2-ext.html the device parameter should be provided as "Name of the device such as, /dev/vdb. Omit or set this parameter to null for auto-assignment, if supported. If you specify this parameter, the device must not exist in the guest operating system." Seems that the 'auto' is reserved by the system, so attach_volume function of compute.drivers.openstack.py should omit this parameter if it is not specified (or if it is specified as 'auto'). Regards, Markos On Thu, Oct 1, 2015 at 8:29 AM, <anu.bhaskar.babu@accenture.com> wrote: > Hi, > > While attaching a volume to an instance in Openstack, if I omit the device > name or if I specify the device name as auto, attach_volume call errors out. > > Traceback (most recent call last): > File "attach_volume_v1.py", line 44, in <module> > success = driver.attach_volume(instances[0], volumes[0], device = > 'auto') > File > "/usr/lib/python2.7/site-packages/libcloud/compute/drivers/openstack.py", > line 226, in attach_volume > 'device': device, > File "/usr/lib/python2.7/site-packages/libcloud/common/openstack.py", > line 202, in request > raw=raw) > File "/usr/lib/python2.7/site-packages/libcloud/common/base.py", line > 799, in request > response = responseCls(**kwargs) > File > "/usr/lib/python2.7/site-packages/libcloud/compute/drivers/openstack.py", > line 1001, in __init__ > super(OpenStack_1_1_Response, self).__init__(*args, **kwargs) > File "/usr/lib/python2.7/site-packages/libcloud/common/base.py", line > 143, in __init__ > headers=self.headers) > libcloud.common.exceptions.BaseHTTPError: 400 The supplied device path > (auto) is invalid. > > > -- > Greetings, > Anu Bhaskar > > ________________________________ > > This message is for the designated recipient only and may contain > privileged, proprietary, or otherwise confidential information. If you have > received it in error, please notify the sender immediately and delete the > original. Any other use of the e-mail by you is prohibited. Where allowed > by local law, electronic communications with Accenture and its affiliates, > including e-mail and instant messaging (including content), may be scanned > by our systems for the purposes of information security and assessment of > internal compliance with Accenture policy. > > ______________________________________________________________________________________ > > www.accenture.com > ------=_Part_10795_1696840589.1443687173673--