9340 Commits

Author SHA1 Message Date
Remi Bergsma
6d57a86cb9 Merge pull request #726 from borisroman/NicVORegression
Fix for the NicVO.java regression.Renamed set*() methods to correct naming.

* pr/726:
  Fix for the NicVO.java regression.

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-08-21 23:16:42 +02:00
Boris Schrijver
4b88eabef1 Fix for the NicVO.java regression.
Renamed set*() methods to correct naming.
2015-08-21 14:03:00 +02:00
radu-stefanache
c7a3ad4dc0 More typos 2015-08-20 13:04:29 +01:00
Rajani Karuturi
e384f2d146 Merge pull request #715 from devdeep/CLOUDSTACK-8687
CLOUDSTACK-8687: Prepare template only on a given storage poolUpdate prepare template api to seed/prepare a template only on a given primary storage. Currently, the prepare template api will seed/prepare a given template on all the primary storage pools in a zone. If however, a user wishes to prepare a template only a particular storage pool, it isn't possible. Updated the api to take storage pool id as an optional parameter. If the pool id is provided then the template is prepared only on the given primary storage pool. Also added unit tests to validate the functionality

* pr/715:
  CLOUDSTACK-8687: Unit tests for validating the prepare template functionality. These tests validate that the templates get scheduled for seeding. Additionally, if a template is already seeded, we do not try and seed it again. Tests also validate that templates are seeded to storage pools which are available.
  CLOUDSTACK-8687: Update prepare template api to seed/prepare a template only on a given primary storage. Currently, the prepare template api will seed/prepare a given template on all the primary storage pools in a zone. If however, a user wishes to prepare a template only a particular storage pool, it isn't possible. Updated the api to take storage pool id as an optional parameter. If the pool id is provided then the template is prepared only on the given primary storage pool

Signed-off-by: Rajani Karuturi <rajanikaruturi@gmail.com>
2015-08-19 15:58:42 +05:30
Rajani Karuturi
ef783d9b1d Merge pull request #707 from borisroman/CLOUDSTACK-8736
Refactored Nic.java for readability.Only changed names and reorganized them! No functional implementation change.

See issue CLOUDSTACK-8736 for ongoing effort to clean up network code.

* pr/707:
  Renamed internal variables of NicProfile.java to adhere to the naming convention.
  Refactored Nic.java for readability.

Signed-off-by: Rajani Karuturi <rajanikaruturi@gmail.com>
2015-08-19 10:50:10 +05:30
Devdeep Singh
fedef2e6ca CLOUDSTACK-8687: Unit tests for validating the prepare template functionality.
These tests validate that the templates get scheduled for seeding. Additionally,
if a template is already seeded, we do not try and seed it again. Tests also
validate that templates are seeded to storage pools which are available.
2015-08-19 10:06:54 +05:30
Devdeep Singh
adf6b588dd CLOUDSTACK-8687: Update prepare template api to seed/prepare a template
only on a given primary storage. Currently, the prepare template api
will seed/prepare a given template on all the primary storage pools in
a zone. If however, a user wishes to prepare a template only a
particular storage pool, it isn't possible. Updated the api to take
storage pool id as an optional parameter. If the pool id is provided
then the template is prepared only on the given primary storage pool
2015-08-19 10:04:05 +05:30
Boris Schrijver
c30ba1df0b Refactored Nic.java for readability.
Changed methodnames according to Nic.java refactor.

Fixed NicVO.java due to regression from Nic.java refactor.

Fixed VmWareGuru.java after Nic.java refactor.

See issue CLOUDSTACK-8736 for ongoing effort to clean up network code.
2015-08-18 14:04:48 +02:00
Wido den Hollander
64a2cbdae6 Merge pull request #708 from radu-stefanache/master
Fixed typoSpotted this using Elasticsearch .

* pr/708:
  Typo correction

Signed-off-by: Wido den Hollander <wido@widodh.nl>
2015-08-18 12:03:24 +02:00
Wido den Hollander
bc51a42fc2 Merge pull request #705 from borisroman/CLOUDSTACK-8736
Refactored NicProfile.java for readability.Only changed names and reorganized them! No functional implementation change.

See issue CLOUDSTACK-8736 for ongoing effort to clean up network code.

* pr/705:
  Refactored NicProfile.java for readability.

Signed-off-by: Wido den Hollander <wido@widodh.nl>
2015-08-17 15:24:06 +02:00
Boris Schrijver
5db3371840 Refactored NicProfile.java for readability.
See issue CLOUDSTACK-8736 for ongoing effort to clean up network code.
2015-08-17 14:12:10 +02:00
Koushik Das
f2f29525ae CLOUDSTACK-8737: Remove out-of-band VR reboot code based on persistent VR configuration changes
Removed out-of-band VR reboot code
2015-08-17 14:49:32 +05:30
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
07bee3149c CLOUDSTACK-8656: restructure tests to ensure exception throwing 2015-08-14 15:43:54 +02:00
Remi Bergsma
0fcc7297e0 Merge pull request #680 from borisroman/CLOUDSTACK-8580
Interface changes related to CLOUDSTACK-8580See issue CLOUDSTACK-8580 and individual commits.

* pr/680:
  Made interface changes related to CLOUDSTACK-8580

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-08-14 11:47:36 +02:00
Boris Schrijver
655fcc924f Made interface changes related to CLOUDSTACK-8580
Added responses to ListCapabilities to reflect CLOUDSTACK-8580 changes.

This to add these options to the gui. See issue CLOUDSTACK-8580.

3be14e978a

Removed comments as proposed by Daan Hoogland.
2015-08-14 11:13:21 +02:00
Milamber
72e55029ef Improve debug message when the scheduler prepare to snapshot (volume 'id' and add volume name)
Signed-off-by: Milamber <milamber@apache.org>
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #676

(cherry picked from commit 606afe341dce93b7efe88d0989029848947f25aa)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-08-14 14:12:46 +05:30
Rohit Yadav
89f47ece3d CLOUDSTACK-8702: Add/refactor sessionkey checking code to HttpUtils
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit cb7dd7b27dff1408cc41d69152a644c5b8842bfe)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-08-14 11:56:55 +05:30
Boris Schrijver
aa7f8e57c5 Added unit tests for CLOUDSTACK-8133
Tests will confirm the behaviour of the newly added response fields of listSecurityGroups.

Signed-off-by: Wido den Hollander <wido@widodh.nl>

This closes #679
2015-08-13 13:47:38 +02:00
Boris Schrijver
03f48872d6 CLOUDSTACK-8133 Added Virtualmachine count and ID's to listSecurityGroups response.
See issue CLOUDSTACK-8133 for more information.

Added null check by comment of Koushik Das.

Added brackets by comment of Wido den Hollander.

Removed a call to findById() by comment of Koushik Das.

Signed-off-by: Wido den Hollander <wido@widodh.nl>
2015-08-13 13:47:38 +02:00
Radu Stefanache
f5a6d8ca3a Typo correction
Simple typo in the code .
2015-08-12 09:48:49 +01:00
Remi Bergsma
f65dec4b0f Merge pull request #658 from manuiiit/pull-11
Implemented condition that only admin or owner of the template can change its permissions ..... using updateTemplatePermissions API

Consider this scenario :
In a domain, there are three User Accounts UA1, UA2,UA3
A private template is registered by UA1
Through the updateTemplatePermissions API, UA1 gives permission to both UA2 and UA3
Now, UA2, having been shared the template, can remove the permission of UA3(or add permissions to another account).
EXPECTED BEHAVIOR :
UA2 should not be able to to add/remove permissions of other accounts.

* pr/658:
  Implemented condition that only admin or owner of the template can change its permissions using updateTemplatePermissions API

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-08-11 11:38:33 +02:00
Maneesha.P
f7e8d44552 Implemented condition that only admin or owner of the template can change its permissions using updateTemplatePermissions API 2015-08-11 11:08:35 +05:30
Mike Tutkowski
8b0266d12e Merge branch 'pr/547'
* pr/547:
  CLOUDSTACK-8601. VMFS storage added as local storage can be re-added as shared storage. Fail addition of a VMFS shared storage pool in case it has already been added as local storage in CS.

Signed-off-by: Mike Tutkowski <mike.tutkowski@solidfire.com>
2015-08-10 19:00:53 -06:00
Remi Bergsma
cd02a59841 Merge pull request #656 from koushik-das/CLOUDSTACK-8704
CLOUDSTACK-8704: Schedule restart of router VMs ahead of user VMs as part of HA

VRs are scheduled for HA ahead of user VMs.

Refer to the bug for more details.

* pr/656:
  CLOUDSTACK-8704: Schedule restart of router VMs ahead of user VMs as part of HA VRs are scheduled for HA ahead of user VMs

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-08-10 12:13:15 +02:00
Koushik Das
44c1ef04a0 CLOUDSTACK-8704: Schedule restart of router VMs ahead of user VMs as part of HA
VRs are scheduled for HA ahead of user VMs
2015-08-10 14:51:44 +05:30
Remi Bergsma
e8ade2dd9e Merge pull request #662 from manuiiit/pull-14
CLOUDSTACK-8711: public_ip type resource count for an account is not decremented upon IP range deletionProblem:
--------------------------
When you add an IP range and associate it to an account then resource count of public_ip will be updated to the range length.
After some time try to delete this range and the resource count of public_up for this account is not descremented and is causing account not to add any more public IPs to it once it reaches the resource limit.
RCA:
----------------
We were not decrement the count while deleting the IP range that was associated to an account.
Fix:
-------------
Up on deletion we are decrementing the resource count for public_up now.

* pr/662:
  Bug-Id: CS-27335: public_ip type resource count for an account is not decremented upon IP range deletion

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-08-10 09:24:27 +02:00
Remi Bergsma
a08d8b1845 Merge pull request #666 from @remibergsma
CLOUDSTACK-8709 No out of band migrate alert for non-routers

* pr/666:
  CLOUDSTACK-8709 No out of band migrate alert for non-routers

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-08-07 16:44:21 +02:00
Remi Bergsma
90feab18e0 Merge pull request #659 from @manuiiit
CLOUDSTACK-8714 Restore VM (Re-install VM) with enable.storage.migration set to false fails

* pr/659:
  Bug-ID:CS-27160: Restore VM (Re-install VM) with enable.storage.migration set to false fails, later fails to start up VM too

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-08-07 16:36:54 +02:00
Remi Bergsma
daa30c4722 CLOUDSTACK-8709 No out of band migrate alert for non-routers 2015-08-07 14:30:00 +02:00
Damodar
865623fd1e Bug-Id: CS-27335: public_ip type resource count for an account is not decremented upon IP range deletion
Reviewed-By: Kishan/Bharat

Signed-off-by: Maneesha.P <maneesha.papireddygari@citrix.com>
2015-08-06 14:39:27 +05:30
Mike Tutkowski
b1905c2040 CLOUDSTACK-8698: Retrieve a new device ID, if needed 2015-08-05 13:58:22 -06:00
Prachi Damle
a3e87cfa95 Bug-ID:CS-27160: Restore VM (Re-install VM) with enable.storage.migration set to false fails, later fails to start up VM too
Reviewed-By: Anthony

Changes:
- Try to reuse the storage pools for READY disks if the pool fits the deployment plan
- Try to use the last_host if it has free capacity but no reserved capacity

Signed-off-by: Maneesha.P <maneesha.papireddygari@citrix.com>
2015-08-06 00:19:18 +05:30
Daan Hoogland
6fa8b7578e CLOUDSTACK-8656: reporting ignored exceptions in server 2015-08-04 15:50:35 +02:00
Daan Hoogland
c1ac5f3abc Merge pull request #643 from @kansal
Coverity Issue: Resource Leak fixed

* pr/643:
  CLOUDSTACK-8692: Resource leak found by the internal coverity instance at Citrix fixed.

Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>
2015-08-03 11:09:24 +02:00
Kshitij Kansal
e0ba5302b6 CLOUDSTACK-8692: Resource leak found by the internal coverity instance at Citrix fixed. 2015-08-03 11:21:50 +05:30
Daan Hoogland
e2b6237464 CLOUDSTACK-8656: debug messages on interupted exceptions 2015-07-30 16:03:10 +02:00
Daan Hoogland
85e002b230 CLOUDSTACK-8656: filling empty catch block with info messages
using regexp "catch\s*\(\s*(Exception|Throwable)\s*\w*\)\s*\{\s*\}"
2015-07-30 15:51:52 +02:00
Koushik Das
6c3c9ea915 Unit tests for HA manager investigate method. Refer to CLOUDSTACK-8666 for the code chenges 2015-07-28 11:22:32 +05:30
Daan Hoogland
8b350c37bd coverity 1133705: output writer close
Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>
2015-07-27 14:43:11 +02:00
Koushik Das
090db05821 CLOUDSTACK-8666: Put host in Alert state only after alert.wait timeout
Instead of putting the host to Alert state immediately, the investigators should be allowed to run for some time based on alert.wait global config.
At the end of this interval if the host state still cannot be determined then put the host in Alert. Also updated some of the log messages.

This closes #621
2015-07-24 12:16:07 +05:30
Boris Schrijver
2984acca83 CLOUDSTACK-8580 Users are now able to view, expunge and recover their vm's themselves. Two configuration options are added to allow this behaviour on a global or per account scale. Configuration options default to false.
Signed-off-by: wilderrodrigues <wrodrigues@schubergphilis.com>

This closes #593
2015-07-23 13:59:44 +02:00
Boris Schrijver
2e79c628e0 CLOUDSTACK-8649: Fixed unnecessary double url decoding in registerSSHKeyPair.
Signed-off-by: wilderrodrigues <wrodrigues@schubergphilis.com>

This closes #615
2015-07-23 08:18:15 +02:00
Wido den Hollander
fbe3b04a43 CLOUDSTACK-8628: Send an alert when fencing a KVM host failed
Also change the logging a bit so that you get useful logs when
not running on DEBUG level

Signed-off-by: Wido den Hollander <wido@widodh.nl>

This closes #580
2015-07-17 12:33:11 +02:00
Koushik Das
2df190d0ee CLOUDSTACK-8623: CPVM fails to start after MS is restarted during its initial start-up process
Added unit tests

This closes #571
2015-07-14 10:56:05 +05:30
Koushik Das
9ec2a6c29c CLOUDSTACK-8623: CPVM fails to start after MS is restarted during its initial start-up process
If SSVM cannot be started then the existing entry is removed and a new SSVM gets created. Made similar changes for CPVM as well.
Also cleaned up some log messages in SSVM and CPVM manager code.
2015-07-14 10:55:19 +05:30
Rohit Yadav
42940a8828 CLOUDSTACK-8622: Reinstate working sessions in browser
- Login is based on sessionkey HttpOnly Cookie
- ApiServlet does login verification using sessionKey from both the request cookies
  and the API parameters. In both cases, if either or both are passed they should
  match the sessionKey stored in the current session of the HttpRequest
- UI: it no longer needs to read or set sessionkey cookie
- UI: it no longer needs to return g_sessionKey value in the API requests, though
  to support a sso mechanism g_sessionKey is still passed in the API is not null
- Secure jsessionid cookie is set to be HttpOnly and Secure
- SAML login should also set HttpOnly cookie before redirecting to UI
- SAML: listIdps & getSPMetadata APIs are readonly now, won't log out a logged in user

Performed tests (login, saml login if applicable, page refreshes, opening
multiple tabs, logout) with following combinations:
- SAML disabled, normal auth as admin, domain-admin and user
- SAML enabled, normal auth as admin, domain-admin and user; and saml sso as
  admin, domain-admin and user

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #574
This closes #308
2015-07-10 17:25:07 +05:30
Jayapal
140cd7c227 CLOUDSTACK-8324: Fixed config key in multiple places 2015-07-10 09:47:09 +05:30
Daan Hoogland
0cd8c06f7d coverity 1116680: update datacentre for ip adresses these resources are created often and will create serious leakage if closing failes
Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-07-09 21:30:24 +02:00
Daan Hoogland
bcc8182f2f findbugs: write to static from instance these are the trivial cases of ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD as reported by findbugs
Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>

This closes #539
2015-07-09 15:01:58 +02:00