496 Commits

Author SHA1 Message Date
weingartner
4179606c0b Removed classes with no reference
- org.apache.cloudstack.framework.jobs.JobCancellationException (removed
variable JobCancellationException in com.cloud.utils.SerialVersionUID)
- org.apache.cloudstack.ldap.NoSuchLdapUserException (removed test file
/cloud-plugin-user-authenticator-ldap/test/groovy/org/apache/cloudstack/ldap/NoSuchLdapUserExceptionSpec.groovy)
- com.cloud.agent.api.storage.CreateVolumeOVAAnswer
- com.cloud.exception.MissingParameterValueException
- org.apache.cloudstack.api.response.StatusResponse
- org.apache.cloudstack.api.response.VolumeDetailResponse
- org.apache.cloudstack.api.response.UpgradeVmResponse
- org.apache.cloudstack.api.response.AddIpToVmNicResponse
- org.apache.cloudstack.api.response.TemplateZoneResponse (at
org.apache.cloudstack.api.response.TemplateResponse, there is this
comment "To avoid breaking backwards compatibility, we still treat a
template at different zones as different templates, so not embedding
template_zone information in this TemplateZoneResponse set. `private
Set<TemplateZoneResponse> zones;`" but right now it is not used)
- org.apache.cloudstack.api.response.NicDetailResponse
2016-04-07 21:03:05 -03:00
Will Stevens
e72a69a8a2 Merge pull request #1254 from shapeblue/master-9174
CLOUDSTACK-9174: A deleted account results in NPEWhen an account is deleted from cloudstack for which quota is still
being calculated and if the quota reaches minimum threshold then
quota service will try to alert the user. This results in NPE and is
fixed by excluding such accounts from alerting and other quota related
mechanisms.

* pr/1254:
  CLOUDSTACK-9174: A deleted account results in NPE

Signed-off-by: Will Stevens <williamstevens@gmail.com>
2016-04-07 11:39:22 -04:00
Rodrigo
01034ea8d6 Removed Unused Void Class
Removed the class Void.java from
/cloud-framework-ipc/src/org/apache/cloudstack/framework/async/Void.java
since the method public void AsyncMethod(Object realParam,
AsyncCompletionCallback<Void> callback) does not 
exist and it does not seemed to be used in another place.
Also, removed an unnecessary comment in
/cloudstack-framework/ipc/test/org/apache/cloudstack/framework/codestyle/AsyncSampleListenerStyleCaller.java
2016-03-13 14:35:51 -03:00
nvazquez
9857f41d9a CLOUDSTACK-9298: Add @MappedSuperClass support for persistence inheritance 2016-03-10 06:07:29 -08:00
Abhinandan Prateek
04ca7e57d5 Quota: consolidated lockable account check to a method. Added unit tests
to check lockablity of various accounts
2016-01-28 17:53:54 +05:30
Rohit Yadav
06fe7844db Merge pull request #1240 from shapeblue/master-9161
CLOUDSTACK-9161: fix the quota marvin test  1. Create a dummy user, as existing user may already have stale quota
  data
  2. fix the tests to use the dummy user
  3. a boundary condition was revealed and fixed for a new user where
  quota service has never run and created bootstrap entries

* pr/1240:
  CLOUDSTACK-9161: fix the quota marvin test

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-01-27 12:03:28 +01:00
Abhinandan Prateek
ee2bc828a9 Merge pull request #1289 from shapeblue/master-quotafb
Quota: findbug fixesFindbug fixes for cloud-framework-quota and cloud-plugin-database-quota.

* pr/1289:
  Quota: findbug fixes

Signed-off-by: Abhinandan Prateek <abhinandan.prateek@shapeblue.com>
2016-01-27 15:41:23 +05:30
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
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
1bfba70b62 Merge pull request #1272 from koushik-das/CLOUDSTACK-9195
CLOUDSTACK-9195: Cancelled/failed async jobs not getting cleaned up from DB

Setting 'job_complete_msid' field in async_job table when marking job as cancelled during MS restart.
This will ensure that the job is cleaned up as part of GC thread.

* pr/1272:
  CLOUDSTACK-9195: Cancelled/failed async jobs not getting cleaned up from DB Setting 'job_complete_msid' field in async_job table when marking job as cancelled during MS restart. This will ensure that the job is cleaned up as part of GC thread.

Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-20 14:37:37 +01:00
Abhinandan Prateek
1304406fd1 Quota: findbug fixes
Findbug fixes for cloud-framework-quota and cloud-plugin-database-quota.
2016-01-18 09:17:30 +05:30
Remi Bergsma
ee2ccc4d41 Merge release branch 4.7 to master
* 4.7:
  QuotaStatementTest: fix the method invocation verification
2016-01-05 15:27:06 +01:00
Abhinandan Prateek
0eac900fc4 QuotaStatementTest: fix the method invocation verification 2016-01-05 11:04:33 +05:30
Koushik Das
a6f9181ee1 CLOUDSTACK-9195: Cancelled/failed async jobs not getting cleaned up from DB
Setting 'job_complete_msid' field in async_job table when marking job as cancelled during MS restart.
This will ensure that the job is cleaned up as part of GC thread.
2015-12-22 13:53:29 +05:30
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
Abhinandan Prateek
983dee7f20 CLOUDSTACK-9174: A deleted account results in NPE
When an account is deleted from cloudstack for which quota is still
being calculated and if the quota reaches minimum threshold then
quota service will try to alert the user. This results in NPE and is
fixed by excluding such accounts from alerting and other quota related
mechanisms.

Quota service: Fix check for admin account
2015-12-18 08:52:16 +05:30
Abhinandan Prateek
ccd0f22061 CLOUDSTACK-9161: fix the quota marvin test
1. Create a dummy user, as existing user may already have stale quota
  data
  2. fix the tests to use the dummy user
  3. a boundary condition was revealed and fixed for a new user where
  quota service has never run and created bootstrap entries

Quota Marvin: If the quota plugin is not enabled skip tests

Quota Service: Enable quota plugin in zone setup configuration

Quota: Moving test_quota.py the test to test/integration/plugins
    In most automated environment this test case will not run as it
    requires a mangement server restart to enable the plugin. Due to
    this requirement moving it to plugin folder. This condition is
    already documented in the test case.
2015-12-16 16:22:31 +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
Abhinandan Prateek
bc8994ba1c CLOUDSTACK-9122: latest credit entries should be incorporated when the balance is
calculated
2015-12-11 14:57:51 +05:30
Abhinandan Prateek
987fcbd441 CLOUDSTACK-8592: Implement Quota service
Quota service while allowing for scalability will make sure that the cloud is
not exploited by attacks, careless use and program errors. To address this
problem, we propose to employ a quota-enforcement service that allows resource
usage within certain bounds as defined by policies and available quotas for
various entities.  Quota service extends the functionality of usage server to
provide a measurement for the resources used by the accounts and domains using a
common unit referred to as cloud currency in this document. It can be configured
to ensure that your usage won’t exceed the budget allocated to accounts/domain
in cloud currency.  It will let user know how much of the cloud resources he is
using. It will help the cloud admins, if they want, to ensure that a user does
not go beyond his allocated quota. Per usage cycle if a account is found to be
exceeding its quota then it is locked. Locking an account means that it will not
be able to initiat e a new resource allocation request, whether it is more
storage or an additional ip. Needless to say quota service as well as any action
on the account is configurable.

Changes from Github code review:

- Added marvin test for quota plugin API
- removed unused commented code
- debug messages in debug enabled check
- checks for nulls, fixed access to member variables and feature
- changes based on PR comments
- unit tests for UsageTypes
- unit tests for all Cmd classes
- unit tests for all service and manager impls
- try-catch-finally or try-with-resource in dao impls for failsafe db switching
- remove dead code
- add missing quota calculation case (regression fixed)
- replace tabs with spaces in pom.xmls
- quota: though default value for quota_calculated is 0, the usage server
  makes it null while entering usage entries. Flipping the condition so
  as to acocunt for that.
- quotatypes: fix NPE in quota type
- quota framework test fixes
- made statement period configurable
- changed default email templates to reflect the fact that exhausted quota may not result in a locked account
- added quotaUpdateCmd that refreshes quota balances and sends alerts and statements
- report quotaSummary command returns quota balance, quota usage and state for all account
- made UI framework changes to allow for text area input in edit views
- process usage entries that have greater than 0 usage
- orocess quota entries only if tariff is non zero
- if there are credit entries but no balance entry create a dummy balance entry
- remove any credit entries that are before the last balance entry
  when displaying balance statement
- on a rerun the last balance is now getting added

FS: https://cwiki.apache.org/confluence/display/CLOUDSTACK/Quota+Service+-+FS
PR: https://github.com/apache/cloudstack/pull/768

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-12-07 23:02:48 +05:30
Daan Hoogland
c67d1da5dd Merge pull request #1167 from koushik-das/CLOUDSTACK-9105
CLOUDSTACK-9105: Logging enhancement: Handle/reference to track API calls end to end in the MS logs

Added logid to logging framework, now all API call logs can be tracked with this id end to end

* pr/1167:
  CLOUDSTACK-9105: Logging enhancement: Handle/reference to track API calls end to end in the MS logs Added logid to logging framework, now all API call logs can be tracked with this id end to end

Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-12-06 20:41:28 +01:00
Remi Bergsma
74e33dc5ae Merge pull request #840 from bvbharatk/CLOUDSTACK-8852
CLOUDSTACK-8852 Database shows that management server is UP when it iDatabase shows that management server is UP when it is actually stopped.

 This was happening as the stop method in clusterMnanagerImpl was not getting callled. Added shutdown hooks to all spring sub contexts, this enables spring to call the stop mehtods of the beans when management server is shutting down.

Conflicts:
	framework/spring/module/src/main/java/org/apache/cloudstack/spring/module/web/CloudStackContextLoaderListener.java

* pr/840:
  CLOUDSTACK-8852 Database shows that management server is UP when it is actually stopped from the CCP GUI

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-12-05 18:47:53 +01:00
Koushik Das
a4dc271253 CLOUDSTACK-9105: Logging enhancement: Handle/reference to track API calls end to end in the MS logs
Added logid to logging framework, now all API call logs can be tracked with this id end to end
2015-12-04 12:45:57 +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
5f61041550 Merge pull request #1009 from rags22489664/master
CLOUDSTACK-9006 - ListTemplates API returns result in inconsistent order when called concurrentlyThe order of templates returned in the response is based on a field called sortkey and by default value for the field is set to 0.

With more than 1000 templates, we tried listing the templates with different page sizes concurrently, and we noticed the results being inconsistent.

Thus we added a secondary order by clause to list templates call on tempZonePair column to make sure the results are consistent.

The addOrderby method of Filter class was also not appending , if we added more orderby clauses.

* pr/1009:
  CLOUDSTACK-9006 - ListTemplates API returns result in inconsistent order when called concurrently
  CLOUDSTACK-9006 - ListTemplates API returns result in inconsistent order when called concurrently

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-11-04 11:48:08 +01:00
ramamurtis
9d1a469ae5 CLOUDSTACK-9006 - ListTemplates API returns result in inconsistent order when called concurrently
Adding filter test to verify addOrderBy method.
2015-11-04 10:31:02 +05:30
Bharat Kumar
4849368c94 CLOUDSTACK-8852 Database shows that management server is UP when it is actually stopped from the CCP GUI
This was happening as the stop method in clusterMnanagerImpl was not getting callled. Added shutdown hooks to all sub contexts,
    this enables spring to call the stop mehtods of the beans when management server is shutting down.

Conflicts:
	framework/spring/module/src/main/java/org/apache/cloudstack/spring/module/web/CloudStackContextLoaderListener.java
2015-11-02 15:26:39 +05:30
Remi Bergsma
beaed0e9b3 Merge pull request #913 from radu-stefanache/more_typo_fixes
another typo that appears when monitoring the java process via JMXStatus : in preogress instead of in progress and some other small typos .

* pr/913:
  another typo that appears when monitoring the java process via JMX

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-10-30 16:59:34 +01:00
ramamurtis
c90723f491 CLOUDSTACK-9006 - ListTemplates API returns result in inconsistent order when called concurrently 2015-10-30 09:44:59 +05:30
radu-stefanache
d96bd05e64 another typo that appears when monitoring the java process via JMX 2015-10-05 16:33:08 +01:00
Sudhansu
c28a58a8ff CLOUDSTACK-8917 : Instance tab takes long time to load with 12K active VM (total vms: 190K)
modified sql that is used for retrieving vm count .
2015-09-28 16:24:26 +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
Wei Zhou
858b6c0251 Merge pull request #730 from ustcweizhou/profiler-getDurationInMillis
CLOUDSTACK-8761: Replace some profiler.getDuration with profiler.getDurationInMillis after commit 5557ad55

This closes #730
2015-08-26 08:29:50 +02:00
Koushik Das
e7ddbd4980 Signed-off-by: Koushik Das <koushik@apache.org> 2015-08-24 10:10:19 +05:30
Wei Zhou
662b478d45 Replace some profiler.getDuration with profiler.getDurationInMillis after commit 5557ad55 2015-08-21 13:36:27 +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
Daan Hoogland
adcd0c0c0d CLOUDSTACK-8656: use catch block for validation 2015-08-14 17:25:04 +02:00
Daan Hoogland
237f922ff7 CLOUDSTACK-8656: removed unused classes 2015-08-14 16:14:17 +02:00
Daan Hoogland
bb8facc37c CLOUDSTACK-8656: restructure of tests 2015-08-14 16:07:12 +02:00
Daan Hoogland
882de20e1c CLOUDSTACK-8656: reorganise sychronized block 2015-08-14 16:03:17 +02:00
Koushik Das
c989921fb7 CLOUDSTACK-8733: Host stuck in rebalancing state during agent LB
This is happening as ClusterServiceServletAdapter is started after ClusteredAgentManagerImpl.
Fix is to start ClusterServiceServletAdapter before ClusteredAgentManagerImpl.
2015-08-14 17:11:52 +05:30
Daan Hoogland
a3ae8e0645 coverity 1315774: improvement of code to negate false positive 2015-08-12 01:04:06 +02:00
Daan Hoogland
ea886910d8 CLOUDSTACK-8656: messages about classloader issues in ipc framwork 2015-08-04 14:06:06 +02:00
Daan Hoogland
b060c66096 CLOUDSTACK-8656: dummy main removed 2015-08-04 13:35:30 +02:00
Daan Hoogland
e8a00ed989 CLOUDSTACK-8656: try-with-resource in vmsd reader
moved closeable util function up the hierarchy
2015-08-04 11:37:06 +02:00