640 Commits

Author SHA1 Message Date
alena
b9325a28dd bug 9579: allow domain name suffix update for existing networks.
Block update only in these cases:

* when DNS capability AllowDnsSuffixModification is false for the network
* when target network has running network elements (dhcps or domRs)
2011-06-09 16:10:24 -07:00
Edison Su
36fa0fbf52 bug 10177: fix multiple local secondary storage: when we starting vm, only choose the local secondary storage that related to the planned computing host
status 10177: resolved, fixed
2011-06-08 11:14:59 -04:00
Edison Su
00268632ac bug 10177: fix multiple local secondary storage: when we starting vm, only choose the local secondary storage that related to the planned computing host
status 10177: resolved, fixed
2011-06-07 20:22:16 -04:00
Alex Huang
65fc9bf847 bug 9651: added tags to network response for ui 2011-06-07 15:08:04 -07:00
Sheng Yang
62ac899091 bug 9154: Initial check in for enabling redundant virtual router
This patch enable redundant virtual routers.

1. To enable this feature, db need to be updated using follow SQL by now(we
would get a UI way later):

UPDATE network_offerings SET redundant_router=1 WHERE guest_type="Virtual" AND
system_only=0;

2. System would try to start up two routers at different hosts. But if there is
only one host in the zone, system would start up two routers on it.

3. The failover part is using keepalived, and connection tracking part is using
conntrackd. There would be one master router and one backup router. The status
of router(master or backup) can be query from the database table domain_router
now. Management server would update the status every 30s by default.

4. The routers for the same zone would use same external NIC(same ip and mac).
The script used for fail-over would ensure only one external NIC present in the
network at any time.

5. Currently management server don't got the ability to stop one of router is
both of them reported as master. The feature is in the todo list.

After two routers start up, disconnect anyone of them, the guest network
shouldn't be affected, and established connection(http, ssh, etc.) should still
works. The fail-over on gateway part should be 3~4 seconds.

Currently the patch works with KVM. Would deal with vmware and XenServer soon.
2011-06-07 14:47:45 -07:00
Alex Huang
d9e0bcfa1e bug 10126: Renamed getPodId() to getPodIdToDeployIn() 2011-06-03 22:17:08 -07:00
will
f9867a6475 Temp fix to encode username, account name, and email before they are returned from the API 2011-06-03 17:08:10 -07:00
nit
c0ce175227 bug 8184 : listSystemVms - return gateway which is equal to the Gateway of Nic belonging to Network with trafficType=Public for Advanced zone, and trafficType=Guest in Basic zone.
status 8184: resolved fixed
2011-06-02 18:04:58 +05:30
Edison Su
f7414b83aa fix listtempalte and listiso, if there are multiple secondary storage 2011-06-01 16:01:51 -04:00
Jessica Wang
8c4e831cfb bug 7553: cloudStack - server-side - make listRouters API return “serviceofferingname” and “serviceofferingid”. 2011-05-31 17:40:30 -07:00
nit
714ab83fa1 bug 9596 : Make the iso extractable by default.
status 9596: resolved fixed
2011-05-27 16:19:26 +05:30
anthony
7a266b9321 bug 10046: size in diskofferingVO is in type now
status 10046: resolved fixed
2011-05-26 13:51:08 -07:00
Abhinandan Prateek
5ad41e09ae bug 7553: Virtual Router service offering 2011-05-21 22:21:12 +05:30
alena
24e86c109e bug 9941: fixed listVolumes api - use leftouter join with vm_instance table because instance_id is NULL for detached volumes
status 9941: resolved fixed

Conflicts:

	server/src/com/cloud/api/ApiResponseHelper.java
	server/src/com/cloud/server/ManagementServerImpl.java
2011-05-19 18:49:12 -07:00
Abhinandan Prateek
770e317218 bug 7553: Virtual Router service offering 2011-05-19 19:18:33 +05:30
Murali Reddy
5769fde46b bug 7194:New API for adding range of public & private ports in port forwarding rule addition
adding support for port ranges in port forwarding rules.
2011-05-19 18:32:09 +05:30
alena
c2afcdec52 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 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.

Conflicts:

	api/src/com/cloud/api/commands/AuthorizeSecurityGroupIngressCmd.java
	api/src/com/cloud/api/commands/DeleteSecurityGroupCmd.java
	api/src/com/cloud/api/commands/DeployVMCmd.java
	server/src/com/cloud/api/ApiDBUtils.java
	server/src/com/cloud/vm/UserVmManagerImpl.java
2011-05-17 15:08:13 -07:00
nit
d91999533b bug 9397 : CreateTemplate - generate MD5 checksum of the template. The code will calculate the checksum after the template has been created in the secondary storage. This code would be executed by ssvm. This would be agnostic of the way the template was created (not hypervisor specific). 2011-05-10 12:26:00 +05:30
alena
2df6b0a6e1 bug 9774: display non-ready templates. Added "state" field to all snapshot* api responses. 2011-05-06 16:48:27 -07:00
Jessica Wang
48765a8ae9 bug 9534: CloudStack API - extend listServiceOfferings API to return limitCpuUse. 2011-05-04 15:27:07 -07:00
Chiradeep Vittal
303e2a7481 Start of zonesfeature / mycloud/cloudkit 2011-05-03 10:40:17 -07:00
Alex Huang
6ce656220f bug 9643: propagate fix from 2.2.4 2011-04-29 17:51:42 -07:00
alena
b7e4ec1749 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
2011-04-29 16:57:38 -07:00
prachi
b2b01bfcd2 Bug 8830 - Return parent template ID from templates created off of a snapshot
Changes:
- Added a new column `source_template_id` to vm_template table to carry the parent/source template ID from which the tempalte was created
- Added the column in db upgrade 224 to 225
- Changed code to save the source_template_id if there is one associated to the volume/ volume from which the snapshot was taken
- API response returns the sourcetemplateid field, if set, in all template usecases.
2011-04-29 15:40:59 -07:00
Alex Huang
99bc15f64a changed getName to getHostname 2011-04-29 08:34:10 -07:00
nit
f5cc308e77 bug 7140: Add MAC address in response list of LlistVirtualMachines API.
status 7140: resolved fixed
2011-04-29 18:41:46 +05:30
prachi
25fd7cd999 Merging changes from zonesfeature branch: Adding dhcp_provider parameter to UpdateZoneCmd 2011-04-28 23:28:14 -07:00
prachi
86b386e8c0 Merging changes from zonesfeature branch for Bug 8026 - discern proper cluster/pod/zone for added host (and refactor AgentManagerImpl)
- CreateZone API creates a zoneToken, inserts in DB and returns it in the
response

- UpdateZone API takes in 'details' map that is loaded to data_center_details
2011-04-28 23:08:58 -07:00
prachi
b84a7477f0 Bug 9539 - cpu.overprovisioning.factor does not work
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.
2011-04-22 18:09:31 -07:00
alena
41e5e38fef bug 9336: securityGroups can be used by other securityGroups in the same domain only; no cross domain SG authentication
status 9336: resolved fixed

Following changes were made:

* deleteSecurityGroup/authorizeSecurityGroupIngress - removed account/domainId parameters as SG is uniquely identified by id now
* removed account_name field from securityGroup DB table; removed allowed_security_group/allowed_sec_grp_acct from security_ingress_rule.
These values were used for api response generation only for performance purposes; added caching on API level to improve performance
* Added missing security checks for securityGroups/ingressRules
2011-04-22 11:35:29 -07:00
alena
1a6d78eae4 Code cleanup. No need to declare runtime exceptions (CloudRuntimeException, InvalidParameterException, PermissionDenied exceptions) 2011-04-21 16:26:53 -07:00
prachi
734e3f17c2 Bug 9331 - Even when there is no longer clusters in the pod, 'Delete Pod - Failed - because there are clusters in this pod'
Changes:
- Cluster entry is not removed from the table when a cluster is deleted because there are some foreign key constraints failing if the row delete is attempted. Instead the cluster is marked as 'removed'
- While deleting the pod changed the check to see if pod has any clusters - we now check that there are no clusters with removed column null.

- Also pod entry cannot be deleted from the db due to  foreign key constraints. So added 'removed' column to Pod table host_pod_ref
- Now on deleting a pod, the pod will be marked as removed and pod name is set to null.
2011-04-15 16:04:16 -07:00
Frank
92155522f2 Add license header to files 2011-04-14 11:23:14 -07:00
prachi
c3d2bab81b 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:17:23 -07:00
nit
debe236a8d bug 8710: CONTD....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-04-11 19:40:37 +05:30
prachi
77ac511225 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.
2011-04-08 15:01:12 -07:00
alena
0fdcba3f4f bug 8855: introduced search by zoneId to listLoadBalancerRules api. Also added "zoneId" parameter to the response
status 8855: resolved fixed
2011-04-05 14:38:47 -07:00
alena
eb696ab0ce bug 9195: don't return domR/SSVM/CPVM volumes in listVolumes api response
status 9195: resolved fixed
2011-03-30 16:33:45 -07:00
alena
eccef7022c bug 9192: don't query for securityGroups when Vm's zone is security group disabled.
status 9192: resolved fixed
2011-03-30 09:39:29 -07:00
alena
efd4cfa297 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:26:20 -07:00
alena
9f3f99f27f bug 9192: More improvements to listVm performance - cache dataCenter/serviceOffering/Network/Template/Iso information on Api level
status 9192: resolved fixed
2011-03-29 18:42:44 -07:00
alena
46a80a599a 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 18:42:44 -07:00
alena
f8a1278a80 Don't return rate_limit for the network offering when the limit value is NULL 2011-03-28 17:24:17 -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
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
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
b6ae35728e bug 8816: 1) return linkLocal instead of private ip/netmask/mac in listRouters 2) return linkLocal/private ip/netmask/mac in listSystemVms response 2011-03-09 16:47:46 -08:00
prachi
889827b63a Bug 7845 - Productize DeploymentPlanner
Bug 7723 - merge or re-write host tagging into master / 2.2
Bug 7627 - Need more logging for Allocators
Bug 8317 - Add better resource allocation failure messages

Changes for Deployment Planner to use host and storagePool allocators to find deployment destination.
Also has the changes for host tag feature.
Improved the logging for allocators.
2011-02-28 13:47:51 -08:00