- new utility method introduced in PropertiesUtil to load properties objects from files
- RegionManagerImpl modified to use the utility method
- Tests added for both
Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
Supplementing the fix/commit 748315620bbbc472652e38df960d136beee4882e
While remote executing commands through ssh, wait for channel condition of EXIT_STATUS.
Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>
Currently during ssh execution of remote command, if no response is received within timeout, Cloudstack is returning success result.
This is resulting in false positives. Fix is to check if exit status of remote command is available or not. If not, return failure result.
Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>
Changes:
- Calendar throws IllegalArgumentException when the hour of the day happens to be skipped due to DST changes.
- Fix will ask Calendar to adjust the time accordingly and get the next closest time
Introduction of a new Transaction API that is more consistent with the style
of Spring's transaction managment. The existing Transaction class was renamed
to TransactionLegacy. All of the non-DAO code in the management server has been
updated to use the new Transaction API.
Removed the assertion on the number of fields from ReflectUtil because it did not work with bytecode manipulation like what sonar works with.
Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
- code comment turned to javadoc
- added braces to if and for statements to make it look more like the rest
- tests added
Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
- javadoc changed - the old one was copy-pasted from AgentShell
- start and stop method removed - they did the same as the overridden methods
- _counter removed as it was only written, but never read
- remove from _asleep map was moved to a finally block, to make sure it is removed even in case of the thread gets interrupted
- Tests created for the above scenarios.
Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
All of the code changes for the Spring Modularization will work in
a modularized context or a non-modularized context. This commit
is the final commit to turn modularization on. Revert this commit
to disable the modularization and go back to monolithic Spring
configuration.
ACS is now comprised of a hierarchy of spring application contexts.
Each plugin can contribute configuration files to add to an existing
module or create it's own module.
Additionally, for the mgmt server, ACS custom AOP is no longer used
and instead we use Spring AOP to manage interceptors.
The managed context framework provides a simple way to add logic
to ACS at the various entry points of the system. As threads are
launched and ran listeners can be registered for onEntry or onLeave
of the managed context. This framework will be used specifically
to handle DB transaction checking and setting up the CallContext.
This framework is need to transition away from ACS custom AOP to
Spring AOP.
- removed methods that were not used
- parseLong, parseInt and parseFloat replaced with the commons-lang NumberUtils call
- Test for the remaining methods
Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
Signed-off-by: Hugo Trippaers <htrippaers@schubergphilis.com>
As we moved to a more Spring managed lifecycle, the lifecycle management
in ComponentContext is not needed. The transition to fully spring managed
will not happen all at once. The management server will be done first and
then AWSAPI and UsageServer will come later. This change allows the
ComponentContext in the context of the management server to be bypassed.
Note, by default, the ComponentContext will run its initialization.
It was implemented by extending the NFS provider. Its validation was updated so that you can pass it a URL containing the
details of a CIFS share. The code that mounts NFS shares was extended to allow it do the same for CIFS shares. Otherwise,
the secondary storage code is left unchanged.