398 Commits

Author SHA1 Message Date
Rohit Yadav
a59cf68f50 Merge pull request #969 from rafaelweingartner/master-lrg-cs-hackday-002
Fixed return type Void to void in  DataMotionStrategy.The main changes are:
-	Changing methods Void to void.
-	Removal of the method Void copyAsync(DataObject srcData, DataObject
destData, AsyncCompletionCallback<CopyCommandResult> 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.

Removed trim lines from XenServerStorageMotionStrategy.

The trim lines were removed from XenServerStorageMotionStrategy.

* pr/969:
  Changed return of methods from DataMotionStrategy, Void to void

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-01-27 16:08:07 +01:00
Remi Bergsma
43ab98d823 Updating pom.xml version numbers for release 4.9.0-SNAPSHOT
Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-26 15:12:20 +01:00
Remi Bergsma
32fcc47117 Updating pom.xml version numbers for release 4.8.1-SNAPSHOT
Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-26 09:39:00 +01:00
Remi Bergsma
a4ac9d3fff Updating pom.xml version numbers for release 4.7.2-SNAPSHOT
Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-26 09:33:56 +01:00
Remi Bergsma
62f218b7bd Updating pom.xml version numbers for release 4.8.0
Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-20 23:43:35 +01:00
Remi Bergsma
fac259f0fb Merge release branch 4.7 to master
* 4.7:
  Fix execution counter to support separate counts per thread
  Add test to check that each thread has it's own execution counter
  CLOUDSTACK-9231: Root volume migration from one primary to another primary storage within the same cluster is failing
2016-01-18 16:00:29 +01:00
Nitin Kumar Maharana
40e3dfc617 CLOUDSTACK-9231: Root volume migration from one primary to another primary storage within the same cluster is failing
This situation arises when there are two management server accessing the same database.
When the migration request comes the command is forwarded from one management server to another because
the host is owned by the second management server. So, serialization of map from one to another fails.
This is fixed by converting the maps to lists.
2016-01-13 22:42:53 +05:30
Daan Hoogland
d39182f9d4 deal with PMD warnings 2015-12-26 09:02:30 +01:00
Remi Bergsma
8f5a2920e8 Updating pom.xml version numbers for release 4.8.0-SNAPSHOT
Signed-off-by: Remi Bergsma <github@remi.nl>
2015-12-21 22:09:31 +01:00
Remi Bergsma
5b112408c7 Updating pom.xml version numbers for release 4.7.1-SNAPSHOT
Signed-off-by: Remi Bergsma <github@remi.nl>
2015-12-21 19:55:04 +01:00
cirstofolini
935113fbd3 Removed unnecessary code from getGuestOsType in CitrixResourceBase 2015-12-20 15:08:44 -02:00
Daan Hoogland
94a14485f7 license 2015-12-14 17:39:06 +01:00
Boris Schrijver
a00fef8c33 Revert "Merge pull request #1243 from SudharmaJain/cs-9166"
This reverts commit 8d2e031a89f5b7c55e1d139b0d8d57d6b9163aff, reversing
changes made to 1b3a792b1211a670234b8e6a505e18cafcabe38a.

No 2x LGTM where given to this PR.
2015-12-14 16:49:11 +01:00
SudharmaJain
601f2dba24 CLOUDSTACK-9166:Build failed in Jenkins: cloudstack-rat-master #7038 2015-12-14 17:13:54 +05:30
SudharmaJain
9ae3c0a5a9 CLOUDSTACK-9127 Missing PV-bootloader-args for "SUSE Linux Enterprise Server 10 SP2 and SP3"
Added Unit test for the new method
2015-12-14 11:26:45 +05:30
Remi Bergsma
2f26a859a9 Updating pom.xml version numbers for release 4.7.0
Signed-off-by: Remi Bergsma <github@remi.nl>
2015-12-13 21:09:53 +01:00
Koushik Das
5b3ffeb6cd CLOUDSTACK-9130: Make RebootCommand similar to start/stop/migrate agent commands w.r.t. "execute in sequence" flag
RebootCommand now behaves in the same way as start/stop/migrate agent commands w.r.t. to sequential/parallel execution.
2015-12-09 15:19:10 +05:30
Rohit Yadav
f30fbe9a5c Merge branch '4.6' 2015-12-07 12:44:07 +05:30
Anshul Gangwar
f8790c3b9e CLOUDSTACK-9025: Fixed can't create usable template from snapshot in Xenserver and Vmware
Fix also reverts below commit as below solution making assumption about hypervisor which are not applicable
in case of XenServer and VmWare

Revert "CLOUDSTACK-8964: Can't create template or volume from snapshot"

This reverts commit ccf5d75cfbe769b34c021ab3653ed318cae25933.
2015-12-04 14:56:40 +05:30
Remi Bergsma
6d558c0201 Merge pull request #944 from rafaelweingartner/lrg-cs-hackday-012
Create test cases to getPatchFilePath method and class names changed In this commit we created tests cases for the respective classes in package  com.cloud.hypervisor.xenserver.resource.

We added test cases to check the implementation of  com.cloud.hypervisor.xenserver.resource.CitrixResourceBase.getPatchFiles. Therefore, we test in a more comprehensive way the tests that already exist to check the code of com.cloud.hypervisor.xenserver.resource.CitrixResourceBase.getPatchFilePath.

We added a new abstract class, called com.cloud.hypervisor.xenserver.resource.CitrixResourceBaseTest.java

This class has two tests methods:

* com.cloud.hypervisor.xenserver.resource.CitrixResourceBaseTest.testGetPathFilesExeption(CitrixResourceBase), this method tests if the getPatchFilePath() method throws the com.cloud.utils.exception.CloudRuntimeException.CloudRuntimeException when the com.cloud.utils.script.Script.findScript(String, String) return a null value;
* com.cloud.hypervisor.xenserver.resource.CitrixResourceBaseTest.testGetPathFilesListReturned(CitrixResourceBase), this method tests the correct return value from getPatchFilePath() method, basically, verify if the returned list contain the file with the same absolute path that was retrieved from the findScript method.

We also changed the name of those test classes, the change was basically remove the Path word from the name of classes.

* pr/944:
  created tests cases for method "citrixResourceBase.getPatchFiles"

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-12-03 10:12:07 +01:00
pedro-martins
d01cdb1979 created tests cases for method "citrixResourceBase.getPatchFiles"
we also changed the name of those test classes, the change was basically
remove the “Path” word from the name of classes.

change the private method
com.cloud.hypervisor.xenserver.resource.CitrixResourceBase.getPatchFiles
to protected

added new class in test cases
2015-11-28 19:06:04 -02:00
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
Devdeep Singh
00522e475b CLOUDSTACK-9081 Migration of vm across clusters fails in clustered MS setup
Storage motion of vm across clusters/xenserver-pools fails in a
clustered management server setup. In xen storage motion we have to send
a migrate_receive command to the destination host, followed by
migrate_send command to the source host. The sr and network detials of
the destination host have to be passed in migrate_send command on the
source. While migrating across clusters the source and destination
resources are seperate objects. To pass this information across
resources we have to send seperate migrate with storage receive and send
commands to the resource. In a clustered ms setup these commands may
have to be forwarded to another ms as the resource may be owned by it.
The serilization of the command and answer objects fails in such case as
it doesn't understand the xapi sr and network objects. Made a change to
serialize these objects in the resource layer and pass the around as
strings in the command and answer objects.  Reviewed-By: Likitha
2015-11-26 11:59:18 +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
Boris Schrijver
5c0366c99e CLOUDSTACK-9062: Improve S3 implementation.
The S3 implementation is far from finished, this commit focusses on the bases.

 - Upgrade AWS SDK to latest version.
 - Rewrite S3 Template downloader.
 - Rewrite S3Utils utility class.
 - Improve addImageStoreS3 API command.
 - Split various classes for convenience.
 - Various minor improvements and code optimalisations.

A side effect of the new AWS SDK is that it, by default, uses the V4 signature. Therefore I added an option to specify the Signer, so it stays compatible with previous versions.
2015-11-19 15:29:10 +01: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
Funs Kessen
c4afb76d8c host delegation logging for XenServerGuru.java 2015-10-23 20:09:06 +02:00
Koushik Das
f5b9a96d24 CLOUDSTACK-8826: XenServer - Use device id passed as part of attach volume API properly
If device id passed as part of API and available then use it otherwise fallback on XS to automatically assign one.
For ISO device id used is 3 and it is processed before any other entry to avoid conflict.
2015-09-21 17:09:14 +05:30
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
e1db6efc74 Removed unused agent command AttachVolumeCommand and corresponding answer AttachVolumeAnswer 2015-08-26 09:50:23 +05:30
Miguel Ferreira
82df5b156b Add UUIDs to constructors (fixing syntax error from 2a6c7f3)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #722
2015-08-24 14:12:49 +05:30
Miguel Ferreira
20be6c24f7 Formatting class CitrixRequestWrapperTest
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-08-24 14:12:49 +05:30
weingartner
ec8976f802 Removed duplicate code in CitrixResourceBase.getPatchFiles
@cristofolini comments:
Removed unnecessary duplicated code by having the body of the
getPatchFiles method only in the
CitrixResourceBase superclass. Given that all of its implementations
consisted of the same code
except for the path which contains the necessary file for that
implementation. An abstract method
getPatchFilePath was created in the CitrixResourceBase superclass so
that each implementation may
return the path containing the specific file needed by that
implementation.

Test cases were created for each implementation, simple as they may be.
One assert is made to verify
that the path returned by each implementation corresponds to the path
that was previously specified
on each getPatchFiles implementation.

removed trailing whitespace
2015-08-17 13:26:25 -03:00
Funs
ca68bb0ef7 xenserver: Improved message for peeples to actually see what the problem is.
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #576
2015-07-15 18:24:39 +05:30
Daan Hoogland
e62d952375 coverity 1311706: to generic exeption handling on xapi call
Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>
2015-07-14 13:41:09 +02:00
Jayapal
deb694c201 CLOUDSTACK-8324: Added migration changes for config drive 2015-07-10 09:39:27 +05:30
Daan Hoogland
6376503fe3 coverity 1308118: more resources being opened only one closed on exception nothing was closed
Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-07-09 21:30:23 +02:00
weingartner
25e9918c57 Amend last commit, used 4 spaces in code formatting instead of 1 tab character.
Signed-off-by: wilderrodrigues <wrodrigues@schubergphilis.com>

This closes #560
2015-07-09 13:37:59 +02:00
weingartner
50c4836c9f Cleaned class “com.cloud.hypervisor.xenserver.resource.XcpOssResource” that seemed to be forgotten during the evolution of the ACS. It was removed a few methods that were already coded properly in its parent class “com.cloud.hypervisor.xenserver.resource.CitrixResourceBase”. It was also removed some methods that seemed to cause weird behaviors. The methods removed/fixed are detailed as follows: • com.cloud.hypervisor.xenserver.resource.XcpOssResource.fillHostInfo(Connection, StartupRoutingCommand) – it was removed, because it always added the string “, hvm” to the host capabilities. Therefore, if one uses XCP hypervisor it could cause a lot of trouble when deploying HVM virtual machines in an environment that has PV and HVM clusters. The method is already properly coded in parent class. • com.cloud.hypervisor.xenserver.resource.XcpOssResource.launchHeartBeat(Connection) – It was removed. It was not performing anything and always returns a true value. The method of parent class is properly coded and works for XCP environments. The heartbeat plugin exists in XCP environment. • com.cloud.hypervisor.xenserver.resource.XcpOssResource.initializeLocalSR(Connection) – it was removed. The method of the parent class works properly for XCP environments. • com.cloud.hypervisor.xenserver.resource.XcpOssResource.createPatchVbd(Connection, String, VM) – It was removed. This method causes a bug in XCP environments, because of its half-implementation, it was not possible to migrate system VMs. The parent class implementation works properly for XCP. • com.cloud.hypervisor.xenserver.resource.XcpOssResource.execute(NetworkUsageCommand) – removed, hence it was already coded into parent class and its respective wrappers (“com.cloud.hypervisor.xenserver.resource.wrapper.xcp.XcpServerNetworkUsageCommandWrapper”). BTW: I noticed that the class XcpServerNetworkUsageCommandWrapper and XenServer56NetworkUsageCommandWrapper are almost the same, with the exception that XenServer56NetworkUsageCommandWrapper deals with VPC. I believe that those wrappers could be converted into one, and moved to parent. I am not doing that here because I do not have a XCP environment with advanced networking to test it. • com.cloud.hypervisor.xenserver.resource.XcpOssResource.executeRequest(Command) – removed, hence it is not needed anymor. • com.cloud.hypervisor.xenserver.resource.XcpOssResource.execute(StopCommand) – I did not understand that method. It seemed weird and its removal did not change any behavior of the environment I tested it with.
Signed-off-by: wilderrodrigues <wrodrigues@schubergphilis.com>
2015-07-09 13:37:59 +02:00
wilderrodrigues
e348e76eee CLOUDSTACK-8607 - Improving unit tests
- Adding more unit tests as suggested by Daan and Rajani.
   - Mocking SshHelper and the Script classes, used by Citrix and Libvirt resources respectively.
2015-07-06 14:58:17 +02:00
wilderrodrigues
86297e70be CLOUDSTACK-8607 - Make sure the new password replaces the old one in the queue
- Added log info to show details of the operation
   - Renamed the addPwdToQueue to replaceOldPasswdInQueue
2015-07-04 11:33:52 +02:00
wilderrodrigues
efa34361df CLOUDSTACK-8607 - Changed update script to return exit code based on the result
- Changed location of the update_host_passwd script
   - Updated the patch files for XenServer
   - Updated the script path on LibvirtComputing class
   - Removed the hostIP from the LibvirtUpdateHostPasswordCommandWrapper execute() method
2015-07-03 14:29:57 +02:00
wilderrodrigues
0dd02ce043 CLOUDSTACK-8607 - Adding support to update host passwd on XenServer hypervisors
- Adding update_host_passwd to VRScripts
   - Add accessor method to host password on CitrixResourceBase
   - Add implementation to CitrixUpdateHostPasswordCommandWrapper
   - Improve testUpdateHostPasswordCommand() unit test on CitrixRequestWrapperTest
   - Add line to patch files on xenserver directory

Concerning the LibVirt change:

   - I forgot to assing the return of the getDefaultHypervisorScriptsDir() method to the hypervisorScriptsDir variable
2015-07-03 10:24:44 +02:00
Sanjay Tripathi
9044a02d9a VM Snapshot Usage for DATA disk is reported as the size of the DATA disk instead of the actual snapshot size.
This closes #485
2015-06-19 15:55:21 +05:30
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
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