Hi all,
I have done some work to get the feature CLOUDSTACK-6139 implemented. I did not
change many things, basically I made the Config.SystemVMUseLocalStorage enum to
use ConfigKey.scope.Zone in its constructor and changed the
DeploymentPlanningManagerImpl. The changes are depicted below (only snippets):
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;
}
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 won't have problems when performing an update.
How do you see those changes? What do you think about the way I tested it? Is
there anything else I should do before I file a review request to Apache Review
Board?
Remarks: there are several NPE and ClassCastException happening. Also, there is
a AQL error (see below) when performing SELECT on autoscale_vmgroups. It was
not happening with 4.3.0 or 4.5.0-SNAPSHOT. Only happens if an upgrade is done.
Unknown column 'autoscale_vmgroups.last_interval' in 'field list'
In addition, the NPEs are related to the Router Alerts. I see errors on the
SMlog and also on vmops.log (in the host itself)
SMlog ==> FAILED in util.pread: (rc 127) stdout: '', stderr: 'bash:
/opt/cloud/bin/getRouterAlerts.sh: No such file or directory
Vmops ==> 2014-03-25 14:32:29 DEBUG [root] routerProxy command
getRouterAlerts.sh 169.254.2.18 null failed
I deleted the VM Router and restarted my network... it fixed the problem.
Thanks in advance for your feedback.
Cheers,
Wilder