105 Commits

Author SHA1 Message Date
abhishek
0273872b34 bug 7362: we were missing the size validation check, when we create a volume from disk offering (the storage.max.volume.size param wasn't being used for validation). Fixed the same, made the validation method name more generic to be applicable to all validations, and changed the param description to denote GB as the unit
status 7362: resolved fixed
2010-11-29 17:23:16 -08:00
abhishek
3d4b8ab4a0 bug 7263: changing the param name. Found a couple of bugs whilst testing this, the validation of vol size whilst cust vol creation was missing. Adding the same.
status 7263: resolved fixed
2010-11-23 16:20:30 -08:00
abhishek
40c3a0afa2 bug 7249: during volume creation (root and data) for a vm, there was no state being set (we need to set it to ready). Hence, whilst re-attaching a detached vol, we hit a NPE. Fixed the root cause of the state not being set during vm creation, and consequently, fixed this npe
status 7249: resolved fixed
2010-11-23 14:24:29 -08:00
abhishek
8995e5d2f7 changing the event logged to the right type, whilst starting user vms via cancelstoragemaintenance in master (already merged to 2.2.beta1) 2010-11-22 16:20:18 -08:00
abhishek
0979b644ef bug 7230: there was an issue trying to start user vms when the pool state is cancelmaintenance; fixing the same in 2.2RC2
status 7230: resolved fixed
2010-11-22 11:00:43 -08:00
Alex Huang
1e44925564 api refactoring 2010-11-21 12:00:21 -08:00
alena
138e0914b6 bug 7245: don't try to set vm name for detached volume during expunge process.
status 7245: resolved fixed

Fixed couple of other problems:
* cleanup corresponding records in load_balancer_vm_map table when loadBalancerRule is removed.
* don't log "java.lang.IllegalStateException: getAttribute: Session already invalidated" exception when UI session expires
2010-11-19 20:08:18 -08:00
edison
0c35f2f743 bug 7237: disk size is passed in diskProfile, no need size parameter in createcommand
status 7237: rresolved fixed
2010-11-19 11:55:27 -08:00
abhishek
317554d983 ensuring all the following have api values taken in, in GB (disk offering, service offering, custom vol creation and vm creation from cust disk offering) 2010-11-18 14:32:50 -08:00
Kelven Yang
5490577469 1) Remove forwarding between eth1 and eth2 as it does not solve the problem of asymmetic routing
2) correct Eclipse project settings
3) If VM is hosted by vmware hypervisor, give the previous host preference to start on to fit VMware's VM-centric model
2010-11-17 15:55:04 -08:00
alena
c5d78a726e Modified exception handing in API. Following exceptions are supported now (location - BaseCmd.java):
* MALFORMED_PARAMETER_ERROR - when type of the request parameter is invalid (String instead of Long for id for example)
* PARAM_ERROR - when invalid parameter value is specified in api request. For example, id of non existing vm for StartVmCmd
* ACCOUNT_RESOURCE_LIMIT_ERROR - when user tries to exceed his resource limits by executing the api command.
* INSUFFICIENT_CAPACITY_ERROR - when resource fails to create/start due to insufficient capacity.
* RESOURCE_UNAVAILABLE_ERROR - when user tries to create a vm when storage is not available.
* RESOURCE_IN_USE_ERROR - when user tries to delete/modify resource while it's in use. For example, when we try to delete a network group when it contains ingress rules.
* NETWORK_RULE_CONFLICT_ERROR - when LB/PF rule to add conflicts with existing rule
* ACCOUNT_ERROR - when user is not authorized to execute operation on the resource.
* INTERNAL_ERROR
2010-11-16 11:56:34 -08:00
abhishek
6d943abf55 bug 7119: code refactor away from the ms calls, to the share and prepare methods based on alex's recommendations
status 7119: resolved fixed
2010-11-15 11:17:36 -08:00
anthony
2537dc3058 bug 7149: merge from 2.1.x 2010-11-12 13:16:03 -08:00
abhishek
e79e432807 we were using debug logging without checking ifDebugEnabled(), fixing that 2010-11-11 17:20:57 -08:00
abhishek
fcd7f37839 bug 7037: adding more logging to the deletepool cmd
status 7037: resolved fixed
2010-11-11 17:20:57 -08:00
abhishek
709fc3686f another fix for a related bug on data volumes I found whilst testing the parent bug 2010-11-11 16:39:15 -08:00
abhishek
968dc0616f bug 7021: data disk wasn't being created for custom sizes. Also, we were having max size checks in GB, whereas disk offerings are in MB. Made the change there as well.The storage allocators were commented out in master, uncommented them.
Status 7021: resolved fixed
2010-11-11 15:45:21 -08:00
abhishek
7262b854a5 bug 7121: made the disk offering id optional, and added a check to ensure we never have both disk offering and snapshot ids to be null
status 7121: resolved fixed
2010-11-08 17:59:26 -08:00
abhishek
0b1bddb125 code realignment 2010-11-04 18:42:38 -07:00
abhishek
103278415e bug 7035: allowing cancel maintenance for all sp states except UP
status 7035: resolved fixed
2010-11-04 18:42:38 -07:00
abhishek
364e1e1c4a bug 7034,6869: fixing the storage pools issue, and the npe at load balancer if the router is not found.
status 7034, 6869: resolved fixed
2010-11-04 17:18:58 -07:00
abhishek
e9bd0594bd bug 7022: fixing the custom size for volumes bug
status 7022: resolved fixed
2010-11-04 15:51:33 -07:00
abhishek
9a3d5c3ae3 forgot to throw the serverapiexception in the cancel maintenance cmd 2010-11-04 14:35:36 -07:00
abhishek
baa28d2022 returning serverapiexceptions for prepare and cancel pool maintenance; making it consistent with other pieces of code 2010-11-04 13:40:10 -07:00
abhishek
55e9378f9a don't set state to errorinmaintenance if cancel maintenance encounters a ps with a state !=Maintenance 2010-11-04 13:35:57 -07:00
abhishek
d96a1a841d adding logic to prevent commands from being sent to the pool when it is NOT up; also adding better thread safety and db locking, along with a general refactor 2010-11-04 13:35:57 -07:00
abhishek
89f0c455e3 fixing the vm creation issue 2010-11-04 10:47:59 -07:00
abhishek
84ee08430a making changes to the list zones flow, to add the domain name to the table, and return it 2010-11-03 22:08:32 -07:00
Alex Huang
e27bb550fe Harmony among gurus 2010-11-03 21:18:31 -07:00
alena
52a8370102 bug 6955: return embedded object for PreparePrimaryStorageForMaintenance
status 6955: resolved fixed
2010-11-03 14:30:35 -07:00
edison
f3cc113525 bug 6933: send the snapshot related command to host on which vm created for kvm
status 6933: resolved fixed
2010-11-03 13:03:21 -07:00
abhishek
426e445811 bug 6904: during volume creation, we were NOT converting the size of the parent disk offering (which is in MB), to bytes. This is the size used to create the volume. I am adding the appropriate multipliers. Other flows like creating volume from snapshot etc should remain unaffected, as the parent volume created from the disk offering will be set right.
status 6904: resolved fixed
2010-11-03 11:13:06 -07:00
Alex Huang
560d7a275e Removed InternalErrorException. Renamed the lock methods on the DAO objects to be more understandable. 2010-11-02 12:25:08 -07:00
Alex Huang
3279c26796 Removed a bunch of InternalErrorException 2010-11-02 12:25:08 -07:00
Kris McQueen
8fafc892d3 bug 6730: if a volume was never attached to a VM, then the poolId will be null and this will be flagged as not on shared storage. Since the code was deleting detached volumes only on shared storage, the never-attached volume was in an undeletable state. Instead, allow deletion of any detached volume, regardless of storage pool until some technical reason limits this from happening.
Also, the UI was not allowing volumes to be deleted due to a bug in looking at the vmname property of the volume.  The 'if' conditional always returned true that the volume was attached to a VM to due a boolean logic error.

status 6730: resolved fixed
2010-10-26 14:56:44 -07:00
Jessica Wang
958aaaaf87 new UI - instance page - refactor submenu. 2010-10-22 20:23:05 -07:00
Kris McQueen
365ac7501f bug 6672: Fix up volume commands. For createVolume, the command is supposed to create a database object, but not assign it to a storage pool until the user first attaches it to a vm instance. That allows the volume to start off hypervisor agnostic. For attachVolume, detachVolume, and listVolumes, the responses had minor issues (sourceType could be null, for example) in either the response generation, or the response handling by the UI.
status 6672: resolved fixed
2010-10-21 15:15:01 -07:00
Alex Huang
d5d8f27cad Added more changes to the api 2010-10-21 15:11:49 -07:00
Alex Huang
794ca16a65 Added code to start domR 2010-10-19 11:52:01 -07:00
anthony
d41f7d78d9 DeleteStoragePool command fix
1. not delete SR in xenserver side, only delete it in database.
    2. remove a storagepool,  adding it back fails
2010-10-15 14:15:55 -07:00
Kris McQueen
8e086d7a21 resolving merge conflicts between 2.1.refactor and master 2010-10-12 16:28:16 -07:00
Kris McQueen
2740ba6c40 final merge of master->2.1.refactor preparing for merge back into master 2010-10-12 14:46:24 -07:00
Alex Huang
ce091de3d2 more changes for refactor 2010-10-12 07:17:47 -07:00
anthony
a93d36d81a should use _hostDao.listByCluster instead of _hostDao.listByPodId in some places 2010-10-08 18:10:15 -07:00
Alex Huang
9d1270b35f console proxy started completely and running 2010-10-06 17:22:35 -07:00
anthony
0cb11027e9 back port from 2.1.x 2010-10-06 15:18:23 -07:00
Kris McQueen
9c593352d0 Fixing events for async jobs so that there's a scheduled event recorded with appropriate type/description whenever the API framework schedules the async command to run. A few miscellaneous fixes as well uncovered during regression testing (router response was not parsed correctly by UI, etc.) 2010-10-05 20:26:18 -07:00
Alex Huang
00f8de2687 console proxy vm is now started 2010-10-04 17:59:06 -07:00
Alex Huang
5f88268ef2 console proxy vm is now started but it is not reading the disk correctly 2010-10-04 17:59:06 -07:00
edison
7615f569ff after rebase, fix bugs 2010-09-29 18:41:55 -07:00