9509 Commits

Author SHA1 Message Date
Rene Moser
0b956bbc1f config: doc: add default value 10 in description for vm.network.nic.max.secondary.ipaddresses
value hardcoded by commit 4925b9f6a126454215531998c461bf376ac6ab67
2015-09-04 16:03:24 +02:00
wilderrodrigues
53c9bb4d38 CLOUDSTACK-8759 - Fix guets nic allocation
- When stopping/detroying a VPC router and creating a new one via the addition os a VM, the networks are no plugged correctly
   - The ETH1 ends up with the IP of the guest nic, which remains down. This causes routes problems and the VMs are not reachable via the pub IPs
2015-09-03 09:38:56 +02:00
wilderrodrigues
23d0f3feda CLOUDSTACK-8759 - Adding a marvin test in order to cover the fix
- The test will create a VPC, add 2 tier, 2 VMs, ACL, PF and SSH into the VM
   - Then it will stop the router, destroy the router, add another VM to 1 tier and check that we can reach all the VMs
2015-09-02 17:05:16 +02:00
Wei Zhou
c0a0aec0f9 Merge pull request #732 from ustcweizhou/revert-volume-snapshot-master
Guys, can you review it? things need to be discussed:
(1) this supports KVM/QCOW2 only. Anyone want to implement for other Hypervisor/format ?
(2) The original data volume (on primary storage) will be removed.
(3) The script uses the default timeout in libvirtComputingResource. Do we need to add one in global configuration (like copy.volume.wait or backup.snapshot.wait, create.volume.from.snapshot.wait)
(4) In scripts/storage/qcow2/managesnapshot.sh, I use "qemu-img convert -f qcow2 -O qcow2" to copy the snapshot from secondary to primary (hence there is no base image file), instead of "cp -f", this is because convert is faster than cp in my testing.

* pr/732:
  CLOUDSTACK-5863: revert volume snapshot for KVM/QCOW2

Signed-off-by: Wei Zhou <w.zhou@tech.leaseweb.com>
2015-09-01 16:18:40 +02:00
wilderrodrigues
21df0ffe89 CLOUDSTACK-8759 - The guest nic has to be added after the control nic
- The was an issue introduced on 4.5 with the VPC refactor.
   - Adding a VM to a VPC with no router would create a broken VPC router, with no nics
2015-09-01 14:31:49 +02:00
Koushik Das
f732c7d1e9 Merge pull request #760 from koushik-das/CLOUDSTACK-8785
CLOUDSTACK-8785: Proper enforcement of retry count (max.retries) for all work type handled by HighAvailability manager
Retry count is properly enforced for all work types in HA manager. Also reorganized some of the code for easy testing.

Signed-off-by: Koushik Das <koushik@apache.org>
2015-09-01 17:59:08 +05:30
Koushik Das
53cba7c741 Merge pull request #741 from koushik-das/simulator_fixes
Made following fixes in simulator
- Support for ScaleVmCommand/NetworkRulesVmSecondaryIpCommand in resource layer
- Added support for scaling up a running VM in simulator
- Fixed some method names not following convention

In order to test PR #725 using simulator some of these changes are needed.

Based on the way HV check is present in the scale VM API, had to explicitly put simulator related check to allow support. The ideal way would be to remove all these HV specific check from code and made them some configuration (by putting them in hypervisor_capabilities table in DB). But that will be a bigger effort outside the scope of this PR.

Signed-off-by: Koushik Das <koushik@apache.org>
2015-08-31 12:15:54 +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
Koushik Das
cbf2c3bbf6 CLOUDSTACK-8785: Proper enforcement of retry count (max.retries) for all work type handled by HighAvailability manager
Retry count is properly enforced for all work types in HA manager. Also reorganized some of the code for easy testing.
2015-08-28 17:59:17 +05:30
Kshitij Kansal
fe7df96804 Coverity Issue: NUll Pointer dereferncing fixed and commits squashed. 2015-08-28 16:05:01 +05:30
Wei Zhou
312cb877b1 CLOUDSTACK-5863: change response from SuccessResponse to SnapshotResponse 2015-08-28 08:54:11 +02:00
Rajani Karuturi
59291864fc CLOUDSTACK-8647 added nested group enabled config in ldap
querying the nested groups only when nested groups are enabled
2015-08-27 17:30:21 +05:30
Rajani Karuturi
0dc9ccd189 CLOUDSTACK-8647 added account_type to the linkDomainToLdap API 2015-08-27 17:30:20 +05:30
Rajani Karuturi
7109689fde CLOUDSTACK-8647 changed the authentication flow
added check to see if domain is linked to ldap. If yes and the user is
member of the group/OU, authenticate and import user.
2015-08-27 17:30:20 +05:30
Rohit Yadav
5f04aa5687 Merge pull request #673 from anshul1886/CLOUDSTACK-8721
CLOUDSTACK-8721: Fixed Setting details of VM through API results in removal of all other details except the one passed in API

* pr/673:
  CLOUDSTACK-8721: Fixed Setting details of VM through API results in removal of all other details except the one passed in API

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-08-26 16:08:46 +05:30
Koushik Das
86684cd4bc Made following fixes in simulator
- Support for ScaleVmCommand/NetworkRulesVmSecondaryIpCommand in resource layer
- Added support for scaling up a running VM in simulator
- Fixed some method names not following convention
2015-08-25 14:52:48 +05:30
Wei Zhou
92344c006d CLOUDSTACK-5863: revert volume snapshot for KVM/QCOW2 2015-08-24 11:01:50 +02:00
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
Anshul Gangwar
728635a3d3 CLOUDSTACK-8721: Fixed Setting details of VM through API results in removal of all other details except the one passed in API 2015-08-10 16:14:04 +05:30
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