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 E473B1073F for ; Thu, 17 Apr 2014 18:24:40 +0000 (UTC) Received: (qmail 83327 invoked by uid 500); 17 Apr 2014 18:24:39 -0000 Delivered-To: apmail-cloudstack-dev-archive@cloudstack.apache.org Received: (qmail 83253 invoked by uid 500); 17 Apr 2014 18:24:39 -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 83242 invoked by uid 99); 17 Apr 2014 18:24:39 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Apr 2014 18:24:39 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id A2AEB1D5F17; Thu, 17 Apr 2014 18:24:34 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============4945034006253941619==" MIME-Version: 1.0 Subject: Re: Review Request 19686: Implementation of the issue CLOUDSTACK 6139 - System.vm.use.local.storage global setting to zone setting From: "Wilder Rodrigues" To: "daan Hoogland" , "Hugo Trippaers" Cc: "Wilder Rodrigues" , "cloudstack" Date: Thu, 17 Apr 2014 18:24:34 -0000 Message-ID: <20140417182434.26220.63950@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org Auto-Submitted: auto-generated Sender: "Wilder Rodrigues" X-ReviewGroup: cloudstack X-ReviewRequest-URL: https://reviews.apache.org/r/19686/ X-Sender: "Wilder Rodrigues" References: <20140417180711.26220.83005@reviews.apache.org> In-Reply-To: <20140417180711.26220.83005@reviews.apache.org> Reply-To: "Wilder Rodrigues" X-ReviewRequest-Repository: cloudstack-git --===============4945034006253941619== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/19686/ ----------------------------------------------------------- (Updated April 17, 2014, 6:24 p.m.) Review request for cloudstack, daan Hoogland and Hugo Trippaers. Changes ------- Updating new patch because the previous one could not be applied. Bugs: CLOUDSTACK-6139 https://issues.apache.org/jira/browse/CLOUDSTACK-6139 Repository: cloudstack-git Description ------- I changed the following code in order to accomplish what is expected by the issue: Config enum: SystemVMUseLocalStorage( "Advanced", ManagementServer.class, Boolean.class, "system.vm.use.local.storage", "false", "Indicates whether to use local storage pools or shared storage pools for system VMs.", null, ConfigKey.Scope.Zone.toString()), DeploymentPlanningManagerImpl: * I injected the DataCenterDao in order to check if the Zone uses local storage String ssvmUseLocalStorage = _configDao.getValue(Config.SystemVMUseLocalStorage.key()); DataCenterVO zone = _zoneDao.findById(plan.getDataCenterId()); boolean zoneUsesLocalStorage = zone.isLocalStorageEnabled(); if (ssvmUseLocalStorage.equalsIgnoreCase("true") && zoneUsesLocalStorage) { useLocalStorage = true; } Diffs (updated) ----- server/src/com/cloud/configuration/Config.java 6827197 server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java fdca447 Diff: https://reviews.apache.org/r/19686/diff/ Testing ------- I have tested those changes running multiple zones (2 with local storage and 1 without). Instances, networks, and all the rest are working fine. I ran the tests against 3 hosts running XenServer, where one of them has an extra disk which is used as NFS primary storage. From the 2 instances using local storage, one was created with Cloudtack 4.3 RC (9th round). In order to make it clear, below the steps I followed to test it: Global settings: system.vm.use.local.storage == true 1. Deploy Cloudstack 4.3.0 RC (9th round) 2. Create a zone (local storage enabled) a. Create an instance and network 3. Test firewalling and port forwarding 4. Upgrade Cloudstack 4.3.0 RC (9th round) to Cloudstack 4.5.0-SNAPSHOT 5. Test firewalling and port forwarding 6. Create a zone (local storage enabled) a. Create an instance and network 7. Create a zone (local storage disabled) + NFS primary storage a. Create an instance and network 8. Test firewalling and port forwarding With the steps above, I was able to set up the whole environment and make sure the VMs were running properly and ACL/Port-Forwarding were also working as expected. Global settings: system.vm.use.local.storage == false 1. Deploy Cloudstack 4.3.0 RC (9th round) 2. Create a zone (local storage disabled) + NFS primary storage a. Create an instance and network 3. Test firewalling and port forwarding 4. Upgrade Cloudstack 4.3.0 RC (9th round) to Cloudstack 4.5.0-SNAPSHOT 5. Test firewalling and port forwarding 6. Set system.vm.use.local.storage to true 7. Create a zone (local storage enabled) a. Create an instance and network 8. Create a zone (local storage enabled) a. Create an instance and network 9. Create new instance under the Zone which does not use local storage 10. Test firewalling and port forwarding Again, everything worked as expected. With the steps provided above, I can make sure that resources created with version prior to master (4.5.0-SNAPSHOT) won't have problems when performing an update. Thanks, Wilder Rodrigues --===============4945034006253941619==--