Commit Graph

546 Commits

Author SHA1 Message Date
alena 1d27e541f9 Fixed security issue in api - regular user can operate only with his own resources (except for the template - when the template is public, it's available for everyone) 2011-05-24 18:41:22 -07:00
alena 550a4cda66 bug 9873: always add default security group to the SG list when deploy vm in 1) Basic zone 2) Advance zone using SG enabled network
status 9873: resolved fixed

Following fixes were made as a part of the checkin:

* When deploy user vm and default SG doesn't exist in the DB, create it automatically.
* SecurityGroup enabled use vm start: if map to default group is not present in security_group_vm_map table, create one.
* Added "name" (securityGroupName) parameter back to deleteSecurityGroup/authorizeSecurityGroupIngress/deployVm. Mutually exclusive with security group id parameter.
2011-05-17 14:23:18 -07:00
alena 9f65b08c7f bug 9898: fixed attachIso by domain admin - no need to make permission check when iso is public
status 9898: resolved fixed
2011-05-17 11:08:51 -07:00
alena 6011cb2fe4 bug 9782: hardcoded default page size to be 500 for listConfigurations
status 9782: resolved fixed
2011-05-09 09:31:04 -07:00
alena 2eeb03db42 bug 9774: display non-ready templates. Added "state" field to all snapshot* api responses. 2011-05-06 16:42:47 -07:00
alena 1ef546e588 bug 9564: 1) For all list commands set pageSize() to default.page.size if not specified 2) When pageSize is specified in the request, and it's more than default.page.size - throw an exception
status 9564: resolved fixed

Conflicts:

	server/src/com/cloud/api/ApiDBUtils.java
	server/src/com/cloud/api/ApiResponseHelper.java
	server/src/com/cloud/api/ApiServer.java
	server/src/com/cloud/server/ManagementServer.java
	server/src/com/cloud/server/ManagementServerImpl.java
2011-05-04 10:22:29 -07:00
alena 6502171f39 bug 9663: do account permission check against the volume when create snapshot
status 9663: resolved fixed
2011-05-03 11:33:35 -07:00
Alex Huang 204370fa8b bug 9643: connect pool is only for shared access 2011-04-29 11:05:56 -07:00
alena bd0259c59f bug 9621: set addressFormat during NicProfile creation
status 9621: resolved fixed
2011-04-27 23:25:41 -07:00
Alex Huang 2c64193646 storage stats can be such that it doesn't work if one storage pool cannot be reached. 2011-04-27 13:53:19 -07:00
Alex Huang f6258dae08 bug 9445: Signal alert for the host if a primary storage pool was unavailable on that host 2011-04-26 15:14:55 -07:00
alena bb0c0234bc bug 9578: when deploy dhcp in Basic zone, put pod information to deploymentPlan
status 9578: resolved fixed
2011-04-26 14:41:21 -07:00
prachi 5706041ef7 Manual merge of Bug 9539 - cpu.overprovisioning.factor does not work
Partial Changes:
- Changed host allocators/planner  to use cpu.overprovisioning.factor
- Removed following: while adding a new host, we were setting the total_cpu in op_host_capacity to be actual_cpu * cpu.overprovisioning.factor. Now we set it to actual_cpu.
- ListCapacities response now calculates the total CPU as actual * cpu.overprovisioning.factor (This change does not add anything new - listCapacities was pulling total CPU from op_host_capacity DB earlier which had the cpu.overprovisioning.factor applied already. Now we need to apply it over the DB entry.)
- HostResponse has a new field: 'cpuWithOverprovisioning' that returns the cpu after applying the cpu.overprovisioning.factor

- Db Upgrade 222 to 224 now updates the total_cpu in op_host_capacity to be the actual_cpu for each Routing host.

Conflicts:

	server/src/com/cloud/agent/manager/AgentManagerImpl.java
	server/src/com/cloud/api/ApiDBUtils.java
	server/src/com/cloud/api/ApiResponseHelper.java
	server/src/com/cloud/deploy/BareMetalPlanner.java
	server/src/com/cloud/server/ManagementServerImpl.java
2011-04-22 18:54:16 -07:00
prachi 5a73309e75 Bug 9387: Recreate system vms if template id changed....
Changes:
While starting a System VM:
- We check, incase the ROOT volume is READY, if the templateID of the volume matches the SystemVM's template.
- If it does not match, we update the volumes' templateId and ask deployment planner to reassign a pool to this volume even if it is READY.

In general:
- If a root volume is READY, we remove its entry from the deploydestination before calling storagemanager :: prepare()
- StorageManager creates a volume if a pool is assigned to it in deploydestination passed to it.
- If a volume has no pool assigned to it in deploydestination, it means the volume is ready and has a pool already allocated to it.
2011-04-13 13:54:08 -07:00
alena 2f73274811 Changed description for Destroyed volume state. 2011-04-13 13:00:41 -07:00
alena 5de4f05a1c bug 9391: removed source_id, source_type from "volumes" table as we don't use them any more
status 9391: resolved fixed
2011-04-11 17:33:38 -07:00
alena 90f79a8211 bug 9398: removed resource_type from volumes table as we no longer use it. Corresponding db upgrade scripts are updated
status 9398: resolved fixed
2011-04-11 15:25:34 -07:00
prachi 04b9f7c7a5 Some more changes for Bug 8932 - add md5 sum to list templates call:
Also changed 'RegisterTemplate' to take in a new optional parameter 'checksum'.
The value set to it is stored as-is in the DB in vm_template table, 'checksum' column.
2011-04-11 13:30:35 -07:00
prachi 65d589da73 Bug 8932 - add md5 sum to list templates call
Modified TemplateResponse to contain a new field 'checksum' of the template. The value is pulled from the vm_template table, 'checksum' column.

Conflicts:

	server/src/com/cloud/api/ApiResponseHelper.java
2011-04-08 15:20:47 -07:00
prachi 5fbf83c24f Bug 9045: No 'Starting job for VM.MIGRATE' & 'Successfully completed VM.MIGRATE' events shown for VM manual migration
Changes:
- Added the required 'ActionEvent' annotation to the API, so that the events get added.
2011-04-05 16:36:00 -07:00
prachi 204aa86686 Bug 9043 - VM manual migration - when destination host is out of memory for migration, VMs being migrated remained in 'migrating' state
Changes:
- When migration fails we try to do cleanup on the destination host agent. The AgentUnavailableException in this cleanup was not caught.
-Due to that other cleanup like reverting capacity allocated and vm state were skipped.
-Fix is to catch the AgentUnavailableException so that rest of the cleanup can happen.
- Also corrected the exceptions in various cases of migration failure.
- In case the VM is still starting, HA should schedule a retry. Introduced a special migration exception for handling this.
2011-04-04 17:39:27 -07:00
alena 6d7f3da46a For VirtualRouter apply networkThrottling rate of the GuestNetworkOffering to both Guest and Public networks. 2011-03-30 14:53:04 -07:00
Alex Huang bf13d2cbec added missing changes from schema changes previously 2011-03-30 13:23:56 -07:00
alena aab78874c7 bug 9201: listNetworkOfferings - return -1 when network_rate is Unlimited; if value is NULL - return global configuration value
status 9201: resolved fixed
2011-03-29 19:21:25 -07:00
alena f04f2ab10c bug 9192: More improvements to listVm performance - cache dataCenter/serviceOffering/Network/Template/Iso information on Api level
status 9192: resolved fixed
2011-03-29 19:18:30 -07:00
alena 2af46789cb bug 9192: multiple improvementes to listVms command.
1) No longer do multiple searches involving "domain" table; only one join with domain is being done.
2) Do join with domain table only when command is executed by domainAdmin
3) Added index for "path" field in "domain" table
4) No longer do joins with account table as account_id is already present in vm_instance table.
2011-03-29 19:18:30 -07:00
anthony 0ed810824c bug 9189:
add new command
2011-03-29 10:55:24 -07:00
alena 7436654f4f Use correct response type for the user response in list/create/update/enable/disableAccount commands. 2011-03-28 18:28:09 -07:00
alena 65a083b1db bug 8831: no need for "isdedicatedtodomain" and "dedicateddomainid" parameters. If 1) network is private, return account/domainId 2)If network is shared for specific domain, return domainId only 3) If network is shared in zone, don't return account/domainId
status 8831: resolved fixed
2011-03-28 16:54:09 -07:00
alena d3357c6691 Set network limit to be 0 by default for Control/Management/Storage/Public networks (these networks are used by SSVM/ConsoleProxy/domR) 2011-03-28 15:48:11 -07:00
alena cc79f75197 createIpForwardingRule - revoke the rule when it fails to apply on the backend - the way it's done for portForwarding rules 2011-03-28 12:27:00 -07:00
alena 8c61e10c08 bug 9158: introduced new parameter "storageId" to listVirtualMachines api.
status 9158: resolved fixed

1) Works for admins only
2) When specified, list only vms that have volumes on this storage
2011-03-25 18:26:59 -07:00
nit ded1184548 bug 8710: Introducing a new user role in cloudstack called RESOURCE_DOMAIN_ADMIN. The role would have all the domain_admin rights and the rights to list zone,pods,clusters and so on. More info in the bug 2011-03-25 18:04:09 -07:00
alena bb895a7b75 bug 8103: don't allow to remove host if it has Running/Stopping/Starting vms
status 8103: resolved fixed
2011-03-25 17:29:54 -07:00
alena 1932652125 bug 5912: Added events and logging for securityGroup create/delete
status 5912: resolved fixed
2011-03-25 15:23:18 -07:00
Alex Huang 9d158dc060 Removed the async create status for volume now that our customers don't use it 2011-03-24 20:04:23 -07:00
prachi 923f562aa8 Bug 6873: disable/enable mode for clusters (and pods and zones and hosts)
- Added a new flag 'allocation_state' to zone,pod,cluster and host
- The possible values for this flag are 'Enabled' or 'Disabled'
- When a new zone,pod,cluster or host is added, allocation_state is 'Disabled' by default.
- For existing zone,pod,cluster or host, the state is 'Enabled'.
- All Add/Update/List  commands for each of zone,pod,cluster or host can now take a new parameter 'allocationstate'
- If 'allocation_state' is 'Disabled', Allocators skip that zone or pod or cluster or pod.
- For a root admin, ListZones lists all zones including the 'Disabled' zones. But for any other user, the 'Disabled' zones are not included in the response.
- For any usecase that creates/deploys/adds/registers a resource and takes in zone as parameter, now we check if the Zone is 'Disabled'. If yes then the operation cannot be performed by a user other than root-admin. Add volume, snapshot, templates are examples of this usecase.
- To enable the root admin to test a particular pod/cluster/host, deployVM command takes in 'host_id' parameter that can be passed in only by root admin.
If this parameter is passed in by the admin, allocators do not search for hosts and use that host only. StoragePools are searched in the cluster of that host.
If VM cannot be deployed to that host, allocators and deployVM fails without retrying
2011-03-23 22:15:35 -07:00
Kelven Yang 1c9196f9af add vncPassword on hypervisor back 2011-03-23 16:18:22 -07:00
alena 8de3bacd2b bug 9026: added ability to turn off apiCommand/commandParameter for docGeneration
status 9026: resolved fixed

1) Don't expose following commands in doc:

* registerSSHKeyPair
* createSSHKeyPair
* deleteSSHKeyPair
* listSSHKeyPairs

2) Don't show "sshKeyPairName" parameter for deployVm command
2011-03-23 12:56:58 -07:00
alena 7dce8412e4 Fixed API xml doc generation 2011-03-23 12:12:29 -07:00
alena f95d845360 bug 9053: modified updateUser api (mentioned that api and secret keys must be specified together. 2011-03-23 12:12:29 -07:00
alena f84c81a47d bug 8533: all IP Address fields in DB have char(40) type
status 8533: resolved fixed
2011-03-22 14:06:14 -07:00
alena 718386a2b6 bug 8862: added updateNetwork api command. Can update name/displayText only 2011-03-22 11:26:56 -07:00
alena e9a10c53dc bug 8831: added 2 new parameters to create/listNetworks api: "isdedicatedtodomain" and "dedicateddomainid" 2011-03-22 10:17:08 -07:00
alena 7c1a6e4884 bug 8831: API/Management server part is done for "Dedicate Network to domain". UI part is left 2011-03-21 18:17:59 -07:00
alena a27c4881ea bug 7424: 0 value for network.throttling.rate global config param indicates that network throttling is disabled
status 7424: resolved fixed
2011-03-18 15:23:03 -07:00
Kelven Yang 65d4cc98be Allow template re-deployment once template is deleted from hypervisor and CloudStack still holds out-dated status 2011-03-17 17:59:51 -07:00
Chiradeep Vittal 8d791777db Introduce zone (datacenter) details 2011-03-15 15:44:36 -07:00
alena d2f92f1c76 bug 8973: Create Virtual Guest network as a part of deployVm if corresponding networkOffering has availability=Required and no networkIds are specified
status 8973: resolved fixed
2011-03-15 15:06:52 -07:00
alena d3f04b2b38 bug 8945: introduced "default.page.limit" config param (default value is 500). Used for pagination in API list* commands.
status 8945: resolved fixed
2011-03-15 15:06:52 -07:00