306 Commits

Author SHA1 Message Date
alena
f6a79c603f bug 11036: resource count update is refactored
status 11036: resolved fixed

1) Use row locks instead of global lock when update resource_count table. When update resource_count for account, make sure that we lock account+all related domains
2) Insert resource_count records for account/domain at the moment when account/domain is created.
3) As a part of DB upgrade, insert missing resource_count records for all non-removed accounts/domains

Conflicts:

	core/src/com/cloud/alert/AlertManager.java
	server/test/com/cloud/agent/MockAgentManagerImpl.java
2011-09-13 10:47:36 -07:00
Chiradeep Vittal
fae5e84699 if the xenserver host cannot do bridge firewalling do not attempt to retry the security rule updat
change some logs to debug level
2011-09-12 18:20:24 -07:00
Chiradeep Vittal
d03c5af720 make instance_id unique to allow usage of ON DUPLICATE KEY
useful logging

Reduce batch size to 16 to avoid sql errors

try using multi inserts to overcome deadlock during batch update
2011-09-12 18:20:23 -07:00
Chiradeep Vittal
e216686029 Revert "bug 10617: Intermediate checking"
revert pending review

This reverts commit 561b27565512d438db3d8896df6f97b644b0b498.
2011-09-12 14:45:58 -07:00
Naredula Janardhana Reddy
f9b0962ad9 bug 10617: Intermediate checking
Changes :
         - Fixing API doc +response name + errorMessage
         - Adding seperate events to Egress rules
         - Egress rules Using the same database table as that of ingress with new column type.

   Pending Tasks:
         - db upgrade
         - database table rename from security_ingress_rule to generic name, renaming some of the jave class from ingress to generic name.
         - Retesting on kvm
2011-09-09 18:14:19 +05:30
prachi
bd09e70509 Bug 11200 - maximum number of guests per host
Changes to schema file to insert default records in hypervisor_capabilities table.
2011-09-08 18:23:37 -07:00
Kelven Yang
f70958809b bug 11360: make user_vm_details generic to all VMs instead of user-only VMs, VM details info will be carried down to hypervisor resource 2011-09-07 15:42:40 -07:00
prachi
84868b7f9c Bug 11200 - maximum number of guests per host
Changes:
- Adding a new table 'hypervisor_capabilities' that will record capabilities for each hypervisor version. Added db schema changes for this.
- Currently a few capabilities have been added, namely, 'max_guests_limit' and 'security_group_enabled'
- Added a new column 'hypervisor_version' to host table. StartupRouting command now takes in this parameter. It should be set when a host connects.
- If a host's hypervisor version is not present, we find all the capabilities rows for that hypervisor type and use the first record.
- 'max_guests_limit' is the maximum number of running guest Vms that a host can have for the given hypervisor.
- Host Allocators use this limit and skip a host if the number of running VMs on that host exceeds this limit.
2011-09-07 14:53:05 -07:00
prachi
05440f0905 Bug 9921 - template tags
Changes:
- CreateTemplate and RegisterTemplate now support adding a template tag. It is a string value. This is root-admin only action - only admin can add template tags.
- ListTemplates will return the template tag in response.
- HostAllocator changed to use template tag along with the existing tag on service offering. If both tags are present, allocator now finds hosts satisfying both tags. If no hosts have both tags, allocation will fail.
- DB changes to add new column to vm_template table.
- DB upgrade changes for upgrade from 2.2.10 to 2.2.11
2011-08-25 12:03:59 -07:00
alena
8a7feb8ec1 Merge branch '2.2.y'
Conflicts:
	agent/src/com/cloud/agent/resource/computing/LibvirtComputingResource.java
	api/src/com/cloud/agent/api/routing/LoadBalancerConfigCommand.java
	api/src/com/cloud/agent/api/to/FirewallRuleTO.java
	api/src/com/cloud/agent/api/to/IpAddressTO.java
	api/src/com/cloud/agent/api/to/PortForwardingRuleTO.java
	api/src/com/cloud/api/ApiConstants.java
	api/src/com/cloud/api/BaseCmd.java
	api/src/com/cloud/api/ResponseGenerator.java
	api/src/com/cloud/api/commands/CreateFirewallRuleCmd.java
	api/src/com/cloud/api/commands/CreateIpForwardingRuleCmd.java
	api/src/com/cloud/api/commands/CreateLoadBalancerRuleCmd.java
	api/src/com/cloud/api/commands/CreatePortForwardingRuleCmd.java
	api/src/com/cloud/api/commands/DeleteLoadBalancerRuleCmd.java
	api/src/com/cloud/api/commands/ListCapabilitiesCmd.java
	api/src/com/cloud/api/commands/UpdateNetworkCmd.java
	api/src/com/cloud/api/response/CapabilitiesResponse.java
	api/src/com/cloud/network/Network.java
	api/src/com/cloud/network/NetworkService.java
	api/src/com/cloud/network/firewall/FirewallService.java
	api/src/com/cloud/network/lb/LoadBalancingRule.java
	api/src/com/cloud/network/lb/LoadBalancingRulesService.java
	api/src/com/cloud/network/rules/FirewallRule.java
	api/src/com/cloud/network/rules/RulesService.java
	api/src/com/cloud/offering/NetworkOffering.java
	client/tomcatconf/commands.properties.in
	cloud.spec
	core/src/com/cloud/agent/resource/virtualnetwork/VirtualRoutingResource.java
	core/src/com/cloud/hypervisor/xen/resource/CitrixHelper.java
	core/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
	core/src/com/cloud/storage/template/DownloadManagerImpl.java
	core/src/com/cloud/vm/DomainRouterVO.java
	debian/cloud-deps.install
	patches/systemvm/debian/config/etc/init.d/cloud-early-config
	patches/systemvm/debian/config/root/ipassoc.sh
	patches/systemvm/debian/config/root/loadbalancer.sh
	scripts/vm/hypervisor/kvm/rundomrpre.sh
	scripts/vm/hypervisor/xenserver/vmops
	server/src/com/cloud/agent/manager/AgentAttache.java
	server/src/com/cloud/agent/manager/AgentManagerImpl.java
	server/src/com/cloud/agent/manager/AgentMonitor.java
	server/src/com/cloud/agent/manager/ClusteredAgentManagerImpl.java
	server/src/com/cloud/alert/ClusterAlertAdapter.java
	server/src/com/cloud/api/ApiResponseHelper.java
	server/src/com/cloud/api/ApiServer.java
	server/src/com/cloud/cluster/ClusterManagerImpl.java
	server/src/com/cloud/configuration/Config.java
	server/src/com/cloud/configuration/ConfigurationManager.java
	server/src/com/cloud/configuration/ConfigurationManagerImpl.java
	server/src/com/cloud/configuration/DefaultComponentLibrary.java
	server/src/com/cloud/deploy/FirstFitPlanner.java
	server/src/com/cloud/ha/HighAvailabilityManagerImpl.java
	server/src/com/cloud/host/dao/HostDaoImpl.java
	server/src/com/cloud/hypervisor/xen/discoverer/XcpServerDiscoverer.java
	server/src/com/cloud/network/LoadBalancerVO.java
	server/src/com/cloud/network/NetworkManager.java
	server/src/com/cloud/network/NetworkManagerImpl.java
	server/src/com/cloud/network/dao/FirewallRulesDao.java
	server/src/com/cloud/network/dao/FirewallRulesDaoImpl.java
	server/src/com/cloud/network/element/DhcpElement.java
	server/src/com/cloud/network/element/VirtualRouterElement.java
	server/src/com/cloud/network/firewall/FirewallManagerImpl.java
	server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
	server/src/com/cloud/network/router/VirtualNetworkApplianceManager.java
	server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
	server/src/com/cloud/network/rules/FirewallManager.java
	server/src/com/cloud/network/rules/FirewallRuleVO.java
	server/src/com/cloud/network/rules/PortForwardingRuleVO.java
	server/src/com/cloud/network/rules/RulesManagerImpl.java
	server/src/com/cloud/network/rules/StaticNatRuleImpl.java
	server/src/com/cloud/network/security/SecurityGroupListener.java
	server/src/com/cloud/network/security/SecurityGroupManagerImpl.java
	server/src/com/cloud/offerings/NetworkOfferingVO.java
	server/src/com/cloud/server/ConfigurationServerImpl.java
	server/src/com/cloud/server/ManagementServerImpl.java
	server/src/com/cloud/storage/StorageManager.java
	server/src/com/cloud/storage/StorageManagerImpl.java
	server/src/com/cloud/storage/dao/VMTemplateHostDaoImpl.java
	server/src/com/cloud/storage/download/DownloadMonitorImpl.java
	server/src/com/cloud/upgrade/DatabaseUpgradeChecker.java
	server/src/com/cloud/upgrade/dao/Upgrade228to229.java
	server/src/com/cloud/upgrade/dao/Upgrade229to2210.java
	server/src/com/cloud/user/AccountManagerImpl.java
	server/src/com/cloud/vm/UserVmManagerImpl.java
	server/src/com/cloud/vm/VirtualMachineManagerImpl.java
	server/src/com/cloud/vm/dao/DomainRouterDao.java
	server/src/com/cloud/vm/dao/DomainRouterDaoImpl.java
	setup/db/create-index-fk.sql
	setup/db/create-schema.sql
	setup/db/db/schema-222to224.sql
	setup/db/db/schema-227to228.sql
	setup/db/db/schema-228to229.sql
	setup/db/db/schema-229to2210.sql
	tools/testClient/README
	ui/scripts/cloud.core.instance.js
	utils/src/com/cloud/utils/SerialVersionUID.java
	utils/src/com/cloud/utils/db/ConnectionConcierge.java
	utils/src/com/cloud/utils/db/Merovingian2.java
	utils/src/com/cloud/utils/db/Transaction.java
	utils/src/com/cloud/utils/nio/Link.java
	utils/src/com/cloud/utils/nio/NioConnection.java
	utils/src/com/cloud/utils/time/InaccurateClock.java
2011-08-22 20:28:30 -07:00
Naredula Janardhana Reddy
4369b0ba96 bug 1067:
- covered basic impelementation for xen, need to test corner cases.
      - Not implemneted: kvm, vmware , listing of egress rules.
2011-08-19 11:10:16 +05:30
alena
803255b0ba bug 11029: db upgrade from 2.2.9 to 2.2.10 includes firewall_rule upgrade now
status 11029: resolved fixed

Commit also includes the following:

* map firewall rule to pf/lb/staticNat/vpn when the firewall rule is created as a part of pf/lb/staticNat/vpn rule creation
* when delete firewall rules, also delete related firewall rule
2011-08-15 10:18:09 -07:00
alena
6b9603bc4c bug 10561: intermidiate checkin for FirewallRuleFeature
1) Added new apis: createFirewallRule, deleteFirewallRule, listFirewallRules
2) Modified existing apis - added boolean openFirewall parameter to createPortForwardingRule/createIpForwardingRule/createRemoteAccessVpn. If parameter is set to true, open firewall on the domR before creating an actual PF rule there
Modified backend calls appropriately.
3) Schema changes for firewall_rules table:
* startPort/endPort can be null now
* added icmp_type, icmp_code fields (can be not null only when protocol is icmp)
4) Added new manager - FirewallManagerImpl

Conflicts:

	api/src/com/cloud/api/BaseCmd.java
	client/tomcatconf/commands.properties.in
	server/src/com/cloud/api/ApiResponseHelper.java
	server/src/com/cloud/configuration/DefaultComponentLibrary.java
	server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
	server/src/com/cloud/network/rules/RulesManagerImpl.java
2011-08-09 15:51:56 -07:00
Chiradeep Vittal
924961d898 merge nectarine 2011-08-08 21:45:37 -07:00
alena
06d007337a bug 10561: intermidiate checkin for FirewallRuleFeature
1) Added new apis: createFirewallRule, deleteFirewallRule, listFirewallRules
2) Modified existing apis - added boolean openFirewall parameter to createPortForwardingRule/createIpForwardingRule/createRemoteAccessVpn. If parameter is set to true, open firewall on the domR before creating an actual PF rule there
Modified backend calls appropriately.
3) Schema changes for firewall_rules table:
* startPort/endPort can be null now
* added icmp_type, icmp_code fields (can be not null only when protocol is icmp)
4) Added new manager - FirewallManagerImpl
2011-08-08 20:59:40 -07:00
Chiradeep Vittal
8277584b8a merge ELB / nectarine branch 2011-08-08 15:20:56 -07:00
Chiradeep Vittal
a671a78da4 handle upgrade from 2.2.8 2011-08-04 23:13:21 -07:00
Nitin
a3cb6d9a09 bug 9345: Remove pool_id from template_host_ref. Its not needed anymore. Also removed the unwarranted code.
status 9345: resolved fixed
2011-08-04 12:51:35 +05:30
keshav
34a0c44f4f Added a new table for inline load balancer deployments, to store mappings between public IPs and NICs. 2011-08-03 16:10:20 -07:00
Alex Huang
f043f63eaa Merged changes from 2.2.8.zucchini 2011-08-02 15:33:48 -07:00
Alex Huang
f150f68128 sg improvements 2011-08-01 22:09:41 -07:00
alena
f73c2695a1 bug 10927: instance_id is foreign key, not index, in port_forwarding_rules table 2011-08-01 17:25:25 -07:00
alena
333e435fc5 bug 10927: added missing constraint to firewall_rules_cidr table 2011-08-01 15:52:44 -07:00
Chiradeep Vittal
fae6fa790c ELB VM: implement delete LB by deleting ELB vm
in the future we will manage a pool of vms more intelligently
2011-07-28 00:15:16 -07:00
Abhinandan Prateek
e5b7c89986 bug 10866: putting additional database guard so as to enforce uniqness of cidrs at db level 2011-07-28 10:58:10 +05:30
Abhinandan Prateek
8a8cfe1388 bug 10866: Putting additional unique indexs on firewall_rules_cidrs to prevent duplicate rules.
Although the code has been tested for duplicate cidrs, the additional table constraint will add a further safegaurd for this condition.
2011-07-28 10:45:24 +05:30
Alex Huang
6fea146903 more index. moved op_lock to memory table to try it 2011-07-27 14:06:40 -07:00
Chiradeep Vittal
b829cde18f track ip to vm mapping 2011-07-27 12:00:08 -07:00
Alex Huang
d54d7315da added more indexes 2011-07-25 10:04:17 -07:00
Alex Huang
b0fdb94f5c added more indexes 2011-07-25 10:03:34 -07:00
Alex Huang
5b39a1b620 added more indexes 2011-07-25 10:02:15 -07:00
Alex Huang
868373c280 more index changes 2011-07-23 13:23:10 -07:00
Alex Huang
f4bab3b4db more index changes 2011-07-23 13:11:35 -07:00
Alex Huang
20c8261832 more index changes 2011-07-23 13:07:47 -07:00
Alex Huang
da94f29881 missing indexes 2011-07-22 18:54:05 -07:00
Alex Huang
3385792081 missing indexes 2011-07-22 18:53:40 -07:00
Alex Huang
c3747878cf missing indexes 2011-07-22 18:52:59 -07:00
Alex Huang
ccce718783 added indexes for firewall rules and port forwarding rules 2011-07-22 16:49:42 -07:00
Alex Huang
91722351db propagate indexes 2011-07-22 14:49:52 -07:00
Alex Huang
c1f7bb57b0 propagate indexes 2011-07-22 14:49:08 -07:00
Alex Huang
e953ee7045 Added a bunch of indexes for different removed fields 2011-07-22 14:47:10 -07:00
Alex Huang
37c1401ad3 bug 10756: propagate to 2.2.8.z 2011-07-20 16:43:38 -07:00
anthony
bef3b480cd bug 10197:
The step to upgrade xenserver,

1. put cluster in Unmanaged state through UI , then MS will not talk to hosts in the cluster
2. upgrade xenserver according to XenServer upgrade guide.
3. put cluster in Managed state through UI, then MS will reconnect hosts

TODO,

1. UI
2. vm pool sync , leveraged from kelven's work
2011-07-19 15:44:37 -07:00
anthony
3881e13387 bug 10197:
The step to upgrade xenserver,

1. put cluster in Unmanaged state through UI , then MS will not talk to hosts in the cluster
2. upgrade xenserver according to XenServer upgrade guide.
3. put cluster in Managed state through UI, then MS will reconnect hosts

TODO,

1. UI
2. vm pool sync , leveraged from kelven's work
2011-07-19 15:26:25 -07:00
Alex Huang
c4a1a89388 bug 10756: Removed constraints for the op_host_capacity table. op_host_capacity table is a table that is frequently updated and is only used in the background. There's no real reason for it to maintain data integrity with other tables. This change may introduce problems where data center, cluster, or pod is deleted and there are capacities entries left. However, this really should be in the application logic to do this deletion rather than relying on the database schema. Be sure to test these cases and make sure there are no data left over. 2011-07-19 10:15:46 -07:00
Alex Huang
b92208c91c bug 10756: Removed constraints for the op_host_capacity table. op_host_capacity table is a table that is frequently updated and is only used in the background. There's no real reason for it to maintain data integrity with other tables. This change may introduce problems where data center, cluster, or pod is deleted and there are capacities entries left. However, this really should be in the application logic to do this deletion rather than relying on the database schema. Be sure to test these cases and make sure there are no data left over. 2011-07-19 10:15:14 -07:00
Sheng Yang
44d4113ae6 bug 10429: backport redundant router
Part 2

commit 797839360c65cd348d2eb20630521177ab0919de
    bug 9154: redundant virtual router

commit 8ff7f230204d4d3a7a4adee75523a9a84f4276fe
    bug 9154: Replace domain_router.is_master with domain_router.redundant_state in DB

commit 230b99e9e0b152648f1dd2a5eab6f22315b8e7b4
    bug 9154: Add redundant state to DomainRouterResponse

commit ccefb5ff5e83d713798a347c99bce1a0d04b4317
    bug 9154: Add router fault state report

commit 7a3090378f9785caecf741b70554f6ea17c41764
    bug 9154: Send alert if found two virtual routers in master state

commit 66831056e4bf27665871bccd24e6159071564847
    bug 9154: Code clean up

commit bf3f58a85741fa7118bd848a42d8b21baa4478d4
    bug 9154: Add isRedundantRouter to DomainRouterResponse
2011-07-18 18:30:02 -07:00
Sheng Yang
4bc8686513 bug 10429: Backport redundant virtual router
Part 1

This backport contained:

commit 52317c718c25111c2535657139b541db0c9d1e1f
    bug 9154: Initial check in for enabling redundant virtual router

commit 54199112055d754371bfb141168fb5538bf6d6ea
    Add host verification for CheckRouterCommand

commit cef978a228c90056ead9be10cbc4de74c2b8de76
    Fix CheckRouterAnswer's isMaster report

commit 4072f0a6991ac3b63601a1764fbe14188965f62f
    Some build fixes and code refactoring for redundant router

commit 4d3350b7cd8ee2706a9bace4437fc194e36c8dd5
    Redundant Router: Fix OVS

commit 6a228830e7c46d819fa0c3317e159e041337e887
    Fix findByNetwork()/findByNetworkAndPod()'s return

commit c627777b3d5bdbcd60db4032cebd349a5b1ecd83
    Redundant Router: Fix isVmAlive()

commit e1275d2514adc41f8744f5107d4069c38be195f1
    Only issue CheckRouterCommand to redundant routers

And all modification to the scripts till
commit 4e3942462ed3fde3a3d7011e95839e2128fba514
logging changes

in the master branch.
2011-07-18 18:29:56 -07:00
Nitin
149c8d4b03 bug 9596: Extract Template/ISO - make extractable = false by default. Make changes to cleanup the extract URL's for multiple sec. storage.
status 9596: resolved fixed
2011-07-18 10:28:59 -07:00
Nitin
b3957d525b bug 9596: Extract Template/ISO - make extractable = false by default. Make changes to cleanup the extract URL's for multiple sec. storage.
status 9596: resolved fixed
2011-07-18 12:10:51 +05:30