29319 Commits

Author SHA1 Message Date
nvazquez
64c6debf00 CLOUDSTACK-9252: Little refactor 2016-02-05 06:56:08 -08:00
nvazquez
c5677cf634 CLOUDSTACK-9252: Mock application context for unit test 2016-02-04 09:56:53 -08:00
nvazquez
068fceae95 CLOUDSTACK-9252: Add unit tests 2016-02-03 07:09:08 -08:00
nvazquez
3fb18bd494 CLOUDSTACK-9252: New refactor 2016-02-03 07:08:39 -08:00
nvazquez
cc50c20b4b CLOUDSTACK-9252: Remove static dependencies, refactor 2016-02-01 12:58:51 -08:00
nvazquez
76dc2705b7 CLOUDSTACK-9252: Remove duplicates getNfsVersion, refactor 2016-02-01 12:50:58 -08:00
nvazquez
e524f65570 CLOUDSTACK-9252: Support configurable nfs version 2016-02-01 12:50:58 -08:00
nvazquez
0bc1b2727a CLOUDSTACK-9252: Add nfs version to commands 2016-02-01 12:50:58 -08:00
Remi Bergsma
476e9f0210 Merge pull request #1387 from remibergsma/CLOUDSTACK-8300
CLOUDSTACK-8300: Set indexes on event tableWhen there are many events in the cloud.event table, the UI throws an SQL exception and the management server spikes at 100% CPU for minutes. That causes other API calls to fail with 530 errors.

It seems an index on the 'archived' field is missing (since it is used in the WHERE clause).

We have 1.4M events in the table:
`select count(*) from event;`
1497838

This PR adds the index to the `archived` field and the `state` field.

* pr/1387:
  CLOUDSTACK-8300: Set indexes on event table

Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-31 18:59:23 +01:00
Remi Bergsma
14c837ab83 CLOUDSTACK-8300: Set indexes on event table 2016-01-30 16:50:46 +01:00
Remi Bergsma
e5f0788ed1 Merge release branch 4.8 to master
* 4.8:
  CLOUDSTACK-6181: Add 'root disk size' field in instance wizard for KVM templates
2016-01-28 13:34:02 +01:00
Remi Bergsma
69d1a5e9bc Merge release branch 4.7 to 4.8
* 4.7:
  CLOUDSTACK-6181: Add 'root disk size' field in instance wizard for KVM templates
2016-01-28 13:32:08 +01:00
Remi Bergsma
333957f00f Merge release branch 4.6 to 4.7
* 4.6:
  CLOUDSTACK-6181: Add 'root disk size' field in instance wizard for KVM templates
2016-01-28 13:31:26 +01:00
Remi Bergsma
a4ad71cc56 Merge pull request #1342 from ustcweizhou/root-disk-size-ui
CLOUDSTACK-6181: Add 'root disk size' field in instance wizard for KVM templatesThis commit includes three changes:
(1) Revert commit 13bf1ec5da9891eca98ef5dab61bf74b6db9530b to show the 'root disk size' field
(2) Set the default value from '1' to empty. This also changes the default value of customized service offerings from '1' to empty.
(3) show 'root disk size' field only when users choose a KVM template, as cloudstack supports deployvm with rootdisksize on KVM only.

* pr/1342:
  CLOUDSTACK-6181: Add 'root disk size' field in instance wizard for KVM templates

Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-28 13:30:34 +01:00
Wei Zhou
3822be5a5c CLOUDSTACK-6181: Add 'root disk size' field in instance wizard for KVM templates
This commit includes three changes:
(1) Revert commit 13bf1ec5da9891eca98ef5dab61bf74b6db9530b to show the 'root disk size' field
(2) Set the default value from '1' to empty. This also changes the default value of customized service offerings from '1' to empty.
(3) show 'root disk size' field only when users choose a KVM template, as cloudstack supports deployvm with rootdisksize on KVM only.
2016-01-27 23:30:22 +01:00
Rohit Yadav
5ab82d10d9 Merge pull request #1288 from DaanHoogland/trailing-commas
trailing commas in javascripts removedAccording to SonarQube this is a bug on internet explorer. It is the only 'blocker' level issue in cloudstack. @abhinandanprateek (@agneya2001) @bhaisaab @miguelaferreira should we enforce this or, as alternative, have it disabled in SonarQube?

* pr/1288:
  trailing commas in javascripts removed

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-01-27 16:28:29 +01:00
Rohit Yadav
b98a989e3d Merge pull request #1274 from anshul1886/CLOUDSTACK-9196
CLOUDSTACK-9196: Fixing null pointer exception when vm meta data is synced on upgraded setuphttps://issues.apache.org/jira/browse/CLOUDSTACK-9196

NullPointerException can occur if XenServer reports non-existing VM in cloud DB.

* pr/1274:
  CLOUDSTACK-9196: Fixing null pointer exception when vm meta data is synced on upgraded setup.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-01-27 16:27:21 +01:00
Rohit Yadav
de436acac8 Merge pull request #1261 from rafaelweingartner/lrg-cs-hackday-19
Removed unused variables from "NetworkStateListener" classWe removed the following variables from "com.cloud.network.NetworkStateListener"
. UsageEventDao _usageEventDao
. NetworkDao _networkDao

We changed the EventBus s_eventBus variable to private, the constructor not to use those variables and applied this change in classes com.cloud.network.IpAddressManagerImpl and org.apache.cloudstack.engine.orchestration.NetworkOrchestrator

* pr/1261:
  Removed unused variables from class NetworkStateListener

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-01-27 16:26:45 +01:00
Rohit Yadav
32fe308ed0 Merge pull request #1048 from cloudsadhu/sadhutest
CLOUDSTACK-8731-checking usage event for delete volume 	checking usage event for delete volume. I have incorporated all the suggested changes.

* pr/1048:
  CLOUDSTACK-8731-checking usage event for delete volume

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-01-27 16:13:53 +01:00
Rohit Yadav
431389da9d Merge pull request #1044 from ustcweizhou/keep-sshkey
CLOUDSTACK-5822: keep user-added sshkeys in authorized_keysFor now, if we add the ssh key inside the vm (not on cloudstack UI), the sshkey will be removed if we reset the sshkey on cloudstack UI.

After this commit, the sshkey (added by cloudstack) will end with cloudstack@apache.org.
We will only control the sshkeys with cloudstack@apache.org.

This will be used for multiple sshkey support for vm in the future.

* pr/1044:
  CLOUDSTACK-5822: keep user-added sshkeys in authorized_keys

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-01-27 16:12:06 +01:00
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
Rohit Yadav
ba722f8495 Merge pull request #855 from rafaelweingartner/master-lrg-cs-hackday-007
Removal of class AgentBasedStandaloneConsoleProxyManagerThe AgentBasedStandaloneConsoleProxyManager class is neither manually
instatiated anywhere in the code nor via Spring. Further checking in the
interface which the class implements, shows that the use for classes
implementing the EventBus interface relies on instances generated by the
Spring framework, which discards the possibility of the class being
created by EJB. Being the class useless, it was discarded.

* pr/855:
  Add Javadoc to AgentBasedStandaloneConsoleProxyManager

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-01-27 16:00:13 +01:00
Rohit Yadav
366629fb6b Merge pull request #831 from yvsubhash/CLOUDSTACK-8850
CLOUDSTACK-8850: revertSnapshot command does not workUpdating the documentation before the api is actually supported

* pr/831:
  Updating the Description as only supported with KVM
  CLOUDSTACK-8850: revertSnapshot command does not work Updating the documentation before the api is actually supported

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-01-27 15:56:51 +01:00
Rohit Yadav
f280bbe9e4 Merge pull request #830 from sureshanaparti/CLOUDSTACK-8858
CLOUDSTACK-8858: listVolumes API fails for a particular domain with NPE.CLOUDSTACK-8858: listVolumes API fails for a particular domain with NPE.

Summary: listVolumes API fails when volume associated vm instance has NULL or invalid state. Fix the code to guard this situation since this should not block volume listing.

* pr/830:
  CLOUDSTACK-8858: listVolumes API fails for a particular domain with NPE.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-01-27 15:56:07 +01:00
Rohit Yadav
c07c850dff Merge pull request #1256 from sureshanaparti/CLOUDSTACK-9185
CLOUDSTACK-9185: [VMware DRS] VM sync failed with exception due to out-of-band changesSummary: The target "ClusteredVirtualMachineManagerImpl.HandlePowerStateReport" invoked during the VM power state sync is not found as HandlePowerStateReport was not implemented in ClusteredVirtualMachineManagerImpl and was private in VirtualMachineManagerImpl, which was resulting in InvocationTargetException. Changed HandlePowerStateReport() in VirtualMachineManagerImpl to protected.

* pr/1256:
  CLOUDSTACK-9185: [VMware DRS] VM sync failed with exception due to out-of-band changes

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-01-27 15:45:54 +01:00
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
e93fd548d6 Merge release branch 4.8 to master
* 4.8:
  CLOUDSTACK-9256 add unique key for static routes in json
2016-01-26 17:07:37 +01:00
Remi Bergsma
48672c7e4a Merge release branch 4.7 to 4.8
* 4.7:
  CLOUDSTACK-9256 add unique key for static routes in json
2016-01-26 17:07:04 +01:00
Remi Bergsma
782d5d73f5 Merge pull request #1364 from remibergsma/CLOUDSTACK-9256
CLOUDSTACK-9256 add unique key for static routes in jsonStatic routes that are being set do not show up in the static_routes.json file. The reason for this is that the index that is used, is the gateway address, which is not unique. Hence stuff is overwritten and lost.

Ping @borisroman @wilderrodrigues @DaanHoogland

* pr/1364:
  CLOUDSTACK-9256 add unique key for static routes in json

Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-26 17:06:21 +01:00
Remi Bergsma
93cf664dd5 Merge pull request #1369 from remibergsma/490_version
Set version to 4.9.0-SNAPSHOT in master branchAfter releasing 4.8.0, next version is 4.9.0-SNAPSHOT in master branch.

* pr/1369:
  Implement upgrade path 4.8.1 -> 4.9.0
  Updating pom.xml version numbers for release 4.9.0-SNAPSHOT

Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-26 17:05:10 +01:00
Remi Bergsma
e1ecfad322 Implement upgrade path 4.8.1 -> 4.9.0 2016-01-26 15:21:23 +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
f7e58129f6 Merge release branch 4.8 to master
* 4.8:
  Implement upgrade path 4.8.0 -> 4.8.1
  Implement upgrade path 4.7.1 -> 4.7.2
  Updating pom.xml version numbers for release 4.8.1-SNAPSHOT
  Updating pom.xml version numbers for release 4.7.2-SNAPSHOT
  update debian changelog
  Updating pom.xml version numbers for release 4.8.0
2016-01-26 15:06:48 +01:00
Remi Bergsma
3bf50b6bd8 Merge pull request #1368 from remibergsma/481_version
Set version to 4.8.1-SNAPSHOT in 4.8 branchAfter releasing 4.8.0, next version is 4.8.1-SNAPSHOT in 4.8 branch.

* pr/1368:
  Implement upgrade path 4.8.0 -> 4.8.1
  Updating pom.xml version numbers for release 4.8.1-SNAPSHOT

Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-26 15:05:09 +01:00
Remi Bergsma
20e6b7a3e3 Initial merge of 4.7 into 4.8
* 4.7:
  Implement upgrade path 4.7.1 -> 4.7.2
  Updating pom.xml version numbers for release 4.7.2-SNAPSHOT
  update debian changelog
2016-01-26 14:59:43 +01:00
Remi Bergsma
e24d5e57bd Merge pull request #1367 from remibergsma/472_version
Set version to 4.7.2-SNAPSHOT in 4.7 branchAfter releasing 4.7.1, next version is 4.7.2-SNAPSHOT in 4.7 branch.

* pr/1367:
  Implement upgrade path 4.7.1 -> 4.7.2
  Updating pom.xml version numbers for release 4.7.2-SNAPSHOT
  update debian changelog

Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-26 14:56:30 +01:00
Remi Bergsma
95331aad30 Implement upgrade path 4.8.0 -> 4.8.1 2016-01-26 13:42:53 +01:00
Remi Bergsma
847fde39fd Implement upgrade path 4.7.1 -> 4.7.2 2016-01-26 13:30:48 +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
bd52375508 update debian changelog 2016-01-26 09:30:48 +01:00
Remi Bergsma
8c60ad214f Merge release branch 4.7 to 4.8
* 4.7:
  CLOUDSTACK-9254: Make longer names display pretty
  CLOUDSTACK-9245 - Deletes ACL items when destroying the VPC or deleting the ACL itself
  CLOUDSTACK-9245 - Formatting NetworkACLServiceImpl class
  CLOUDSTACK-9245 - Formatting VpcManagerImpl class
  CLOUDSTACK-9245 - Formatting NetworkACLManagerImpl class
  More VR performance!
2016-01-26 08:39:28 +01:00
Remi Bergsma
886be62cfb Merge release branch 4.7 to master
* 4.7:
  CLOUDSTACK-9245 - Deletes ACL items when destroying the VPC or deleting the ACL itself
  CLOUDSTACK-9245 - Formatting NetworkACLServiceImpl class
  CLOUDSTACK-9245 - Formatting VpcManagerImpl class
  CLOUDSTACK-9245 - Formatting NetworkACLManagerImpl class
2016-01-26 07:56:20 +01:00
Remi Bergsma
1e4bc9ae9d Merge pull request #1358 from ekholabs/fix/4.7-acl-delete-CLOUDSTACK-9245
CLOUDSTACK-9245 - Cannot delete non-attached ACL that contains itemsThis PR fixes the issue when trying to delete ACL lists which contain item.

It seemed it was not thought of when the ACS project started, when most user were relying on the UI to execute those tasks. Nowadays, with automation all over the place and ACL lists containing hundreds of items, it's very hard to have to delete them 1 by 1 either via the UI. Writing scripts to do so might be a solution, but it would be much simpler to just delete non-attached ACLs with all its items in one go.

Also, destroying a VPC that contains ACL lists was "succeeding", but after that the ACL list/items were messing up:

```
list networkacls aclid=920d74b6-4d15-454f-b3a6-61e7a6ffd1a4
Error 431: Unable to find VPC associated with acl
{
  "cserrorcode": 4350,
  "errorcode": 431,
  "errortext": "Unable to find VPC associated with acl",
  "uuidList": []
}
```

So, it also cleans up ACLs when destroying VPCs

* pr/1358:
  CLOUDSTACK-9245 - Deletes ACL items when destroying the VPC or deleting the ACL itself
  CLOUDSTACK-9245 - Formatting NetworkACLServiceImpl class
  CLOUDSTACK-9245 - Formatting VpcManagerImpl class
  CLOUDSTACK-9245 - Formatting NetworkACLManagerImpl class

Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-26 07:55:41 +01:00
Remi Bergsma
62fc6fef97 CLOUDSTACK-9256 add unique key for static routes in json 2016-01-25 17:17:55 +01:00
Remi Bergsma
ac51a78df5 Merge release branch 4.7 to master
* 4.7:
  CLOUDSTACK-9254: Make longer names display pretty
2016-01-24 19:48:47 +01:00
Remi Bergsma
7ad0d47196 Merge pull request #1362 from remibergsma/ui-name-layout
CLOUDSTACK-9254: Make longer names display pretty in UIThe arrow always fell off when I log in ;-)

Before change it looked like this:
<img width="1521" alt="screenshot_23_01_16_21_10" src="https://cloud.githubusercontent.com/assets/1630096/12533043/f4e4baa8-c223-11e5-83ed-7e77bbce3a6c.png">

Now also longer names display nicely:
<img width="1549" alt="screen shot 2016-01-23 at 22 19 41" src="https://cloud.githubusercontent.com/assets/1630096/12533051/19474d20-c224-11e5-85c4-8d5ba1b7e938.png">

Ping @borisroman

* pr/1362:
  CLOUDSTACK-9254: Make longer names display pretty

Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-24 19:47:04 +01:00
Remi Bergsma
0c8313acaa CLOUDSTACK-9254: Make longer names display pretty 2016-01-23 22:50:22 +01:00
Remi Bergsma
02ca92e0a7 Merge pull request #1354 from resmo/fix/ui-div-filter-width
UI: improve filter dropdown widthGiving a little more space to fix new line, see [after and before](https://photos.google.com/share/AF1QipP6ZeMO4B_fSLCBocr0MQmgbbq3gAf0vDY8Hy4YjUgqLH_VY8vpP2y5U6RMWL9Vfw?key=ZFVxcjUxcXZvVmZGTTQzOER6VUxYWENVODJfXzhB)

* pr/1354:
  UI: improve filter dropdown width

Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-23 19:54:05 +01:00