222 Commits

Author SHA1 Message Date
Will Stevens
a63db21d16 Updating pom.xml version numbers for release 4.8.1
Signed-off-by: Will Stevens <williamstevens@gmail.com>
2016-08-08 10:06:21 -04:00
Will Stevens
62aa3b2bfa Updating pom.xml version numbers for release 4.10.0-SNAPSHOT
Signed-off-by: Will Stevens <williamstevens@gmail.com>
2016-07-29 10:11:34 -04:00
Will Stevens
227ff3884d Updating pom.xml version numbers for release 4.9.0
Signed-off-by: Will Stevens <williamstevens@gmail.com>
2016-07-25 16:56:04 -04:00
Nick Livens
c9567495ab Make sure that the DB drivers are loaded before initiating connections 2016-05-31 14:39:43 +02:00
Nick Livens
02c5d44f0b Dynamic loading of DB driver + support for other DB providers 2016-05-23 15:50:28 +02:00
Will Stevens
06c6b367e7 Merge pull request #1532 from exoscale/fix/db-cache-miss
DAO: Hit the cache for entity flagged as removed tooI came along this part of the code and I don't see any reason why the cache should not be used when fetching with the "removed" ones. It will help decrease the number of DB queries.

*It can be merged in many CS versions*

* pr/1532:
  DAO: Rewrite change for method findByIdIncludingRemoved(ID id)
  dao: Hit the cache for entity flagged as removed too since they are put in cache afterwards.

Signed-off-by: Will Stevens <williamstevens@gmail.com>
2016-05-13 17:04:57 -04:00
Marc-Aurèle Brothier
39aa0e4f35 DAO: Rewrite change for method findByIdIncludingRemoved(ID id)
Also change the sibling method findById(final ID id)
2016-05-13 11:01:39 +02:00
Marc-Aurèle Brothier
696440a675 dao: Hit the cache for entity flagged as removed too since they are put
in cache afterwards.
2016-05-04 14:38:11 +02:00
nvazquez
9857f41d9a CLOUDSTACK-9298: Add @MappedSuperClass support for persistence inheritance 2016-03-10 06:07:29 -08: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
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
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
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
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
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
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
ramamurtis
c90723f491 CLOUDSTACK-9006 - ListTemplates API returns result in inconsistent order when called concurrently 2015-10-30 09:44:59 +05:30
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
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
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
Daan Hoogland
a3ae8e0645 coverity 1315774: improvement of code to negate false positive 2015-08-12 01:04:06 +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
Daan Hoogland
1f460f4174 CLOUDSTACK-8656: messages on SQL exception in DbUtils! 2015-08-03 20:49:02 +02:00
Daan Hoogland
e2b6237464 CLOUDSTACK-8656: debug messages on interupted exceptions 2015-07-30 16:03:10 +02:00
Daan Hoogland
03b076cd1b coverity 1116668: conditionally close ds provided connection
Signed-off-by: Daan Hoogland <daan@onecht.net>

This closes #599
2015-07-17 13:22:43 +02:00
Daan Hoogland
a1ff7e24f3 coverity 1311707: only sql exception on select would have been caught. passing all runtime exceptions through
Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>

This closes #584
2015-07-14 13:41:09 +02:00
Daan Hoogland
b0136c56e7 coverity 1116564: complicated update of sequences fixed
Signed-off-by: Daan Hoogland <daan@onecht.net>

This closes #564
2015-07-09 21:30:24 +02:00
wilderrodrigues
5557ad5588 Offer a getDurationInMillis() method in the Profiler utility class
- New implementation uses nanoseconds. Due to that, the places where the Profiler is used as a Monitor and/or
     a stopwatch will suffer with the difference in the return
   - Also added a getDuration(), which returns the time in nanoseconds in case someone wants to use it instead
   - Added an extra test to check if the getDuration() works fine with nanoseconds
   - Fixed the test that checks the time in milliseconds: I added an error margin to cover the test better

Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-06-24 09:36:40 +02:00
Rohit Yadav
069aa4e5f3 CLOUDSTACK-8433: remove awsapi db usage and add upgrade cleanup path
- Removes awsapi db properties usage across codebase
- Removes references from spring xmls, test cases and TransactionLegacy
- Adds sql command to drop database cloudbridge in schema-451to460-cleanup.sql

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-05-06 15:22:04 +02:00
Rajani Karuturi
0b8355920e Merge branch 'volume-upload' into master
This closes #206
2015-04-29 11:12:53 +05:30
Rajani Karuturi
b6c86bdb75 changed commons-io version to the latest stable 2.4
also updated version numbers in all the poms its used.
2014-11-28 17:01:16 +05:30
Laszlo Hornyak
3577423da9 removed executable flags from java classes
Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
2014-11-23 19:49:01 +01:00
Min Chen
ffaabdc13f CLOUDSTACK-7832: Move some job db update and item purge to
completeAsyncJob transaction to avoid MySQL deadlock.
2014-11-03 10:41:36 -08:00
Hugo Trippaers
4ebaf0a583 Bump master version to 4.6.0-SNAPSHOT after branching 4.5.0-SNAPSHOT 2014-10-29 14:54:23 +01:00
Santhosh Edukulla
350ac4c4b0 Fixed Resource Leaks
Signed-off-by: Santhosh Edukulla <santhosh.edukulla@gmail.com>
2014-10-13 17:51:02 +05:30
Santhosh Edukulla
31a42d2b7a Fixed few coverity patches
Signed-off-by: Santhosh Edukulla <santhosh.edukulla@gmail.com>
2014-10-09 11:45:26 +05:30
Anthony Xu
f5eae55abb timeInSeconds * 1000
timeInSeconds is int type, if timeInSeconds is very big, it makes "timeInseconds * 1000" very small even 0
2014-09-24 10:57:36 -07:00
Anthony Xu
c74dada854 add logs for lock acquire and release 2014-09-24 10:28:04 -07:00
Hugo Trippaers
2503aaafef Revert "removed unused class"
This reverts commit 093fa6f0a53bd031a09e4042c3aa25860bc947e5.
2014-09-24 08:41:55 +02:00
Anthony Xu
d8ad3e32bc throw timeout exception when lock acquire times out 2014-09-23 18:01:32 -07:00
Anthony Xu
093fa6f0a5 removed unused class
ramework/db/src/com/cloud/utils/db/TransactionContextInterceptor.java
2014-09-23 16:48:14 -07:00
Hugo Trippaers
dc3f0cbc63 Improve the handling of the findbug exclude files 2014-09-03 10:41:22 +02:00
Anthony Xu
90fe6d8087 removed trailing space 2014-08-13 11:09:38 -07:00
Alena Prokharchyk
ffeca8bbd2 CLOUDSTACK-7209: handle the case when network fails to implement NoTransitionException, and null is returned to the caller stack. All caller methods should verify if the return value is null before processing it further. 2014-08-01 09:47:28 -07:00
Koushik Das
61fe959bb4 Removed invalid assertions from code. Now the MS can be run with assertions enabled (using -ea flag) 2014-07-10 12:18:29 +05:30
Santhosh Edukulla
a600d8408e Fixed Resource Leaks, null dereferences, few other issues reported by coverity 2014-07-04 16:17:58 +05:30