Return-Path: X-Original-To: apmail-cloudstack-commits-archive@www.apache.org Delivered-To: apmail-cloudstack-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C7084184D6 for ; Thu, 28 May 2015 15:49:04 +0000 (UTC) Received: (qmail 37009 invoked by uid 500); 28 May 2015 15:49:04 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 36972 invoked by uid 500); 28 May 2015 15:49:04 -0000 Mailing-List: contact commits-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 commits@cloudstack.apache.org Received: (qmail 36963 invoked by uid 99); 28 May 2015 15:49:04 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 May 2015 15:49:04 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 7E1CCE1083; Thu, 28 May 2015 15:49:04 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: gaurav@apache.org To: commits@cloudstack.apache.org Message-Id: <495db57cb4fd47d58cb0bdfd81075275@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: git commit: updated refs/heads/master to f2d056e Date: Thu, 28 May 2015 15:49:04 +0000 (UTC) Repository: cloudstack Updated Branches: refs/heads/master b61652208 -> f2d056ee1 CLOUDSTACK-8526: Use more memory for HyperV VMs in case SSH is tried to VM Signed-off-by: Gaurav Aradhye This closes #322 Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/f2d056ee Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/f2d056ee Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/f2d056ee Branch: refs/heads/master Commit: f2d056ee1e8568d9ef07230e105cae326851dba1 Parents: b616522 Author: Gaurav Aradhye Authored: Thu May 28 20:49:51 2015 +0530 Committer: Gaurav Aradhye Committed: Thu May 28 21:18:05 2015 +0530 ---------------------------------------------------------------------- test/integration/testpaths/testpath_vmlc.py | 73 ++++++++++++------------ 1 file changed, 37 insertions(+), 36 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f2d056ee/test/integration/testpaths/testpath_vmlc.py ---------------------------------------------------------------------- diff --git a/test/integration/testpaths/testpath_vmlc.py b/test/integration/testpaths/testpath_vmlc.py index 33e6860..f6c8640 100644 --- a/test/integration/testpaths/testpath_vmlc.py +++ b/test/integration/testpaths/testpath_vmlc.py @@ -42,7 +42,6 @@ from marvin.lib.common import (get_domain, setSharedNetworkParams, get_free_vlan) from marvin.codes import (PASS, - ERROR_NO_HOST_FOR_MIGRATION, ISOLATED_NETWORK, SHARED_NETWORK, VPC_NETWORK) @@ -194,9 +193,13 @@ class TestPathVMLC(cloudstackTestCase): # Create 3 service offerings with different values for # for cpunumber, cpuspeed, and memory - cls.testdata["service_offering"]["cpunumber"] = "1" - cls.testdata["service_offering"]["cpuspeed"] = "128" - cls.testdata["service_offering"]["memory"] = "256" + cls.testdata["service_offering"]["cpuspeed"] = 128 + cls.testdata["service_offering"]["memory"] = 256 + + cls.testdata["service_offering"]["cpunumber"] = 1 + if cls.hypervisor.lower() == "hyperv": + cls.testdata["service_offering"]["cpuspeed"] = 2048 + cls.testdata["service_offering"]["memory"] = 2048 cls.service_offering_1 = ServiceOffering.create( cls.apiclient, @@ -204,10 +207,7 @@ class TestPathVMLC(cloudstackTestCase): ) cls._cleanup.append(cls.service_offering_1) - cls.testdata["service_offering"]["cpunumber"] = "2" - cls.testdata["service_offering"]["cpuspeed"] = "256" - cls.testdata["service_offering"]["memory"] = "512" - + cls.testdata["service_offering"]["cpunumber"] = 2 cls.service_offering_2 = ServiceOffering.create( cls.apiclient, cls.testdata["service_offering"] @@ -491,21 +491,22 @@ class TestPathVMLC(cloudstackTestCase): except Exception as e: self.fail("Exception while SSHing to VM: %s" % e) - # Find suitable host for VM to migrate and migrate the VM - # Verify that it is accessible on the new host - host = findSuitableHostForMigration(self.apiclient, - self.virtual_machine.id) - if host is None: - self.fail(ERROR_NO_HOST_FOR_MIGRATION) - self.virtual_machine.migrate(self.apiclient, host.id) - try: - SshClient(host=publicip.ipaddress.ipaddress, - port=22, - user=self.virtual_machine.username, - passwd=self.virtual_machine.password) - except Exception as e: - self.fail("Exception while SSHing to VM: %s" % e) + if not self.hypervisor.lower() == "lxc": + # Find suitable host for VM to migrate and migrate the VM + # Verify that it is accessible on the new host + host = findSuitableHostForMigration(self.apiclient, + self.virtual_machine.id) + if host is not None: + self.virtual_machine.migrate(self.apiclient, host.id) + + try: + SshClient(host=publicip.ipaddress.ipaddress, + port=22, + user=self.virtual_machine.username, + passwd=self.virtual_machine.password) + except Exception as e: + self.fail("Exception while SSHing to VM: %s" % e) return @attr(tags=["advanced"], required_hardware="True") @@ -705,21 +706,21 @@ class TestPathVMLC(cloudstackTestCase): except Exception as e: self.fail("Exception while SSHing to VM: %s" % e) - # Find suitable host for VM to migrate and migrate the VM - # Verify that it is accessible on the new host - host = findSuitableHostForMigration(self.apiclient, + if not self.hypervisor.lower() == "lxc": + # Find suitable host for VM to migrate and migrate the VM + # Verify that it is accessible on the new host + host = findSuitableHostForMigration(self.apiclient, self.virtual_machine.id) - if host is None: - self.fail(ERROR_NO_HOST_FOR_MIGRATION) - self.virtual_machine.migrate(self.apiclient, host.id) - - try: - SshClient(host=self.virtual_machine.ssh_ip, - port=22, - user=self.virtual_machine.username, - passwd=self.virtual_machine.password) - except Exception as e: - self.fail("Exception while SSHing to VM: %s" % e) + if host is not None: + self.virtual_machine.migrate(self.apiclient, host.id) + + try: + SshClient(host=self.virtual_machine.ssh_ip, + port=22, + user=self.virtual_machine.username, + passwd=self.virtual_machine.password) + except Exception as e: + self.fail("Exception while SSHing to VM: %s" % e) return @attr(tags=["advanced"], required_hardware="True")