Return-Path: X-Original-To: apmail-cloudstack-dev-archive@www.apache.org Delivered-To: apmail-cloudstack-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 95B3510AEA for ; Fri, 25 Oct 2013 09:04:21 +0000 (UTC) Received: (qmail 7132 invoked by uid 500); 25 Oct 2013 09:04:19 -0000 Delivered-To: apmail-cloudstack-dev-archive@cloudstack.apache.org Received: (qmail 7063 invoked by uid 500); 25 Oct 2013 09:04:19 -0000 Mailing-List: contact dev-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list dev@cloudstack.apache.org Received: (qmail 7055 invoked by uid 99); 25 Oct 2013 09:04:19 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Oct 2013 09:04:19 +0000 X-ASF-Spam-Status: No, hits=0.3 required=5.0 tests=FREEMAIL_REPLY,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of runseb@gmail.com designates 209.85.212.176 as permitted sender) Received: from [209.85.212.176] (HELO mail-wi0-f176.google.com) (209.85.212.176) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Oct 2013 09:04:13 +0000 Received: by mail-wi0-f176.google.com with SMTP id l12so737309wiv.9 for ; Fri, 25 Oct 2013 02:03:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to; bh=XagrIj5aKwpn8Y+VbhbWmm3ucWqSH5Bo/SYgF2iQO7s=; b=qvW821ioIIjBDcflqAXt2vVLIDp7863aGQDRK8yWRAdCO6wz7KFGGauNAhMrEQd7Hu qgC5M1kvxW1UFZy/GsoTqwhD6ub7epDTgtS4ZheOImNUEuuEJeiSpeg+eGNPcs3wNAMc 2mLHFehLSIFHqyVem4Nx2SL4cYkKDSo6WZGFVBJx+A3zjl6bNB97xxTrV+96cxEGvD7n oz8cjkUIZzFpMVyE9dPaveMp1RHUiNOcMNX18fU0ZKJH/sL/3XhyEpIqdguNlT6ZHlbK sAiJ9PhsYtvOz77MH0uPniczc+GKlbWPrDNLDacxLfPOPjVEjV9342mzswHugmjrT3eW /Trg== X-Received: by 10.194.216.225 with SMTP id ot1mr445555wjc.80.1382691833117; Fri, 25 Oct 2013 02:03:53 -0700 (PDT) Received: from [10.0.0.8] (128-228.193-178.cust.bluewin.ch. [178.193.228.128]) by mx.google.com with ESMTPSA id b13sm3810728wic.9.2013.10.25.02.03.51 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 25 Oct 2013 02:03:51 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: [Cloudmonkey] assignVirtualMachine API causes index out of range error From: sebgoa In-Reply-To: Date: Fri, 25 Oct 2013 11:03:49 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <83AFB1DE-0264-4976-BB81-BE7EA29645F9@gmail.com> References: To: dev@cloudstack.apache.org X-Mailer: Apple Mail (2.1508) X-Virus-Checked: Checked by ClamAV on apache.org On Oct 25, 2013, at 10:57 AM, Ryan Lei wrote: > I'm using Cloudmonkey 5.0.0 under CloudStack 4.2.0 + XenServer 6.2. > For now, the only way to change the ownership of a VM is by the > assignVirtualMachine API. >=20 > But executing this API using Cloudmonkey leads to the following error = that > crashes the program: >=20 >> assign virtualmachine > virtualmachineid=3D7fe548bb-b2a7-4aec-92c5-5012ef9fd4f4 = account=3Ddomain1-user1 > domainid=3Dcfc19b03-0858-4f39-9058-e0b67685bc2f > Traceback (most recent call last): > File "/usr/bin/cloudmonkey", line 9, in > load_entry_point('cloudmonkey=3D=3D5.0.0', 'console_scripts', > 'cloudmonkey')() > File > = "/usr/lib/python2.6/site-packages/cloudmonkey-5.0.0-py2.6.egg/cloudmonkey/= cloudmonkey.py", > line 536, in main > shell.cmdloop() > File > = "/usr/lib/python2.6/site-packages/cloudmonkey-5.0.0-py2.6.egg/cloudmonkey/= cloudmonkey.py", > line 106, in cmdloop > super(CloudMonkeyShell, self).cmdloop(intro=3D"") > File "/usr/lib64/python2.6/cmd.py", line 142, in cmdloop > stop =3D self.onecmd(line) > File "/usr/lib64/python2.6/cmd.py", line 219, in onecmd > return func(arg) > File > = "/usr/lib/python2.6/site-packages/cloudmonkey-5.0.0-py2.6.egg/cloudmonkey/= cloudmonkey.py", > line 134, in grammar_closure > self.default("%s %s" % (cmd, args)) > File > = "/usr/lib/python2.6/site-packages/cloudmonkey-5.0.0-py2.6.egg/cloudmonkey/= cloudmonkey.py", > line 303, in default > result =3D self.make_request(apiname, args_dict, isasync) > File > = "/usr/lib/python2.6/site-packages/cloudmonkey-5.0.0-py2.6.egg/cloudmonkey/= cloudmonkey.py", > line 257, in make_request > self.timeout, self.protocol, self.path) > File > = "/usr/lib/python2.6/site-packages/cloudmonkey-5.0.0-py2.6.egg/cloudmonkey/= requester.py", > line 121, in monkeyrequest > responsekey =3D filter(lambda x: 'response' in x, = response.keys())[0] > IndexError: list index out of range > [cs42]~# >=20 > However, the account of VM DOES change successfully, checked from both = the > UI and API. > And after the change, only the new VM owner and their admins and see = this > VM. >=20 I am guessing this is an issue with the response object of the = assignVirtualMachine API call. Can you check the java code for this API ? > = --------------------------------------------------------------------------= ----------------- > Yu-Heng (Ryan) Lei, Associate Researcher > Chunghwa Telecom Laboratories / Cloud Computing Laboratory > = ryanlei@cht.com.tw > or > ryanlei750328@gmail.com