9205 Commits

Author SHA1 Message Date
Rohit Yadav
6df2fe7a8a CLOUDSTACK-8273: refactor baremetal user name to utils, restrict baremetal user
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit cb08707addbffa12abc50aec9ad980059f23910c)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

Conflicts:
	server/src/com/cloud/user/AccountManagerImpl.java
2015-02-26 17:47:01 +05:30
Rohit Yadav
cb08707add CLOUDSTACK-8273: refactor baremetal user name to utils, restrict baremetal user
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-26 17:42:21 +05:30
Rohit Yadav
e1827fc696 CLOUDSTACK-8285: check and update IP capacity states based on allocation state
- Backend should update if state was diabled and now has changed
- UI's fetch latest does not actually fetch latest

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit 985a61652eb5dc97503c002e9fc3c3a7ca39b70c)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-25 16:47:40 +05:30
Rohit Yadav
985a61652e CLOUDSTACK-8285: check and update IP capacity states based on allocation state
- Backend should update if state was diabled and now has changed
- UI's fetch latest does not actually fetch latest

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-25 16:46:12 +05:30
Rohit Yadav
4f9bc70b1f CLOUDSTACK-8282: startSystemVM should override consoleproxy.start setting
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit b462a56f27b21455b70415ea03663af5cd62647e)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-25 14:30:13 +05:30
Rohit Yadav
b462a56f27 CLOUDSTACK-8282: startSystemVM should override consoleproxy.start setting
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-25 14:21:11 +05:30
Koushik Das
dc870b5114 volume upload: Size is listed as zero for uploaded volumes
Updating the virtual size for template/volume when upload is completed.
2015-02-19 17:13:47 +05:30
Koushik Das
075c841052 volume upload: cannot delete a volume in NotUploaded state Added exception handler in the upload status monitor thread. 2015-02-17 12:31:41 +05:30
Koushik Das
d19ea5226a volume upload: Use volume/template UUID instead of ID in UploadStatusCommand 2015-02-17 12:31:40 +05:30
Rajani Karuturi
b616894c21 volume upload: fixed issues during request validation
adding the encoded metadata to the signature
2015-02-17 11:50:58 +05:30
Rajani Karuturi
5c4fd12a9b volume upload: using the timeout from configuration
removed the hardcoded 60 min
2015-02-17 11:33:29 +05:30
Rajani Karuturi
812a140d17 volume upload: returning only the first payload incase of templates
Cross zone copy will be intiated by the management server.
2015-02-17 11:32:40 +05:30
Rajani Karuturi
3814677977 volume upload: getUploadParamsForVolume url has IP address instead of hostname, SSL fails 2015-02-17 11:31:44 +05:30
Rohit Yadav
2580edbcfb CLOUDSTACK-7908: UserVmResponse returns userid/username information of the creator
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-16 16:12:22 +05:30
Rohit Yadav
1a6df6f978 CLOUDSTACK-7908: Add user_id column to vm_instance table
Design Document:
https://cwiki.apache.org/confluence/display/CLOUDSTACK/Allow+VM+listing+by+User+ID

- Adds column to VMInstance DAO
- Adds column in vm_instance table
- Adds column in the UserVMJoinVO
- Adds default admin user which has UID = 2
- Adds migration path that sets user_id to first user of the accountId that
  owns the vm in vm_instance table
- Add arg on list VMs API to query by userId, add support in query layer
- Refactor VMInstanceVO and child classes to accept userId
- Add code to let service layer pass userId if loggedIn user belongs to same
  account as the owner executing an API call or use first user from owner account
- In case of CPVM and SSVM use system user ID
- Fix unit tests and spring injections

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-16 15:02:38 +05:30
Santhosh Edukulla
78bfaa79cf Fixed few coverity issues like invalid boxing unboxing issues, resource leaks, null dereferences
(cherry picked from commit ef6ec7b27675ea44d45c68b30eb2f508655703be)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-06 16:50:20 +05:30
Sheng Yang
405ed3ca50 CLOUDSTACK-7605: Fix basic zone multiple pod network restart with cleanup=true
1. getRouters() doesn't handle RestartNetwork with cleanup=true for basic zone,
because pod wouldn't be specific at the time.

2. The regression caused by the following fix. The variable "routers" was
overrided with some local values, result in only one of the routers in multiple
pods would return, thus only one router would be started.

commit 6dd5c3fd42c70855d75156243dddc4933436baaf
Author: Rohit Yadav <bhaisaab@apache.org>
Date: Thu Oct 11 18:30:00 2012 +0530
CLOUDSTACK-70: Improve restart network behaviour for basic network

(cherry picked from commit aaeadc5c44e3fe16a1deea5348b085b08b5f4f4d)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-06 16:44:19 +05:30
Kishan Kavala
40e296dea4 CLOUDSTACK-7267: For LXC volumes, show unsupported operation error for template creation from ROOT volume
(cherry picked from commit e427d0004c7df501912e0c3f9af2f4f237514454)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-06 16:32:35 +05:30
Nitin Mehta
4ea0dcda9b CLOUDSTACK-7870: When Vm deployments fail and end in error state volume count should be decremented
(cherry picked from commit a8b89bea4f37a54267694b9a49be6b5bec91f0b0)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-06 16:24:06 +05:30
Saksham Srivastava
54d08a8e29 CLOUDSTACK-8091: Stale entry exists for a VM NIC even after an exception while adding a new nic to vm
(cherry picked from commit 4821bfffe2813ffb43761246e75cc7cf73291d27)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-06 16:19:46 +05:30
Rohit Yadav
1cf165f86d ApiResponseHelper: fix NPE when parent of snapshot is null 2015-02-05 17:10:56 +05:30
Rohit Yadav
fae4fdae53 ApiResponseHelper: fix NPE when parent of snapshot is null
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-05 17:02:30 +05:30
Kishan Kavala
7a397cd4ef For volumes created from template, do not log offering ID in VOLUME.CREATE in usage_event. Moved offering type to DiskOffering interface
(cherry picked from commit 9eb8d538dd196f27e5194dd2e657afffdb9347eb)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-05 16:37:59 +05:30
Santhosh Edukulla
c25263ba81 Fixed Coverity Issues 2015-02-05 15:59:29 +05:30
Damodar
01cc1b816d CLOUDSTACK-7792: Usage Events to be captured based on Volume State Machine
(cherry picked from commit 781648fb1003c8c32875e9ff7a6c4ef4694539f7)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

Conflicts:
	engine/orchestration/src/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java
	engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
2015-02-05 15:22:21 +05:30
Damodar
8ec6d0471c CLOUDSTACK-7648: There are new VM State Machine changes introduced which were missed to capture the usage events
(cherry picked from commit 50185b7c3a1fd26e9a8635c28cee70fda32d3fc5)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

Conflicts:
	plugins/hypervisors/baremetal/src/com/cloud/baremetal/manager/BaremetalManagerImpl.java
	server/src/com/cloud/capacity/CapacityManagerImpl.java
	server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
2015-02-05 14:56:52 +05:30
Kishan Kavala
6541354a59 Trigger user stats aggregation job at midnight in usage aggregation timezone
(cherry picked from commit 4ac96d637c9efe0db50dd707dd161426aeb54a13)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

Conflicts:
	server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
2015-02-05 14:33:27 +05:30
Rajesh Battala
782adc106e CLOUDSTACK-7313 Fixed issues in provisioning vpx in SDX from CS
(cherry picked from commit 0f528df228ac51581b8ff6f63e8ffb6db3d94d39)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-05 13:50:29 +05:30
Santhosh Edukulla
bd190192b9 Fixed Resource Leaks
Signed-off-by: Santhosh Edukulla <santhosh.edukulla@gmail.com>
(cherry picked from commit 350ac4c4b0e71156ed27307b2d625f46453500a2)

Conflicts:
	engine/schema/src/com/cloud/upgrade/dao/Upgrade441to450.java
2015-02-05 13:47:22 +05:30
Anthony Xu
98b416b7f0 fixed NPE
(cherry picked from commit c78f14cbc2fd45fc587f4a238c0a0bfc1d753be8)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-05 12:10:09 +05:30
Daan Hoogland
b586439c9f CLOUDSTACK-8197 create MinVRVersion config item 2015-02-03 13:18:15 +01:00
Rohit Yadav
552f2ae60c CLOUDSTACK-8191: SAML users should have their own accounts
(cherry picked from commit 876c78fe1ba6abe132131b3449b21fd09f2c14e1)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-02 19:58:10 +05:30
Rohit Yadav
876c78fe1b CLOUDSTACK-8191: SAML users should have their own accounts
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-02 19:56:25 +05:30
Devdeep Singh
0e4d91aa91 CLOUDSTACK-6924. To attach a volume if a volume needs to be moved to another storage
pool, the source and destination pools cannot be local and cluster/zone and vice versa.
Cloudstack detects it and throws a exception. However, the end user only sees an
unexpected exception and not the reason for failure. Fixed it by making sure the
reason for the failure is correctly captured and shown to the end user.

(cherry picked from commit cffae8eef0b1f9bf869a5ec99befbe9ae9d9290d)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

Conflicts:
	server/src/com/cloud/storage/VolumeApiServiceImpl.java
2015-02-02 14:36:07 +05:30
Likitha Shetty
f00140243c CLOUDSTACK-8112. CS allows creation of VM's with the same Display name when vm.instancename.flag is set to true.
During VM creation, if vm.instancename.flag is set to true and hypervisor type is VMware, check if VM with the same hostname already exists in the zone.

(cherry picked from commit 5f9e4fddf303f312a0b17abc0d837f28042caeda)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-02 14:30:18 +05:30
Likitha Shetty
272f282a05 CLOUDSTACK-8119. Propagate error message to UI for attach/detach volume failure operations.
For AttachVolume/DetachVolume API command, improve user error message in case of RuntimeException by throwing the exception instead of 'Unexpected Exception'.

(cherry picked from commit 4d7ede535df568c6aab4a228ac794ec11d433e1e)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

Conflicts:
	server/src/com/cloud/storage/VolumeApiServiceImpl.java
2015-02-02 13:57:38 +05:30
Likitha Shetty
b9932a0129 CLOUDSTACK-8122. Handle NPE thrown during migration failures.
When migration fails instead of returning NULL, throw the exception.

(cherry picked from commit a5a65c7b551ee5cc32588997937267b716eff681)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-02 13:56:43 +05:30
Likitha Shetty
bcbfe3bdee CLOUDSTACK-8129. Cold migration of VM across VMware DCs leaves the VM behind in the source host.
If VM has been cold migrated across different VMware DCs, then unregister the VM from source host.

(cherry picked from commit 15b348632df2049347f58c87830be2c02eee3b61)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-02 13:51:47 +05:30
Likitha Shetty
8f4aa23ae0 CLOUDSTACK-8127. VM name not displayed after attaching data disk to a VM.
If user hasn't supplied a display name for a VM, default it to VM name in listVolume response.
This behaviour is identical to listVirtualMachine response.

(cherry picked from commit ff7997a2b139ed25f301ed1b8ad388864fcb9980)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-02 13:01:33 +05:30
Koushik Das
121ff19cba volume-upload: Attaching uploaded volume to an instance failing while copying from secondary to primary storage
The volume/template size and install path was not getting updated properly.
The upload status response should return these properties on completion of upload.
2015-01-31 17:27:46 +05:30
Koushik Das
6ff8752fd0 volume-upload: gc thread to clean partially uploaded files
Fixed multiple issues in the template code path
2015-01-31 17:25:19 +05:30
Koushik Das
c9908d2678 volume-upload: management server polling and upload status from agent
Some more fixes to the polling logic
2015-01-31 17:10:46 +05:30
Koushik Das
3e857bde08 volume-upload: management server polling and upload status from agent
Fixed some issues with the polling logic to handle scenarios when SSVM is destroyed/down.
Also changed the status of the volume_store_ref entries so that subsequent operations work fine.
2015-01-31 17:02:18 +05:30
Mike Tutkowski
5f16bf746b When canceling maintenance mode, the logic was looking at the id field of the work object instead of the id field of the VM object. 2015-01-29 23:11:29 -07:00
Mike Tutkowski
31f67c2b3c If the HypervisorType of a storage pool is Any, we need to retrieve hosts in the given zone for each HypervisorType. 2015-01-29 19:18:04 -07:00
Mike Tutkowski
bd6a89939d Adding/updating comments around the volume's hypervisor snapshot reserve field 2015-01-29 15:50:42 -07:00
Mike Tutkowski
1b51bbbf74 Update hypervisor snapshot reserve for the root volume earlier than when it is currently being set 2015-01-29 13:01:51 -07:00
Rajani Karuturi
89ef9e709b volume upload: updating the PSK if its null 2015-01-29 16:55:26 +05:30
Mike Tutkowski
8aa34d048a Putting in an extra check to see if this volume is already attached to a VM 2015-01-26 17:25:17 -07:00
Nitin Mehta
abf4e5c646 CLOUDSTACK-8181: Introducing a new allocator called firstfitleastconsumed. The purpose of this allocator is to find hosts/pools with least capacity usage (in terms of percentage) within the cluster and use those resources first before others. This allocator can be used changing vm.allocation.algorithm. For hosts it would decide the least consumed host through the setting host.capacityType.to.order.clusters to base the usage on cpu or ram.
Reviewed-by: Prachi
2015-01-26 10:48:06 -08:00