1974 Commits

Author SHA1 Message Date
Remi Bergsma
a1d2c531f6 Merge pull request #1007 from ustcweizhou/dedicated-ip-for-domain
[4.7] CLOUDSTACK-8958: add dedicated ips to domain (account for now)For now, we dedicate ip pool to account, however, other accounts in the same domain cannot fetch the ip from this ip pool.
By dedicating ip pool to domain, accounts in the domain can fetch the public ip from same ip pool.

* pr/1007:
  CLOUDSTACK-8958: throw an exception if project account cannot be found
  CLOUDSTACK-8958: add dedicated ips to domain (account for now)

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-11-29 09:39:25 +01: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
Patrick Dube
c76d317150 CLOUDSTACK-6276 Fixing affinity groups for projects 2015-11-27 14:43:02 -05:00
cirstofolini
4a34901ff6 Removed unused code from the EngineHostDao Implementation. 2015-11-26 22:46:55 -02:00
Abhinandan Prateek
d09898553e CLOUDSTACK-9064: The users should be able to create multiple Guest Shared Networks in same Vlan ID, same Physical Network and same network, just with a different IP ranges. 2015-11-25 10:22:24 +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
Remi Bergsma
7665bdc815 Merge pull request #1083 from borisroman/CLOUDSTACK-9062
CLOUDSTACK-9062: Improve S3 implementation.The S3 implementation is far from finished, this commit focuses 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 optimizations.

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.

Please review thoroughly, both code inspection and (automated) integration tests. Currently no integration tests are available specifically for S3. Therefore the implementation is needed to be tested manually, for now...

What I tested:
 - Greenfield install -> will download latest systemvm template automatically to S3.
 - Upload a template/iso
 - Download a template/iso
 - Restart of management server -> list available templates -> doesn't download them again if available.

* pr/1083:
  CLOUDSTACK-9062: Improve S3 implementation.

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-11-20 22:27:17 +01:00
Remi Bergsma
b3b56e2cd8 Merge release branch 4.6 to master
* 4.6:
  CLOUDSTACK-9053 security upgrade as per COLLECTIONS-580
  CLOUDSTACK-9055: fix NPE in updating Redundant State of VPC networks
  CLOUDSTACK-9057 remove old system vm upgrade code
2015-11-20 20:53:58 +01: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
95ae7963d5 Merge pull request #801 from nlivens/updated-nuage-vsp-plugin
CLOUDSTACK-8832 : Update Nuage VSP plugin to work with Nuage VSP release 3.2

* pr/801:
  CLOUDSTACK-8832 : Update Nuage VSP plugin to work with Nuage VSP release 3.2

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-11-18 12:09:09 +01:00
Daan Hoogland
c669c93b05 CLOUDSTACK-9046 rename enums to adhere to naming conventions 2015-11-16 13:41:16 +00:00
Daan Hoogland
586c325167 CLOUDSTACK-9047 use 'State's only with context
there are more types called 'State'
  (or to be called so but now 'state')
  So remove imports and prepend their enclosing class/context to them.
2015-11-16 13:41:12 +00:00
Daan Hoogland
d6e77624d9 CLOUDSTACK-9057 remove old system vm upgrade code 2015-11-16 10:46:02 +00:00
Rajani Karuturi
17219dfe79 Merge release branch 4.6 to master
* 4.6:
  more poms didn't get updated with script
  implemented upgrade path from 4.6.0 to 4.6.1
  checkstyle pom didn't get updated with script
  debian: add 4.6.1-snapshot to changelog
  Updating pom.xml version numbers for release 4.6.1-SNAPSHOT
  Updating pom.xml version numbers for release 4.6.0
2015-11-16 15:43:08 +05:30
Wei Zhou
37301ed454 CLOUDSTACK-8958: add dedicated ips to domain (account for now) 2015-11-16 10:17:40 +01:00
Remi Bergsma
6536992671 implement upgrade paths from 4.6.0/4.6.1 to 4.7.0 2015-11-15 19:11:50 +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
e0ac9df529 implemented upgrade path from 4.6.0 to 4.6.1 2015-11-15 14:43:22 +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
Wilder Rodrigues
72e79bcaa6 CLOUDSTACK-9046 - Add new ACS systemVMs website
- Also change the URl in the SQL file.
2015-11-09 15:13:53 +01:00
Wilder Rodrigues
4b503b4582 CLOUDSTACK-9046 - Add SystemVM upgrade from 4.5 to 4.6 in the Upgrade452to460.java file 2015-11-09 10:06:19 +01:00
Remi Bergsma
0c52f70b45 Merge pull request #995 from kansal/CLOUDSTACK-9002
CLOUDSTACk-9002: VM deployment is successful even when dhcp entry command fails - Fixed

Reason: The return value of the call to accept() function in the applyRules() function of BasicNetworkTopology.java was not checked for success or failure. As a result even if it fails, exception was not thrown and VM deployment went ahead without any errors.

Fix: Added the necessary checks.

* pr/995:
  CLOUDSTACk-9002: VM deployment is successful even when dhcp entry command fails - Fixed

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-11-02 14:18:21 +01:00
Remi Bergsma
a981d34f49 Merge pull request #787 from anshul1886/CLOUDSTACK-8824-8825
CLOUDSTACK-8825, CLOUDSTACK-8824 : Fixed issues if vm.allocation.algorithm is set to firstfitleastconsumedFixed following issues if vm.allocation.algorithm is set to firstfitleastconsumed

1. VM deployment failure if thre is only ZWPS in setup
2. VM migration is impossible from UI

To test

1. Create setup with ZWPS only
2. set vm.allocation.algorithm to firstfitleastconsumed in global settings
3. deploy virtual machine

observation: vm deployment will fail

After this fix it will pass

second scenario

1. Create Cloudstack Setup with two hosts (As it needs setup for migration)
2. Try migrating VM from UI

Observation: There will be error response in logs with nothing available in UI

After fix it will pass

Regarding BVT I am not sure whether there exists tests for firstfitleastconsumed vm allocation algorithm.

* pr/787:
  CLOUDSTACK-8825, CLOUDSTACK-8824 : Fixed following issues if vm.allocation.algorithm is set to firstfitleastconsumed 1. VM deployment failure if thre is only ZWPS in setup 2. VM migration is impossible from UI

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-11-02 12:04:34 +01:00
Kshitij Kansal
e24ecccdea CLOUDSTACK-8844: Network Update from RVR offering to Standalone offering fails - Fixed 2015-10-30 10:54:45 +05:30
Kshitij Kansal
301ea330ce CLOUDSTACk-9002: VM deployment is successful even when dhcp entry command fails - Fixed 2015-10-28 11:51:25 +05:30
Nick Livens
645f8758df CLOUDSTACK-8832 : Update Nuage VSP plugin to work with Nuage VSP release 3.2 2015-10-27 14:56:57 +01:00
Wei Zhou
1efcc19dbd CLOUDSTACK-8941: fix NPE when migrate vm to other zone-wide pools the second time 2015-10-26 07:29:59 +01:00
Remi Bergsma
0fd3919e8a Merge pull request #964 from snuf/Ovm3NetLabelFix
FIX: Ovm3 physical network traffic labels to work.The labeling was broken. Only labels assigned at zone creation
were used, changing labels was not working. Tested with changing
a label and checking it, labels at zone creation still works.

As a bonus fixed the consistency of KVM in Dutch compared to other
traffic labels in Dutch and copied in the OVM3 translated label
in other languages based on the other tarffic labels in those languages.

* pr/964:
  FIX: Ovm3 physical network traffic labels to work.

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-10-26 06:08:43 +01:00
Remi Bergsma
7d73e9bfaf Merge pull request #976 from ustcweizhou/CLOUDSTACK-8964-removed-volume
CLOUDSTACK-8964: Can't create volume from snapshot of a removed volumeThis issue happens on KVM as well.
This is because the volume info is missing in the CopyCommand once the volume has been removed.
When the KVM agent tries to process the command, it will throws a NPE.

* pr/976:
  CLOUDSTACK-8964: Can't create volume from snapshot of a removed volume

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-10-25 21:25:44 +01:00
Daan Hoogland
24500bd0e4 CID 1324349: conditionally return -1 or the dc id for the volume 2015-10-24 14:01:38 +02:00
Wei Zhou
bef92052ee CLOUDSTACK-8964: Can't create volume from snapshot of a removed volume
This issue happens on KVM as well.
This is because the volume info is missing in the CopyCommand once the volume has been removed.
When the KVM agent tries to process the command, it will throws a NPE.
2015-10-23 22:02:59 +02:00
Funs Kessen
1022883749 FIX: Ovm3 physical network traffic labels to work.
The labeling was broken. Only labels assigned at zone creation
were used, changing labels was not working. Tested with changing
a label and checking it.

As a bonus fixed the consistency of KVM in Dutch compared to other
traffic labels in dutch and copied in the OVM3 translated label
in other languages.
2015-10-22 11:57:42 +02:00
Daan Hoogland
b128e567c4 CLOUDSTACK-8848: added null pointer guard to new public method 2015-10-05 07:27:28 +02:00
Rene Moser
542880ae76 CLOUDSTACK-8848: ensure power state is up to date when handling missing VMs in powerReport
There 2 things which has been changed.

* We look on power_state_update_time instead of update_time. Didn't make sense to me at all to look at update_time.
* Due DB update optimisation, powerState will only be updated if < MAX_CONSECUTIVE_SAME_STATE_UPDATE_COUNT. That is why we can not rely on these information unless we make sure these are up to date.
2015-09-27 22:14:03 +02:00
Wido den Hollander
a0f8f56a5d Merge pull request #845 from borisroman/CLOUDSTACK-8763
[4.6][BLOCKER]CLOUDSTACK-8763: Resolved POD/ZONE deletion failure.Instead of having both checkIfPodIsDeletable() and checkIfZoneIsDeletable have there own SQL query, I've refactored them so they use DAO SQL Queries.

This resolves the SQL Exception thrown by both classes.

Test to confirm working order:
- deploy ACS
- Add zones / pods. -> Try to delete without resources. -> Direct success.
- Add resources to zones / pods. -> Try to delete with resources in the pod / zone. -> Correct exception thrown. (Error message is why it cannot remove the zone / pod. IE: There is still a hosts or vm or .... )

* pr/845:
  Added unit tests for checkIfPodIsDeletable() and checkIfZoneIsDeletable().
  Updated Dao classes with correct field names.
  Refactored checkIfZoneIsDeletable().
  Added findByDc(long dcId) to VolumeDao and VolumeDaoImpl.
  Added countIPs(long dcId, boolean onlyCountAllocated) to IPAddressDao and IPAddressDaoImpl.
  Added countIPs(long dcId, boolean onlyCountAllocated) to DataCenterIpAddressDao and DataCenterIpAddressDaoImpl.
  Refactored checkIfPodIsDeletable().
  Added findByPodId(Long podId) to HostDao and HostDaoImpl.

Signed-off-by: Wido den Hollander <wido@widodh.nl>
2015-09-23 14:00:04 +02:00
Bharat Kumar
1718bb38aa CLOUDSTACK-8860: improve error messages in VM deployment code path.
Conflicts:
	engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
2015-09-22 10:17:00 +05:30
Remi Bergsma
d543e2aa2c Merge pull request #839 from bvbharatk/CLOUDSTACK-8851
CLOUDSTACK-8851 Redundant VR getting started in the same cluster or hwe are not populating the deployment destination of the previous rvr in the avoid set of the rvr that is being created. This was resulting in both the rvrs getting deployed to same host sometimes even when it
could have gone to a different one.

Now we are updating the avoids set of the deployment plan  to fix this issue.

* pr/839:
  CLOUDSTACK-8851 Redundant VR getting started in the same cluster or host even when there are suitable hosts available

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-09-21 20:03:58 +02:00
Boris Schrijver
fa5f388fe9 Updated Dao classes with correct field names. 2015-09-17 15:54:29 +02:00
Boris Schrijver
0df3357cac Added findByDc(long dcId) to VolumeDao and VolumeDaoImpl. 2015-09-16 22:17:27 +02:00
Boris Schrijver
12fc2b4c26 Added countIPs(long dcId, boolean onlyCountAllocated) to IPAddressDao and IPAddressDaoImpl. 2015-09-16 22:15:53 +02:00
Boris Schrijver
473f1937e2 Added countIPs(long dcId, boolean onlyCountAllocated) to DataCenterIpAddressDao and DataCenterIpAddressDaoImpl. 2015-09-16 22:15:00 +02:00
Boris Schrijver
0648cb9804 Added findByPodId(Long podId) to HostDao and HostDaoImpl. 2015-09-16 22:13:10 +02:00
Rohit Yadav
5b5152b21b schema: add 4.5.3 to 4.6.0 upgrade path stubs
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-09-16 11:53:41 +05:30
Rohit Yadav
36a43abff4 schema: add 4.5.2 to 4.5.3 upgrade path stubs
(cherry picked from commit 17166eb631e4647be1a74970d0771b5add5f2ace)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-09-16 11:53:41 +05:30
Bharat Kumar
7439a9bbec CLOUDSTACK-8851 Redundant VR getting started in the same cluster or host even when there are suitable hosts available 2015-09-15 14:24:13 +05:30
Rajani Karuturi
ac80a2df50 Merge pull request #808 from karuturi/CLOUDSTACK-8835
CLOUDSTACK-8835: Added alerts incase of template download failureAuthored-By: @sanjaytripathi
Reviewed-By: @devdeep

* pr/808:
  CLOUDSTACK-8835: Added alerts incase of template download failure

Signed-off-by: Rajani Karuturi <rajani.karuturi@citrix.com>
2015-09-14 09:47:46 +05:30
Rajani Karuturi
f888e93e44 Merge pull request #782 from karuturi/CLOUDSTACK-8816
Cloudstack 8816 entityuuid missing in some of the eventsIn some of the events generated, entity uuid was missing making it difficult to find the entity. Fixed the same.

Tested it on rabbitmq instance.
There are the events before after the fix:

Before
--------------------------------------------------------------------------------

routing_key: management-server.ActionEvent.ACCOUNT-DELETE.Account.*
exchange: cloudstack-events
message_count: 2
payload:
{"eventDateTime":"2015-09-04 17:59:24 +0530","status":"Scheduled","description":"deleting User test4 (id: 28) and accountId \u003d 28","event":"ACCOUNT.DELETE","Account":"c09e2e81-8edc-4c27-b072-25005b522b63","account":"bd73dc2e-35c0-11e5-b094-d4ae52cb9af0","user":"bd7ea748-35c0-11e5-b094-d4ae52cb9af0"}

payload_bytes: 304
payload_encoding: string
redelivered: False

--------------------------------------------------------------------------------

routing_key: management-server.AsyncJobEvent.complete.Account.*
exchange: cloudstack-events
message_count: 0
payload: {"cmdInfo":"{\"id\":\"9dd3abc2-3f8b-4852-aa60-a74b234acb13\",\"response\":\"json\",\"sessionkey\":\"5ig1ItP2_5v-mgY4cVJbJN5hw_w\",\"ctxDetails\":\"
{\\\"interface com.cloud.user.Account\\\":\\\"9dd3abc2-3f8b-4852-aa60-a74b234acb13\\\"}

\",\"cmdEventType\":\"ACCOUNT.DELETE\",\"expires\":\"2015-09-07T11:11:56+0000\",\"ctxUserId\":\"2\",\"signatureversion\":\"3\",\"httpmethod\":\"GET\",\"uuid\":\"9dd3abc2-3f8b-4852-aa60-a74b234acb13\",\"ctxAccountId\":\"2\",\"ctxStartEventId\":\"447\"}","instanceType":"Account","jobId":"5004989d-0cde-4922-8afa-66bf38b75ea7","status":"SUCCEEDED","processStatus":"0","commandEventType":"ACCOUNT.DELETE","resultCode":"0","command":"org.apache.cloudstack.api.command.admin.account.DeleteAccountCmd","jobResult":"org.apache.cloudstack.api.response.SuccessResponse/null/
{\"success\":true}

","account":"bd73dc2e-35c0-11e5-b094-d4ae52cb9af0","user":"bd7ea748-35c0-11e5-b094-d4ae52cb9af0"}
payload_bytes: 914
payload_encoding: string
redelivered: False

--------------------------------------------------------------------------------

After
--------------------------------------------------------------------------------

 routing_key: management-server.ActionEvent.ACCOUNT-DELETE.Account.e5e2db91-414d-484c-99d5-c4e265c14ad8
exchange: cloudstack-events
message_count: 13
payload: {"eventDateTime":"2015-09-07 17:32:26 +0530","status":"Completed","description":"Successfully completed deleting account. Account Id: 45","event":"ACCOUNT.DELETE","entityuuid":"e5e2db91-414d-484c-99d5-c4e265c14ad8","entity":"com.cloud.user.Account","account":"bd73dc2e-35c0-11e5-b094-d4ae52cb9af0","user":"bd7ea748-35c0-11e5-b094-d4ae52cb9af0"}
payload_bytes: 344
payload_encoding: string
redelivered: True

--------------------------------------------------------------------------------

routing_key: management-server.AsyncJobEvent.complete.Account.e5e2db91-414d-484c-99d5-c4e265c14ad8
exchange: cloudstack-events
message_count: 12
payload: {"cmdInfo":"{\"id\":\"e5e2db91-414d-484c-99d5-c4e265c14ad8\",\"response\":\"json\",\"sessionkey\":\"8AJVbn8HIpg5LZ_VaVfSPs_QN2k\",\"ctxDetails\":\"{\\\"interface com.cloud.user.Account\\\":\\\"e5e2db91-414d-484c-99d5-c4e265c14ad8\\\"}\",\"cmdEventType\":\"ACCOUNT.DELETE\",\"expires\":\"2015-09-07T12:17:42+0000\",\"ctxUserId\":\"2\",\"signatureversion\":\"3\",\"httpmethod\":\"GET\",\"uuid\":\"e5e2db91-414d-484c-99d5-c4e265c14ad8\",\"ctxAccountId\":\"2\",\"ctxStartEventId\":\"465\"}","instanceType":"Account","instanceUuid":"e5e2db91-414d-484c-99d5-c4e265c14ad8","jobId":"0bb08486-6d9f-4e9f-bfef-b7463c42e71b","status":"SUCCEEDED","processStatus":"0","commandEventType":"ACCOUNT.DELETE","resultCode":"0","command":"org.apache.cloudstack.api.command.admin.account.DeleteAccountCmd","jobResult":"org.apache.cloudstack.api.response.SuccessResponse/null/{\"success\":true}","account":"bd73dc2e-35c0-11e5-b094-d4ae52cb9af0","user":"bd7ea748-35c0-11e5-b094-d4ae52cb9af0"}
payload_bytes: 968
payload_encoding: string
redelivered: True

--------------------------------------------------------------------------------

* pr/782:
  CLOUDSTACK-8816 Systemvm reboot event doesnt have uuids. Fixed the same
  CLOUDSTACK-8816: Project UUID is not showing for some of operations in RabbitMQ.
  CLOUDSTACK-8816: entity uuid missing in create network event
  CLOUDSTACK-8816: instance uuid is missing in events for delete account
  CLOUDSTACK-8816 Fixed entityUuid missing in some cases is events

Signed-off-by: Rajani Karuturi <rajani.karuturi@citrix.com>
2015-09-14 09:42:44 +05:30
wilderrodrigues
68bf049106 Merge pull request #805 from ekholabs/improvement/callable_CLOUDSTACK-8822
CLOUDSTACK-8822 - Replacing Runnable by CallableThat's the first part of the refactor, which will touch the ManagedContextRunnable and all its subclasses. However, in order to reduce impact, the first part comprises the Agent and Nio related classes (NioConnection, NioServer and NioClient).

* All the sub-classes were also updated according to the changes in the super-classes
* Improved exception handling
* There were also code formatting changes

Changes were structural and the NioTest covered them without need to modify the unit test.

This PR is quite extensive. Please, wait for the Test Report in order to proceed with further review.

ping @remibergsma @miguelaferreira @bhaisaab @karuturi @wido @DaanHoogland @borisroman @K0zka

Cheers,
Wilder

* pr/805:
  CLOUDSTACK-8822 - Replacing Runnable by Callable in the Taks and NioConnection classes

Signed-off-by: wilderrodrigues <wrodrigues@schubergphilis.com>
2015-09-11 14:52:36 +02:00
Sanjay Tripathi
9a35f87d37 CLOUDSTACK-8835: Added alerts incase of template download failure
Reviewed-By: Devdeep
2015-09-11 16:07:35 +05:30