After upgrade the SSVM was staying in connecting/alert state. This was because
while handling the processConnect command for ssvm the management server was
trying to template sync. For resource limit calculation it was trying to get the
remote size of the template. If the template was no longer available a number
format exception was thrown. The process connect wasn't getting completed and
the ssvm used to stay in connecting/alert state. While creating template from
snapshot cloudstack looks for up and enabled ssvms and because there wasn't
any available (as the ssvm was in coonecting/alert state) it used to pick the
wrong resource (LocalNfs*Resource) instead of the NfsSecondaryStorageResource.
Fixed the issue by making sure number format exceptions are avoided so that
SSVM moves to the right state.
No change in behavior if management server has internet connection.
Now if management server doesn't have internet connection download process will not fail. But CS will noly check if the account has already reached or maxed its limits instead of checking if the limit will be breached with the addition of the new storage
a unit test for the most frequently used methods in the Script class
Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
Signed-off-by: Prasanna Santhanam <tsp@apache.org>
Eventutils and ActionEventUtils files
removing the 'EventUtils' file which got merged back during the Spring
changes to master at 4.1. 'EventUtils' file was replaced by
'ActionEventUtils', and the original file was removed for events
frameworks. This file conflict was resulting in action events not to be
published on to event bus
Detail: users should be able to add url parameters to the usage database
connection string, just like with the cloud database
BUG-ID: CLOUDSTACK-3410
Bugfix-for: 4.2
Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1373350596 -0600
EnumerationImpl was not used and duplicates functionality
with org.apache.commons.collections.iterators.EnumerationIterator
Signed-off-by: Prasanna Santhanam <tsp@apache.org>
- writeToFile removed since no references to it
- readFileAsString replaced with FileUtils.readFileToString
- minor code duplication removed in dependent method getNicStats
- unit test added
Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
commons-lang is already a transitive dependency of the utils project, which allows removing some duplicated functionality.
This patch replaces StringUtils.join(String, Object...) with it's commons-lang counterpart.
It also replaces calls to String join(Iterable<? extends Object>, String) in cases where an array is already exist and it is only wrapped into a List.
Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>