823 Commits

Author SHA1 Message Date
weingartner
4a9487e581 Changed return of methods from DataMotionStrategy, Void to void
The main changes are:
•	Changing methods “Void” to “void”.
•	Removal of the method “Void copyAsync(DataObject srcData, DataObject
destData, AsyncCompletionCallback callback)” that was never used. We
noticed that methods form that class are using the return type Void with
capital V. This way that method has to return a null value at the end.
2015-11-28 12:09:54 -02:00
Sateesh Chodapuneedi
6a9956e0f5 CLOUDSTACK-4787 Allow selection of scsi controller type in vSphere
commit #7
    So far only 1 controller (scsi or ide) is supported in Cloudstack for ide or
    scsi, this is existing limitation. Added support for 2nd IDE controller. Support adding IDE
    virtual disk to VM. Also added check if VM is running as IDE virtual disk cannot be attached
    to VM if VM is runnning.If user detaches a virtual disk on lower unit number of controller,
    then subsequent attach operation should find free unit number on the controller and attach
    the virtual disk there.

    commit #6
    Let the controllers of existing VMs continue without flip, current busInfo retrieved from
    chain_info field of volume record from database would be preferred over
    controller settings from all configuration settings.

    commit #5
    Editing global configuration param vmware.root.disk.controller osdefault value results
    in loss of previous root disk controller type. Hence root disk's controller type for legacy
    VMs is unknow post that modificaiton by user. If VM is stop/start then we could get this
    infromation from bus info of existing volume. But if user resets VM and then try to start VM.
    The existing bus info would be lost. Hence existing disk info is not available to depend on.
    Using lsilogic or generic scsi controller for ROOT disk of legacy VMs if reset.

    commit #4
    Avoid adding additional (>1) scsi controllers to system vms. While attaching volume to legacy VM
    don't use osdefault optoin which applicable only for VM created with the option enabled, use
    legacy data disk controller type (lsilogic)

    commit #3
    If root disk's controller type is scsi and data disk controller type condenses
    to any of scsi sub-types then data disk controller type would fall back to root disk controller itself. This
    ensures data volumes would be accessible in all cases as controller of root volume would be reliable
    and it means VM has the supported controller. It also avoids mix of scsi controller sub-types in a user instance.
    Also translating disk controller type scsi to lsilogic.

    commit #2
    Support auto detection of recommended virtual disk controller type for specific guest OS.

    commit #1
    Support granual controller types. Add support for controller types in template registration as well.

    Fix white spaces.
    Removed stale HEAD merge lines
    Removed tail of merge lines
    Fixed VmwareResource, removing storage commands that moved to VmwareStorageProcessor.
    removed stale code of controller that is present in processor
    Fixed check style errors.
    Fixed injection.
    Tested with Linux and windows templates. Unable to run iso based tests due to few bugs in register iso area.

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

(cherry picked from commit a4cc987a6f66f20c434942956fffe5951df09e43)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-11-27 18:39:41 +05:30
cirstofolini
1a64c247ad Removed unnecessary @Local annotations and their respective imports from the ComponentLifecycleBase class and its subclasses. 2015-11-21 18:31:11 -02:00
nvazquez
e1d1a40325 CLOUDSTACK-8956: Deploy VM on NSX managed network changes if NSX Api Version >= 4.2: has to connect to "br-int" of "nsx.network" type 2015-11-16 11:29:30 -08:00
Remi Bergsma
1f53f2a93e Updating pom.xml version numbers for release 4.7.0-SNAPSHOT
Signed-off-by: Remi Bergsma <github@remi.nl>
2015-11-15 18:54:13 +01:00
Remi Bergsma
b38c3bed0c Updating pom.xml version numbers for release 4.6.1-SNAPSHOT
Signed-off-by: Remi Bergsma <github@remi.nl>
2015-11-13 21:27:57 +01:00
Remi Bergsma
e31ade03c6 Updating pom.xml version numbers for release 4.6.0
Signed-off-by: Remi Bergsma <github@remi.nl>
2015-11-10 15:45:34 +01:00
Rajani Karuturi
8bc0294014 Revert "Merge pull request #714 from rafaelweingartner/master-lrg-cs-hackday-003"
This reverts commit cd7218e241a8ac93df7a73f938320487aa526de6, reversing
changes made to f5a7395cc2ec37364a2e210eac60720e9b327451.

Reason for Revert:

noredist build failed with the below error:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.2:compile (default-compile) on project cloud-plugin-hypervisor-vmware: Compilation failure
[ERROR] /home/jenkins/acs/workspace/build-master-noredist/plugins/hypervisors/vmware/src/com/cloud/hypervisor/guru/VMwareGuru.java:[484,12] error: non-static variable logger cannot be referenced from a static context
[ERROR] -> [Help 1]

even the normal build is broken as reported by @koushik-das on dev list
http://markmail.org/message/nngimssuzkj5gpbz
2015-08-31 11:27:57 +05:30
Rafael Weingartner
3818257a68 Solved jira ticket: CLOUDSTACK-8750 2015-08-28 22:35:08 -03:00
Koushik Das
e401d39d0b Merge pull request #741 from koushik-das/code_cleanup
messages: Removed unused agent command AttachVolumeCommand and corresponding answer AttachVolumeAnswer

These types are not used anywhere in the orchestration layer.

Signed-off-by: Koushik Das <koushik@apache.org>
2015-08-27 17:13:25 +05:30
Likitha Shetty
f499281625 CLOUDSTACK-8602. MigrateVirtualMachineWithVolume leaves old chain data for volume. Update chain info of a volume after migration.
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #548
2015-08-26 15:15:53 +05:30
Koushik Das
e1db6efc74 Removed unused agent command AttachVolumeCommand and corresponding answer AttachVolumeAnswer 2015-08-26 09:50:23 +05:30
Boris Schrijver
c30ba1df0b Refactored Nic.java for readability.
Changed methodnames according to Nic.java refactor.

Fixed NicVO.java due to regression from Nic.java refactor.

Fixed VmWareGuru.java after Nic.java refactor.

See issue CLOUDSTACK-8736 for ongoing effort to clean up network code.
2015-08-18 14:04:48 +02:00
Remi Bergsma
64ff67da55 Merge pull request #654 from DaanHoogland/CLOUDSTACK-8656
Cloudstack 8656: do away with more silently ignoring exceptions.a lot of messages added.
some restructuring for test exception assertions and try-with-resource blocks

* pr/654: (29 commits)
  CLOUDSTACK-8656: more logging instead of sysout
  CLOUDSTACK-8656: use catch block for validation
  CLOUDSTACK-8656: class in json specified not found
  CLOUDSTACK-8656: removed unused classes
  CLOUDSTACK-8656: restructure of tests
  CLOUDSTACK-8656: reorganise sychronized block
  CLOUDSTACK-8656: restructure tests to ensure exception throwing
  CLOUDSTACK-8656: validate the throwing of ServerApiException
  CLOUDSTACK-8656: logging ignored exceptions
  CLOUDSTACK-8656: try-w-r removes need for empty catch block
  CLOUDSTACK-8656: try-w-r instead of clunckey close-except
  CLOUDSTACK-8656: deal with empty SQLException catch block by try-w-r
  CLOUDSTACK-8656: unnecessary close construct removed
  CLOUDSTACK-8656: message about timed buffer logging
  CLOUDSTACK-8656: message about invalid number from store
  CLOUDSTACK-8656: move cli test tool to separate file
  CLOUDSTACK-8656: exception is the rule for some tests
  CLOUDSTACK-8656: network related exception logging
  CLOUDSTACK-8656: reporting ignored exceptions in server
  CLOUDSTACK-8656: log in case we are on a platform not supporting UTF8
  ...

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-08-14 21:38:49 +02:00
Mike Tutkowski
8b0266d12e Merge branch 'pr/547'
* pr/547:
  CLOUDSTACK-8601. VMFS storage added as local storage can be re-added as shared storage. Fail addition of a VMFS shared storage pool in case it has already been added as local storage in CS.

Signed-off-by: Mike Tutkowski <mike.tutkowski@solidfire.com>
2015-08-10 19:00:53 -06:00
Daan Hoogland
ed6e261521 CLOUDSTACK-8656: t-w-r on socket channel
like previous in hyperv now in vmware
2015-08-04 14:24:04 +02:00
Daan Hoogland
e2b6237464 CLOUDSTACK-8656: debug messages on interupted exceptions 2015-07-30 16:03:10 +02:00
Daan Hoogland
85e002b230 CLOUDSTACK-8656: filling empty catch block with info messages
using regexp "catch\s*\(\s*(Exception|Throwable)\s*\w*\)\s*\{\s*\}"
2015-07-30 15:51:52 +02:00
Likitha Shetty
f5ed824ea2 CLOUDSTACK-8598. CS reports volume migration as successful but the volume is not migrated in vCenter.. For the following disk operations - migration, snapshot creation, resize, detach and template creation, CS should do an exact disk match between volume path and vCenter disk name. If the exact matching fails to find a disk, CS should fall back to the old method of partial matching on a trimmed disk.
Signed-off-by: wilderrodrigues <wrodrigues@schubergphilis.com>

This closes #543
2015-07-16 10:44:58 +02:00
Likitha Shetty
9463356ca6 CLOUDSTACK-8600. Upon detaching a disk, delete VM folder if empty.
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #545
2015-07-01 14:53:23 +02:00
Likitha Shetty
299c07c3e1 CLOUDSTACK-8597. Failed to migrate volume from zone-wide to cluster-wide storage. While live migrating a volume, CS chooses the endpoint to perform the migration by selecting any host that has the storage containing the volume mounted on it. Instead, if the volume is attached to a running VM, the endpoint chosen by CS should be the host that contains the VM.
Signed-off-by: wilderrodrigues <wrodrigues@schubergphilis.com>

This closes #541
2015-07-01 12:33:26 +02:00
Likitha Shetty
13a98dd196 CLOUDSTACK-8601. VMFS storage added as local storage can be re-added as shared storage.
Fail addition of a VMFS shared storage pool in case it has already been added as local storage in CS.
2015-07-01 10:47:36 +05:30
Daan Hoogland
9eff27a080 findbugs: static member should be final
Signed-off-by: Daan Hoogland <daan@onecht.net>

This closes #495
2015-06-20 00:57:59 +02:00
Daan Hoogland
871ba9c521 findbugs: ignored return value should have been returned down stack
Signed-off-by: Daan Hoogland <daan@onecht.net>

This closes #494
2015-06-20 00:57:01 +02:00
Daan Hoogland
0952580096 findbugs: try-with-resource to circumvent not handling an exception on
close
2015-06-17 12:41:04 +02:00
Daan Hoogland
6da6c5f762 findbugs: log unhandled exception as warning 2015-06-17 12:35:39 +02:00
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
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
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
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
Likitha Shetty
04365601da CLOUDSTACK-8412. VM migration with storage fails.
Update MigrateWithStorageCommand to avoid JSON deserialization error.
2015-04-28 10:22:00 +05:30
Likitha Shetty
f45e6b94ed CLOUDSTACK-8405: Restore VM results in deletion of data disk.
Dont evict template when a delete command has been sent to VMware resource for deletion of volume.
2015-04-27 16:37:46 +05:30
Rohit Yadav
06e353e5c7 vmware: support vmfs as local storage pool type
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit 752d784d92b4ce461ec6a19a6b54220bb967d4d0)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-16 17:36:52 +05:30
Rohit Yadav
7949d2922d vmware: plugin improvements
- use sticky chmod 1777 on the mountpoint
- remove dead code

(cherry picked from commit eea716b7916c916442b19d14e0f6e5c57bebb91e)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-13 15:49:01 +05:30
Rohit Yadav
37820e15f2 CLOUDSTACK-7593: allow nic type to be fetched from vm's details
(cherry picked from commit 43db75c319b425f3b39770d556df59333921bf92)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

Conflicts:
	engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
2015-04-13 15:47:03 +05:30
Daan Hoogland
6a821730ce Boolean -> boolean 2015-03-25 22:20:40 +01:00
Daan Hoogland
048212b117 findbugs: Boolen function should not return null 2015-03-25 21:46:47 +01:00
Rajani Karuturi
843f6b1691 CLOUDSTACK-5236 : ability to identify where the user is from (ex. LDAP)
Added a source column to the user table.

Source now has only two values UNKNOWN,LDAP with UNKNOWN being the
default and is an enum is com.cloud.User.

When the source is UNKNOWN, the old method of authenticating against all
the available authenticators is used. If a source is available, only
that particular authenticator will be used.

added overloaded methods in AccountService to createUserAccount and
createUser with source specified.

(cherry picked from commit 5da733072e838c830720909ef5ba27ef6ce6d0b0)
2015-03-16 14:53:53 +05:30
Sanjay Tripathi
3d411dc616 Fixed simulator and vmware NPE issue. 2015-03-13 14:59:34 +05:30
Likitha Shetty
bdd28a45ed CLOUDSTACK-8319. For both 'MigrateVolume' and 'MigrateVMWithVolumes, ensure VM's vconfiguration files are migrated along with VM's root volume. 2015-03-12 11:57:02 +05:30