230 Commits

Author SHA1 Message Date
Abhinandan Prateek
5e4acc2a55 bug 12530: introduce initial full sync; cleanup syncronization; 2011-12-27 11:13:38 +05:30
frank
8ef2724c26 better log when deploy vm failed 2011-12-19 15:50:11 -08:00
Sheng Yang
5102279824 bug 12586: Remove the duplicate sync code of fullHostSync()
fullHostSync() is messed up.

The sync operation have been done twice, and for the second time, the original
info has already cleared, so default value "Stopped" is created, then result in
stop all the vms.

The fullHostSync() is skipped for Xen, so Xen don't have this issue.

status 12586: resolved fixed
2011-12-15 14:47:48 -08:00
Abhinandan Prateek
a703315d34 bug 12348: fixed getting VMs for a cluster which was not getting back VMs in starting state 2011-12-13 12:20:48 +05:30
Alena Prokharchyk
0980c47100 bug 12363: don't expunge nics when vm is expunged, just leave them in Removed state in the DB
status 12363: resolved fixed
2011-12-09 14:26:30 -08:00
Abhinandan Prateek
a560d6f055 bug 11910: no need to do full sync as first thing after connect 2011-11-29 11:23:21 +05:30
Alena Prokharchyk
586febd4c1 bug 11965: check the user state on the Services layer, not in the VmManager as VmManager can be called not only from the API, but also by internal methods - HA for instance - and in this case we shouldn't care about the account state
11965 status: resolved fixed

Also fixed gson serialization error in account response
2011-11-28 10:05:19 -08:00
Abhinandan Prateek
da20d33e27 bug 11910: full sync will only stop unknown VMs on agent 2011-11-23 16:48:12 +05:30
Alex Huang
84d5f0514e Changed network tags to network name as we no longer need to send the entire network tags down to the resource. 2011-11-18 14:28:16 -08:00
Abhi
9086a39bda bug 11910: avoid Starting to Running state changes during full sync, as the VM startup process does not like it 2011-11-17 14:32:56 +05:30
Abhinandan Prateek
b793ce6c33 bug 11987: changing virtualmachineimpl to reoccuring listener
reviewed-by: nitin
2011-11-11 19:24:09 +05:30
Alex Huang
d6c22c42fe Merge branch 'master' of ssh://git.cloud.com/var/lib/git/cloudstack-oss 2011-11-10 15:26:39 -08:00
Alex Huang
f6fcaa49ec Merge complete except for virtualnetworkappliancemanager 2011-11-10 15:18:16 -08:00
Abhinandan Prateek
a2499c9e69 bug 11910: during full sync ignoring VMs which have been into starting state shortly
reviewed-by: kishan
2011-11-10 12:00:10 +05:30
Abhinandan Prateek
fab2d1f880 bug 11678: added vm.destory.forcestop config var to set force when destroying a vm 2011-11-03 15:51:02 +05:30
alena
2250dff349 1) Removed tags from the network object
2) Get hypervisor tags from the physical network instead.
2011-11-01 17:42:06 -07:00
Abhinandan Prateek
3cb1426a6c bug 10588: sending cluster sync only for xen 2011-10-28 11:39:22 +05:30
alena
fe0b685e95 Security group is a service now 2011-10-27 16:49:20 -07:00
frank
21de281276 Fix broken compilation by new anget manager merge 2011-10-27 11:24:10 -07:00
frank
cef30956e9 Merge branch 'newagentmgr'
Conflicts:
	agent-simulator/src/com/cloud/api/commands/ConfigureSimulator.java
	ovm/src/com/cloud/ovm/hypervisor/OvmDiscoverer.java
	server/src/com/cloud/agent/manager/AgentManagerImpl.java
	server/src/com/cloud/capacity/CapacityManagerImpl.java
	server/src/com/cloud/network/F5BigIpManagerImpl.java
	server/src/com/cloud/network/JuniperSrxManagerImpl.java
	server/src/com/cloud/resource/ResourceManagerImpl.java
	server/src/com/cloud/server/ManagementServerImpl.java
	server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java
	server/src/com/cloud/vm/UserVmManagerImpl.java
	server/src/com/cloud/vm/VirtualMachineManagerImpl.java
	utils/src/com/cloud/utils/db/GenericDao.java
2011-10-27 11:09:56 -07:00
Abhinandan Prateek
a1a0fdc0a3 bug 10588: making sure the vms are synced during a delta also 2011-10-27 15:56:53 +05:30
Edison Su
193474a595 Storage migration: if it's basic network and migrate to different pod, need to reallocate network 2011-10-25 19:20:18 -07:00
Edison Su
92eaf49f29 Add storage migration 2011-10-24 15:59:47 -07:00
alena
219978a9be Create network using physical network id 2011-10-20 18:25:13 -07:00
Abhinandan Prateek
1ea9b5d703 bug 10588: putting config param for cluster sync intervals 2011-10-20 10:51:40 +05:30
Abhinandan Prateek
f7f2eb825d bug 10588: incorporated review comments (Reviewer Nitin, Murali, Kishan, Jana)
1. Finetune vriable scope, s_ for static vars
2. Impl should be cluster aware and a host going down should not affect the sync
2011-10-17 14:59:24 +05:30
Abhinandan Prateek
b050120303 bug 10588: clearing map so that the vm sync can resume on next connect, in case of failure 2011-10-12 12:34:54 +05:30
frank
0f5384d086 Bug 11522 - New agent manager
move findxxx interface from HostDao to Managers
2011-10-06 11:56:17 -07:00
prachi
a51fb221d6 Bug 11169 - Couldn't deploy a router because the host it existed on is in Maintenance.
Changes:
- VirtualMachineMgr puts the constraint that if Root volume is already READY, we provide the clusterId in the plan to the deploymentPlanner. Planner then searches for resources only under that cluster.
- If no deployment could be found, deploying VM fails.
- Fixed this, such that incase the root volume is recreatable, we call the planner again by removing the cluster constraint. Planner will then search for resources in other clusters.
- Works for system VMs(SSVM, consoleproxy, virual routers).
2011-10-05 18:35:59 -07:00
Abhinandan Prateek
83c6cf3db0 bug 10588: code to sync VM state at cluster level and dettached from ping command 2011-09-27 13:18:21 +05:30
alena
a1331d1cfc Intermidiate checkin to Project feature:
1) Introduce new managers - ProjectManager and DomainManager. Moved all domain related code from AccountManager to DomainManager.
2) Moved some code from ManagementServerImpl to the correct managers.
3) New resource limit for Domain - Project
2011-09-20 18:35:28 -07:00
prachi
0eea1cb733 Bug 11404 - VM was in Running state, had null for a pod_id, basically didnt allow creation of subsequent vm's
Reviewed-by: Alex

Changes:
- When management server starts, it goes through all the pending work items from op_it_work table and schedules HA work for each. It used to mark each item as done. Instead we should keep the item as pending and let it get marked as Done after the HA work is done.
- Changes in VirtualMachineMgr::advanceStop() :
a) if we find a VM with null hostId, we stop the VM only if it is forced stopped.
b) if VM state transition to Stopping fails,for state Starting and Migrating we try to find the pending work item and then do cleanup the VM. In case state is Stopping we can cleanup directly.
c) We proceed releasing all resources only if state transitioned to 'Stopping'.
- Changes in HA:
a) Depend on VirtualMachineMgr::advanceStop() in case host is not found to do VM cleanup
- When Vm state between mgmt server and agent syncs from starting -> running, mark any pending work item as done.

Conflicts:

	server/src/com/cloud/vm/VirtualMachineManagerImpl.java
2011-09-15 19:06:19 -07:00
prachi
6b82ba3ff9 Bug 11457 - NullPointerException while synching VM state from Starting -> Running between management server and agent
Reviewed-by: Kelven and Alex

Changes:
- Added log statements about the podId during deploying a VM.
2011-09-15 16:16:24 -07:00
prachi
df17ce5648 Bug 11457 - NullPointerException while synching VM state from Starting -> Running between management server and agent
reviewed-by: Alex/Kelven

Changes:
1.	UserVmManagerImpl :: finalizeStart()
Added null check for the cmds.getAnswers() object. Return ‘true’ if null.

2.	VirtualMachineManagerImpl :: advanceStart()
Move the line to set PodId to the vm being started above the state transition where hostId gets set, so that podId is not null in case management server goes down when vm starts on the agent. On restart, podId is not updated during fullsync. So this will prevent podId remaining null.

vm.setPodId(dest.getPod().getId());
2011-09-15 16:16:15 -07:00
Kelven Yang
7a64d8fda4 add VmwareInvestigator and VmwareFencer, use short worker VM name to avoid vCenter truncation 2011-09-14 15:15:26 -07:00
prachi
4ad9ac5e71 Bug 11200 - maximum number of guests per host
Changes:

To make sure migration does not attempt to pick a host that has running VMs more than the max guest VM's limit:

- Changed manual migration to call host allocators to return a list of hosts suitable for migration. Host allocators check for the max guest VM limit.
- Earlier we returned hosts with enough capacity but now Host Allocators make other checks along with capacity. So the list of hosts returned are hosts that have enough capacity AND satisfy all other conditions like host tags, max guests limit etc. Or in other words Allocators dont return the hosts that dont satisfy all conditions even if they have capacity.
-Therefore, now we mark the list of hosts returned for manual migration as 'suitable' hosts instead of 'hasenoughCapacity' in the HostResponse.
- HA migration already calls allocators, so no change is needed there.
2011-09-08 18:08:31 -07:00
Kelven Yang
ebfe43d15c bug 11263: only update host Id when VM is in running state when detected external VM migration 2011-08-26 16:28:58 -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
Edison Su
ea102aa045 add host guid in migrate command 2011-08-18 11:03:40 -07:00
frank
035001bd19 Fix baremetal planner reply to non-baremetal VM when migration 2011-08-18 10:14:40 -07:00
frank
523a32edaa Fix baremetal planner reply to non-baremetal VM when migration 2011-08-18 10:14:16 -07:00
Abhinandan Prateek
c2a769d993 fixed execptions while adding second host 2011-08-18 16:28:19 +05:30
Abhinandan Prateek
2df6e5cc69 fixed execptions while adding second host 2011-08-18 16:26:00 +05:30
Kelven Yang
a9c67d23fa bug 11099: Let VM sync to cooperate with migration process 2011-08-16 15:23:01 -07:00
Edison Su
ed7214c710 add host guid in migrate command 2011-08-16 10:30:52 -07:00
Kelven Yang
bbf20ac125 bug 11019: Let VM sync to coordinate with possible VM-relocation under VMware when VM is in starting time 2011-08-11 17:51:56 -07:00
Kelven Yang
9e1ee30ea3 bug 11019: Let VM sync to coordinate with possible VM-relocation under VMware when VM is in starting time 2011-08-11 14:28:39 -07:00
Alex Huang
6e7ad8830f bug 11043: Propagating fix 2011-08-11 10:30:03 -07:00
Alex Huang
1079a77024 bug 11043: rverted the bad fix 2011-08-11 10:27:02 -07:00
anthony
37dcec77bb Bug 10197:
implement pool-wise VM sync,
    For XenServer, VM fullSync is pool-wise now, VM deltaSync is still per host

Conflicts:

	server/src/com/cloud/vm/VirtualMachineManagerImpl.java
2011-08-02 17:31:36 -07:00