Commit Graph

289 Commits

Author SHA1 Message Date
abhishek 10f319ecd7 bug 6800: introducing a vm error state and fixing a couple of bugs introduced by the new networking model and around vm destroy 2010-12-06 14:03:10 -08:00
abhishek 82196754c2 adding the check for error state whilst stopping a vm; if stop is called on a vm in error state, just return 2010-12-06 14:03:10 -08:00
abhishek ee42699865 on a vm destroy op for a vm in error state, transition to expunging state. also expunge all vms in the error state during the expunge process. 2010-12-06 14:03:10 -08:00
abhishek b4dd261fc2 introducing a new error state 2010-12-06 14:03:10 -08:00
alena 856914a0ab NetworkId is optional for deployVm when we deploy it in Basic zone 2010-12-06 13:25:36 -08:00
Alex Huang 16cccf4f59 ip address modifications. removed old deploy 2010-12-04 17:32:32 -08:00
Alex Huang 16caf1954b New ip address states and mode 2010-12-04 17:32:32 -08:00
Alex Huang daa9add158 removed router stuff from network manager 2010-12-04 17:32:31 -08:00
edison d17beeb348 move all the vm's state machine to itmgr->statetransitTO 2010-12-04 15:02:02 -08:00
alena 150d684e05 1) isShared attribute belongs to Network now, not NetworkOffering
2) Added list by networkId support to listVirtualMachines command.
3) Implemented search by zoneId in listNetworks command
2010-12-03 19:07:08 -08:00
Kelven Yang cc7dc5e6be Persist disk chain info when we detach a volume, check disk chain info when we attach a volume, this is required when snapshot operations are involved in vwmare 2010-12-03 18:59:23 -08:00
Alex Huang 96ac136b8c changed getAccountId to getEntityOwnerId 2010-12-03 11:59:45 -08:00
Alex Huang b859e103d8 ip nat rule forwarding done 2010-12-03 08:48:03 -08:00
Alex Huang 223688d0bf Port forwarding rules and load balancing rules rewrite 2010-12-03 08:48:02 -08:00
alena f8a687ab23 1) Implemented create/list/deleteNetworkOffering create/delete/listNetwork APIs.
2) Added networkIds parameter to deployVMCmd - accepts list of networks ids separated by coma.
3) Changed domainRouter/systemVm/userVm response to return list of Nics associated with the vm.
2010-12-02 19:30:17 -08:00
anthony d184c56ef3 cleanup snapshot code 2010-12-02 19:23:33 -08:00
nit b5f9ae0ef3 Merge branch 'master' of ssh://git.cloud.com/var/lib/git/cloudstack-oss 2010-11-30 23:48:13 +05:30
nit 2f946f6030 bug 7366 : Mark template as removed if create private template from volume fails due to being attached to a non-stopped VM. This allows subsequent creation of a template with the same name.
status 7366: resolved fixed
2010-11-30 23:47:04 +05:30
abhishek 1aee756184 bug 7345: During the expunge operation, we were not calling the deleteipforwardingrule method, for a rule which was static nat. Adding that logic. Also, making a change in the domr script as we do not need to execute a line on deletion of a rule
status 7345: resolved fixed
2010-11-30 10:07:10 -08:00
nit a6a774f6c0 bug 7369 : Resolving NPE while creating a private template from detached volume. The instance id is null when it is detached which was the culprit here.
status 7369: resolved fixed
2010-11-30 15:49:29 +05:30
anthony fb0675bbf4 bug 7365: return both physical and virutal size when creating private template
status 7365: resolved fixed
2010-11-29 18:58:48 -08:00
anthony d3325de5ae 1. limit xs-tools in xenserver related java file
2. don't populate xs-tools to template_host_ref
3. introduce a new template type PERHOST, which doesn't need to be populated to secondary storage
2010-11-29 18:21:08 -08:00
Kelven Yang 23f274cfd2 Send AttachVolume command even if VM is not in running state under vmware case 2010-11-24 15:17:09 -08:00
alena aa8aa6027a Modified UserContext - got rid of accountName, domainId fields as we can get this information from Account field. 2010-11-24 14:29:08 -08:00
nit 841044e360 Merge branch 'master' of ssh://git.cloud.com/var/lib/git/cloudstack-oss 2010-11-24 18:38:23 +05:30
nit 8ea124ae79 bug 7046 : extracting templates should allow for exclusion of some templates. An attribute "extractable" would be set on templates by the template owner at upload time. It would specify if we allow the template to be extracted from the system. Default would be true ie "allow extraction". If set to false, it would not be possible to extract the template or any derivatives of the template. For example, volumes, snapshots or templates from that template.
status 7046: resolved fixed
2010-11-24 18:37:54 +05:30
kishan f70071dc98 bug 6309: Added event VM.UPDATE along with changed fields
status 6309: resolved fixed
2010-11-24 18:36:35 +05:30
alena a646745516 bug 7227: applying Alex's fix - different way of desirializing List objects.
status 7227: resolved fixed
2010-11-22 14:08:43 -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
Alex Huang 5b4a6f27db Changed networkconfigurations to network as per Sheng's suggestion 2010-11-19 15:44:42 -08:00
Alex Huang a73e3dc9ac new networking can be set by use.new.networking 2010-11-17 17:51:17 -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
Alex Huang ed31497188 ComponentLocator changes 2010-11-16 04:28:15 -08:00
Alex Huang 17afeade00 better componentslocator 2010-11-16 04:28:14 -08:00
abhishek d5ab597fcf bug 6474,6475: porting over the expunge fixes for port forwarding rules to 2.2
status 6474,6475: resolved fixed
2010-11-15 17:33:05 -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
abhishek 7327906cdf the pool availability part is done by the sp allocators, hence commenting out the code in here. 2010-11-12 17:19:57 -08:00
anthony 2537dc3058 bug 7149: merge from 2.1.x 2010-11-12 13:16:03 -08:00
alena 3954c7550a bug 6914: return password in deployVirtualMachine/resetVmPassword response.
status 6914: resolved fixed
2010-11-09 11:18:54 -08:00
Alex Huang edf9ddd464 added reservation id to vnet 2010-11-08 12:29:38 -08:00
alena 1c24deda34 1) Refactored current Apis not to use reflection for method invocation. In new version following has to be done:
* Implement callCreate() and execute() methods in apis extending BaseAsyncCreateCmd (example - CreateVolumeCmd)
* Implement execute() method in apis extending BaseCmd and BaseAsyncCmd (example - deleteVolumeCmd and deleteUserCmd)

We no longer need createMethod(), method(), manager() fields in @Implementation annotation, cleanup has to be done.

2) Moved Account/User related methods to AccountManagerImpl. Methods are exposed via AccountService interface.
3) Enhanced exception handing for Api calls.
4) Created ConfigurationService interface, all Api config methods are exposed via it.
2010-11-08 11:27:36 -08:00
nit 70358ac153 bug 6367: registerISO, registerTemplate and createTemplate - can create non-ascii character names.
status 6367: resolved fixed
2010-11-08 20:55:02 +05:30
Alex Huang 4ccf4361d1 Finally domr and instance running again. 2010-11-05 16:10:22 -07:00
Alex Huang 5f90a8adb0 Checking in to do git pull...stupid git 2010-11-05 16:10:22 -07:00
Alex Huang 1fe446002b stop vm is now formalized 2010-11-05 16:10:22 -07:00
abhishek 038a8cd59a did not like the fact that the method was getting big; refactored my logic to a private method to increase readability 2010-11-05 14:29:52 -07:00
abhishek a99cfa58ef bug 7045: blocking the start vm cmds for both ssvms and user vms when the sp is NOT up
status 7045: resolved fixed
2010-11-05 14:24:54 -07:00
edison 5a173ad363 bug 6932: add create private template from volume command support for KVM
status 6932: resolved fixed
2010-11-04 11:00:29 -07:00
Alex Huang 9bb05d3ef8 harmony amongst joins 2010-11-03 21:18:31 -07:00
Alex Huang e27bb550fe Harmony among gurus 2010-11-03 21:18:31 -07:00
Kelven Yang d748010da3 Create Template from volume and snapshot for vmware 2010-11-03 19:18:54 -07:00
alena 4a645cdeb0 Return embedded Volume object for create/attach/detach Volume commands. 2010-11-03 13:07:06 -07:00
Alena Prokharchyk 694a8231ef Build responses in ApiResponseHelper for the deploy/start/stop/reboot/recover/listVm create/list snapshot/snapshotPolicies 2010-11-02 18:16:45 -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
Alex Huang 6311644e08 Successful creation of domr and uservm with all programming done correctly.....yahooo 2010-11-02 12:25:08 -07:00
Alex Huang 4db0b7d156 Better integration between it and virtual machine gurus 2010-11-01 15:01:28 -07:00
Chiradeep Vittal 76c7b54fc5 fix problems after merging in bug fixes from 2.1.x 2010-11-01 12:27:15 -07:00
Chiradeep Vittal 40f15106be when user vm migrates, update rules on destination host 2010-11-01 12:21:56 -07:00
root fe46ddfd63 bug 6806: changing the 'iso' to 'ISO' in all the error messages being thrown back from the API
status 6806: resolved fixed
2010-11-01 11:12:03 -07:00
Chiradeep Vittal 1e0eb04442 Add VPN apis, some systemvm changes for vpn 2010-11-01 10:27:49 -07:00
kishan 3a0f30a049 bug 6408: remove security groups/port forwarding service in virtual network case
status 6408: resolved fixed
2010-11-01 14:28:03 +05:30
edison f526a92b08 Only allow to attach a volume to a vm, when they are created by the same hypervisor. 2010-10-29 15:48:26 -07:00
Alex Huang 14f80f2e13 domain router up and running...now on to patching through the network between the domain router and the vm 2010-10-29 12:16:58 -07:00
kishan ad3c18a46c bug 6789: release router lock after commiting transaction
status 6789: resolved fixed
2010-10-29 16:22:19 +05:30
Kris McQueen 50a72d7f71 bug 6740: update the group for a VM if a group name is given
status 6740: resolved fixed
2010-10-28 16:27:07 -07:00
Alex Huang 2bc938c3f8 checkins for problems. 2010-10-26 09:35:24 -07:00
Alex Huang f58063911e deploy vm completed 2010-10-26 09:35:24 -07:00
nit 5774fd163d bug 6480: detachVolume API would start returning an embedded object, like attachVolume API does.
status 6480: resolved fixed
2010-10-25 17:19:22 +05:30
Jessica Wang 958aaaaf87 new UI - instance page - refactor submenu. 2010-10-22 20:23:05 -07:00
Alex Huang 88f446f9d4 checkin for windows 2010-10-22 09:21:47 -07:00
Alex Huang f1a431714c checkin to fix windows 2010-10-22 09:19:53 -07:00
Alex Huang 25e4ed6997 more changes in the api 2010-10-21 16:53:42 -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
abhishek 7c11c04427 reverting the change for bug 6361; this was an accidental push instead of commit 2010-10-19 15:21:01 -07:00
abhishek 523862f571 bug 6361: further name changes from network to security group 2010-10-19 14:35:17 -07:00
Kris McQueen 3be625ca6e The stopVirtualMachine API should return the vm instance rather than a boolean indicating success. The response for async jobs is now under the jobresult property of the JSON response, handle the start/stop virtual machine responses using data from the jobresult rather than expecting some embedded object. 2010-10-18 11:15:07 -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
Kris McQueen fbb5a109cc Fix return types for resetVmPassword and upgradeVirtualMachine commands. Fix response for resetVmPassword to be a vm rather than success/failure. Make sure the password is a transient variable for the resetVmPassword command so that the new password is returned to the user. 2010-10-06 18:29:27 -07:00
edison 7615f569ff after rebase, fix bugs 2010-09-29 18:41:55 -07:00
edison ad1ef80459 Now we have multiple routing template and buitin templates now, refactor template download code, that can handle it.
Basically, change the meaning of type field in template table: SYSTEM means sytem vm template, BUILIIN means buildin templates.
2010-09-29 18:41:55 -07:00
edison d478bb9d95 don't add the "untagged" 2010-09-29 18:41:54 -07:00
edison 6fc7528809 create data volume is splitted into two stage:
1. create a volume entry in the database,
2. when user attaching the volume to a VM, then actually create the volume on storage pool.
2010-09-29 18:41:54 -07:00
edison ea1efa95f6 send guestosdisplay to agent 2010-09-29 18:41:53 -07:00
edison 9e0f57bc0e change code for new UI 2010-09-29 18:40:52 -07:00
Kelven Yang 86d59bdddd Implement CreateVolume/AttachVolue for vmware 2010-09-29 18:40:51 -07:00
Kelven Yang 72e8b767fe Mount secondary storage as a datastore to implement ISO attachment 2010-09-29 18:40:50 -07:00
anthony bca96b1079 pass guest OS name instead of guest ID when start system VM 2010-09-29 17:18:27 -07:00
anthony 319d4f1aa0 snapshot redesign
1. use full snapshot and delta snapshot, there are maxsnashot/2 of delta snapshot between two full snapshot
2. only support one policy for one volume
3. remove all coleases in secondary storage.
2010-09-28 18:37:46 -07:00
Kris McQueen 848ce60097 Merging master into 2.1.refactor, resolve the merge conflicts as best I can. New commands related to extracting template/iso/volume and related to instance groups were refactored to the new API framework. 2010-09-28 15:47:14 -07:00
Alex Huang c443867f28 more changes 2010-09-27 15:14:38 -07:00
alena 49143dbe4a Remove user vm from instance_group when empty string is passed as value for "group" parameter in updateVirtualMachine API. 2010-09-27 14:24:08 -07:00
abhishek 6f92235365 some more modifications to the ip selection logic in direct attached case 2010-09-22 16:12:31 -07:00
abhishek 242a55f120 bug 6271: Fixed the issue of us not iterating over all vlans, in the direct attached case. now, we consider all vlan ranges before we error out saying no ip address available
status 6271: resolved fixed
2010-09-22 10:58:12 -07:00
Kris McQueen 8101ffb636 Fix logic in accountAndUserValidation to correctly detect child domains and throw an exception only when the domain is not in the hierarchy. 2010-09-21 18:24:18 -07:00
kishan 91d4715b4b Bug 5947: decrement resource count when deployVM fails for direct attached case 2010-09-17 18:19:10 +05:30
alena 012f097885 Merge branch 'master' of ssh://git.cloud.com/var/lib/git/cloudstack-oss
Conflicts:
	core/src/com/cloud/server/ManagementServer.java
	server/src/com/cloud/server/ManagementServerImpl.java
	server/src/com/cloud/vm/UserVmManagerImpl.java
2010-09-14 19:57:26 -07:00
alena b26ac321de bug 6177: Make VM group a first class object
1) Added new apis: createInstanceGroup, updateInstanceGroup, deleteInstanceGroup, listInstanceGroups
2) Group can be created using:
* createInsanceGroup api
* deployVirtualMachine/updateVirtualMachine commands (we create a group with name equal to "group" parameter value if the group doesn't exist already)
3) Group can be removed by:
* deleteInstanceGroup api
* when corresponding account is removed
4) Vm can be assigned to one group only. To move vm from one group to another, use updateVirtualMachine command with "group" parameter
5) Changed listVirtualMachines command to use "groupId" parameter instead of "group".

status 6177: resolved fixed
2010-09-14 19:08:01 -07:00
abhishek a178a9a675 import cleanup 2010-09-14 11:38:41 -07:00
abhishek 91813371b4 further comments added 2010-09-14 10:53:27 -07:00
abhishek edc85dd12d bug 6163: waiting on Alex to give me the go ahead for this bug, commenting out some of the code till then 2010-09-14 10:52:04 -07:00
abhishek ab166071f8 bug 6163: refactoring some more code 2010-09-14 10:05:05 -07:00
abhishek 743187a951 bug 6163: implementing the search function for zone wide searches for vlans 2010-09-14 10:05:05 -07:00
root 76e5cf3321 renamed dao methods to correctly reflect what they do 2010-09-09 18:01:50 -07:00
anthony 7f991f7e25 In hostAllocator, input clusterId instead of storagepool 2010-09-09 17:08:08 -07:00
anthony bce314b131 fixed a bug about snapshot 2010-09-09 15:11:34 -07:00
Alex Huang 7249f168d5 more file changes 2010-09-09 13:27:20 -07:00
alena b0aa28032c Refactored DeleteIPForwardingRule/UpdateIPForwardingRule commands to new api framework. 2010-09-08 19:03:42 -07:00
alena c0185e713a Refactored AttachVolume/PrepareForMaintenance/CancelMaintenance/PreparePrimaryStorageForMaintenance/CancelPrimaryStorageMaintenance commands. 2010-09-08 12:18:46 -07:00
alena 41000e61d3 Refactored copyIso/copyTemplate/attachIso/startRouter/stopRouter/rebootRouter commands 2010-09-07 18:53:04 -07:00
Kris McQueen 931706ad87 Refactor listPortForwardingRules to new API framework. Clean up imports. 2010-09-01 15:00:22 -07:00
abhishek 2bdaaa48a6 Refactored the destroy vm command 2010-08-26 13:37:57 -07:00
Kris McQueen defae59126 Finish refactoring createTemplate to new API framework. The executor and result object from old framework still need to be deleted, but this commit moves all the business logic to the manager with validation in the createPrivateTemplateRecord and creating a snapshot if necessary in createPrivateTemplate. Additionally, added a find method on the template dao to check if the template name is in use for the account (this is part of the validation). 2010-08-25 18:26:38 -07:00
Kris McQueen 97f3068687 Work in progress refactoring createTemplate command to new API. The logic had been partially moved to the manager, still need to finish up moving the logic, then delete the unnecessary code. 2010-08-25 18:26:38 -07:00
edison 3ab4651cf0 Issue #: 5978 5977 5971 5972
Status 5978: resolved fixed
Status 5977: resolved fixed
Status 5971: resolved fixed
Status 5972: resolved fixed
2010-08-25 15:27:34 -07:00
abhishek 82fbae2553 Refactoring the detach volume command 2010-08-25 13:53:43 -07:00
Alex Huang e0165dd2ef my changes 2010-08-23 13:59:23 -07:00
abhishek dc45e9b08b Refactoring the rebootvm cmd 2010-08-20 11:48:24 -07:00
abhishek 49482e947b Refactoring another bunch of commands for vms 2010-08-20 10:38:44 -07:00
abhishek 25d5126f68 Refactoring the resetVmPassword command 2010-08-19 10:12:38 -07:00
abhishek 6ca1ceb769 Refactoring the startvm cmd 2010-08-18 15:38:02 -07:00
abhishek 716271fca1 Merge branch '2.1.refactor' of ssh://git.cloud.com/var/lib/git/cloudstack-oss into 2.1.refactor 2010-08-18 14:05:45 -07:00
abhishek aa6e9ab2bb Refactoring the startvm command 2010-08-18 14:01:15 -07:00
Alex Huang b250b985ec changes 2010-08-18 12:19:22 -07:00
alena e2950eb5a1 Merge branch '2.1.refactor' of ssh://git.cloud.com/var/lib/git/cloudstack-oss into 2.1.refactor
Conflicts:
	server/src/com/cloud/api/BaseCmd.java
	server/src/com/cloud/network/security/NetworkGroupManagerImpl.java
2010-08-18 11:36:05 -07:00
alena 3d85fdf687 API refactor 2010-08-18 11:24:29 -07:00
abhishek 6f680375f3 Refactoring some more vm commands, as well as refactoring the account and user validation into a method. Please use the same for future validation calls 2010-08-17 11:28:23 -07:00
abhishek 7a937685b0 Adding the response object for UpgradeVmResponse 2010-08-17 10:54:01 -07:00
Alex Huang c21bc7072c more changes 2010-08-16 11:30:04 -07:00
Alex Huang 867b43dcf9 more changes for the rewrite. 2010-08-16 11:28:11 -07:00
abhishek b5a6d81ffe Forgot to check this part in, for the UpgradeVmCmd 2010-08-12 14:28:24 -07:00
Manuel Amador (Rudd-O) 14ae76781e Committing Kris' big merge 2010-08-11 16:02:57 -07:00
Manuel Amador (Rudd-O) ac730ec496 Branch 2.1.refactor committed 2010-08-11 09:13:42 -07:00
Manuel Amador (Rudd-O) 05c020e1f6 Source code committed 2010-08-11 09:13:29 -07:00