1746 Commits

Author SHA1 Message Date
Daan Hoogland
6da6c5f762 findbugs: log unhandled exception as warning 2015-06-17 12:35:39 +02:00
Sanjay Tripathi
d702b63bfb CLOUDSTACK-8569: The latter snapshot export for the same volume will fail is 2 snapshot exports are queued
This closes #469
2015-06-17 15:27:03 +05:30
Sanjay Tripathi
47278556f5 CLOUDSTACK-8567 Migrating primary storage causes name_label field to blank.
This closes #468
2015-06-17 14:46:51 +05:30
Daan Hoogland
41c1fddaee findbugs: better message and fallback to defaultCharset 2015-06-16 11:57:15 +02:00
Rafael da Fonseca
0851e4e54b Catch encoding exception
Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>

This closes #464
2015-06-16 11:24:51 +02:00
Rafael da Fonseca
9f2ebdf443 Fix findbugs encoding issue in VmwareStorageProcessor.java Any encoding would do fine as it's just used to generate a UUID. Sticking with UTF-8 for consistency
Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>

This closes #460
2015-06-16 08:56:33 +02:00
Rafael da Fonseca
9bb920af65 Fix findbugs warning in VmwareStorageManagerImpl.java Any encoding would do fine as it's just used to generate a UUID. Sticking with UTF-8 for consistency
Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>

This closes #461
2015-06-16 08:53:56 +02:00
Rafael da Fonseca
3d48af41a8 Fix findbugs encoding issue in VmwareResource.java Key file should be UTF-8 encoded in VR
Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>

This closes #462
2015-06-16 08:51:54 +02:00
Wido den Hollander
4b4c52ea77 CLOUDSTACK-8560: Stat the resulting image after copying from template and return the size
This way we update the DB with the actual size of the disk after deployment from template
2015-06-15 17:55:56 +02:00
Rafael da Fonseca
be474f95a1 Fixed 4 findbugs warnings in CitrixResourceBase.java Unnecessary boxing/unboxing of primitive values
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #425
2015-06-15 12:09:39 +03:00
Rafael da Fonseca
16ddd498d5 Fix findbugs warning in UcsManagerImpl.java Integer was being created to assign value to int
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #424
2015-06-15 12:09:37 +03:00
Rafael da Fonseca
9ba4e9cb86 Fix findbugs warning in OvmResourceBase.java CreatePrivateTemplateAnswer constructor takes long as physicalSize parameter, Long was being created instead
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #423
2015-06-15 12:09:36 +03:00
Rafael da Fonseca
9d2fef0de8 Fix findbugs warning in HypervDirectConnectResource.java Two boxed Longs were being created instead of simple long
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #422
2015-06-15 12:09:34 +03:00
Rafael da Fonseca
30457556f9 Fix findbugs warning in BareMetalResourceBase.java Boxed Integer was being instantiated to assign to an int variable
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #421
2015-06-15 12:09:32 +03:00
Rafael da Fonseca
85ad1b7e0f Fix 3 findbugs encoding warnings in VmwareStorageProcessor.java Ova templates and metadata should be written to file in UTF-8 Fix warning in UUID generation
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #411
2015-06-15 12:09:13 +03:00
Rafael da Fonseca
ccd7d41ee3 Resolve findbugs encoding warning
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #392
2015-06-15 12:07:55 +03:00
Rafael da Fonseca
967da97f51 Fix 2 findbugs warnings in VmwareStorageManagerImpl.java Template files and metadata should be written to file in UTF-8
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #410
2015-06-15 12:06:19 +03:00
Rafael da Fonseca
11fec86ba3 Fix 1 findbugs warning in VmwareResource.java
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #409
2015-06-15 12:06:11 +03:00
Rafael da Fonseca
474065e98b Fix findbugs encoding warning in VmwareServerDiscoverer.java Input string should only contain safe characters, since it's derived from a Long object. This just gets rid of the findbugs warning
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #408
2015-06-15 12:06:01 +03:00
Rafael da Fonseca
f8b364b7c7 Was safe either way as this piece of code should only run in linux, this just gets rid of the findbugs warning
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #402
2015-06-15 12:04:47 +03:00
Rafael da Fonseca
3299f23ea2 Fix findbugs encoding warning in LibvirtCreatePrivateTemplateFromVolumeCommandWrapper Libvirt templates should be written in UTF-8, default was already doing that so this just gets rid of the findbugs warning
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #401
2015-06-15 12:04:24 +03:00
Rafael da Fonseca
b869a16332 Remove unused import to fix checkstyle warning
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #400
2015-06-15 12:04:19 +03:00
Rafael da Fonseca
949e97dec6 Fix findbugs warning in LibvirtConsoleProxyLoadCommandWrapper Encoding is now specified in both server and clients for the console proxy getstatus command For some reason, findbugs did not detect unsafe encoding issue in ConsoleProxyResource.java, is properly specified now though... CitrixConsoleProxyLoadCommandWrapper was specifying system default encoding for operation, should be ok because default for xenserver is UTF-8 since it's linux based, but it's best to specify exact encoding set on the server end to be consistent
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-06-15 12:04:18 +03:00
Rafael da Fonseca
cc6d28fc98 Fix another findbugs encoding warning in CitrixResourceBase In this case, using default encoding is desired, since the purpose is to read shell command output, which uses the platform's default encoding. This gets rid of the findbugs warning.
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #396
2015-06-15 11:59:48 +03:00
Rafael da Fonseca
faa38ad416 Fix findbugs encoding warning in CitrixResourceBase Output of text files should be UTF-8, this is the default for linux, will now always use the same format for every platform
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #395
2015-06-15 11:59:38 +03:00
Sateesh Chodapuneedi
5e41a830a5 This closes #373
CLOUDSTACK-3317 - DVS does not support management\storage network

Added support for Management and Storage Network traffic over VMware DVS in CloudStack deployments. Also added support for storage VLAN over dvPortGroup.

Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>

CLOUDSTACK-3317 - DVS does not support management\storage network

Use non-zero dvport count while updating dvportgroups of system traffic.
Updated configuration compare logic to avoid update dvportgroup operation unless required.
This would help improve speed in vm/network deployment as the update calls would reduce. Also improved logging.

Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>

Adding unit tests in class HypervisorHostHelperTest

Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>

Added license header to new file being added to repo/branch.

Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>
2015-06-10 02:07:40 +05:30
Daan Hoogland
b272d7717e Revert "Fix 2 findbugs high priority warnings"
This reverts commit 1ca74dac269faa890c830ccde67c5007ef2e3c45.
2015-06-08 10:01:19 +02:00
Rafael da Fonseca
e8c7069f73 Fix findbugs high priority warning VmwareStorageManagerImpl.java:1023, RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE, Priority: High Redundant nullcheck of datastoreVolumePath, which is known to be non-null in com.cloud.hypervisor.vmware.manager.VmwareStorageManagerImpl.getVolumePathInDatastore(DatastoreMO, String)
Assertion is not used in runtime, correct way is throw and handle exception without killing app

Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>

This closes #362
2015-06-08 09:40:50 +02:00
Rafael da Fonseca
38c269d71e Fix performance issue reported by findbugs (unnescessary boxing/unboxing) VmwareResource.java:693, DM_BOXED_PRIMITIVE_FOR_PARSING, Priority: High VmwareResource.java:4769, DM_BOXED_PRIMITIVE_FOR_PARSING, Priority: High Boxing/unboxing to parse a primitive com.cloud.hypervisor.vmware.resource.VmwareResource.getNetworkStats(String)
Now op is faster and takes up less memory

Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>

This closes #365
2015-06-08 09:32:52 +02:00
Rafael da Fonseca
1ca74dac26 Fix 2 findbugs high priority warnings
VmwareResource.java:315, MS_SHOULD_BE_FINAL, Priority: High
com.cloud.hypervisor.vmware.resource.VmwareResource.s_serviceContext isn't final but should be

VmwareResource.java:331, MS_SHOULD_BE_FINAL, Priority: High
com.cloud.hypervisor.vmware.resource.VmwareResource.s_powerStatesTable isn't final but should be

Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>

This closes #363
2015-06-08 09:24:07 +02:00
wilderrodrigues
93845afd53 Using a try-wioth resrouce block as suggested in @DaanHoogland review.
Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>

This closes #355
2015-06-04 12:34:05 +02:00
wilderrodrigues
7f4e2c7cf0 Renaming the variable from "s" to "script"
Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>
2015-06-04 12:34:05 +02:00
wilderrodrigues
6138d9a690 Coverity issue 1116812 - Replacing concatenation with optionsBuffer.append(option.getKey()).append('=').append(option.getValue()).append(',');
Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>
2015-06-04 12:34:05 +02:00
wilderrodrigues
9ff38486a1 Coverity issue 1116677 - Avoiding catching only Exception. Makes the code too britle. - Catching the QemuImgException and throwing it to be caught further in the code - Surrounding the output stream with try/catch and throwing it to be further handled in the code. Closing the output stream quietly.
Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>
2015-06-04 12:34:05 +02:00
wilderrodrigues
6271663682 Formatting the code - Adding final modifier and indenting the code
Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>
2015-06-04 12:34:04 +02:00
wilderrodrigues
fe78c76691 Coverity issue: 1012179 - Commenting out unused variable.
Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>
2015-06-04 12:34:03 +02:00
wilderrodrigues
159d8c2c97 Formatting the code - Adding final modifier to attributes and indenting the code.
Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>
2015-06-04 12:34:03 +02:00
Daan Hoogland
3d4d152753 CID 1302976 Scanner in try-with-resource
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #352
2015-06-04 00:09:40 +02:00
Daan Hoogland
109b6e94d3 CID 1302974: Scanner in try-with-resource
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #353
2015-06-04 00:09:16 +02:00
Rohit Yadav
f341246888 CLOUDSTACK-8530: KVM hosts without active agents should be in Disconnected state
KVM hosts which are actuall up, but if their agents are shutdown should be put
in disconnected state. This would avoid getting the VMs HA'd and other commands
such as deploying a VM will exclude that host and save us from errors.

The improvement is that, we first try to contact the KVM host itself. If it fails
we assume that it's disconnected, and then ask its KVM neighbours if they can
check its status. If all of the KVM neighbours tell us that it's Down and we're
unable to reach the KVM host, then the host is possibly down. In case any of the
KVM neighbours tell us that it's Up but we're unable to reach the KVM host then
we can be sure that the agent is offline but the host is running.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
Signed-off-by: wilderrodrigues <wrodrigues@schubergphilis.com>

This closes #340
2015-06-02 13:27:16 +02:00
wilderrodrigues
607a63b12d Mocking the Connect object used in the LibvirtMigrateCommandWrapper
When executing the tests in an environment where Libvirt is also installed, it
caused errors.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #342
2015-06-01 21:11:25 +02:00
wilderrodrigues
b267c5fc5a Replacing real IPs by 127.0.0.1. - It was causing problems in some environments - The Ips should have been removed in a previous commit, but some of them were missed
Signed-off-by: wilderrodrigues <wrodrigues@schubergphilis.com>

This closes #325
2015-05-29 11:25:40 +02:00
Jayapal
b616522088 CLOUDSTACK-8324: Corrected the file paths for xenserver command files
This closes #315
2015-05-28 17:02:09 +05:30
Jayapal
6e96fc6f38 CLOUDSTACK-8324: Updated import and added ResourceWrapper annotation 2015-05-28 15:56:37 +05:30
Jayapal
3a8d1f7c55 CLOUDSTACK-8324: Added unit test cases for GetVmIpAddressCommand 2015-05-28 15:56:37 +05:30
Jayapal
e407986183 CLOUDSTACK-8324: Added config drive support for xenserver 2015-05-28 15:51:50 +05:30
Jayapal
7984ae5283 CLOUDSTACK-8324: Resource base changes for vm ip fetch 2015-05-28 15:42:08 +05:30
wilderrodrigues
b155129ae8 Fixing the packaging of the Xen resource tests - The package declaration of all Test classes was point to a package that was not represented as a directory - For example: Class A had "package b.c.d;" as declaration, but the class A was under directory "c"
Maven was bulding the project and executing the tests just fine because it uses "-sourcepath". However,
with IDEs and javac it would fail.

Signed-off-by: wilderrodrigues <wrodrigues@schubergphilis.com>

This closes #317
2015-05-27 16:06:33 +02:00
wilderrodrigues
ce9014d2ec Fix the NPE tht was being caught by the executeRequest() method. - The LibvirtUtilitiesHelper should have been injected, but it did not work on the Agent side. Due to that, when sending a StartCommand we were experiencing NPE, which made impossible to get SSVM/CPVM started. - The LibvirtUtilitiesHelper class is now being instantiated withing the LibvirtComputingResource
Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>

This closes #318
2015-05-27 13:19:57 +02:00
Rohit Yadav
cde6ef94b8 CLOUDSTACK-8247: Pull average Cpu util report between polling
Pull average Cpu util report between polling intervals instead of since boot
instead of using values since uptime

(cherry picked from commit 04176eaf171b46638be99b2f675aa2f09e99e1b8)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

Conflicts:
	plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java

This closes #297
2015-05-25 15:52:00 +02:00