The locking code in implement/shutdown network code was not efficient. Even in order to check the current state of the network lock was getting acquired which is not required. This resulted in delays in deploy VM as can be seen from attached logs where the code waited on the lock just to check if network is implemented.
As part of the fix moved out code that is checking if the network is already implemented or shutdowned outside the lock.
For some scenarios like prepare nic, all network service providers are checked which is not efficient and also introduces unnecessary dependencies.
The check to use only the required providers is already there for implement, shutdown operation on network. Put the same check for all missing cases.
If you shut down the agent while VMs are running, the management
server assumes that the VMs are continuing to run. You can then
delete the host while it is in 'disconnected' state, and those VMs
will be unusable, forever in running state. They can't change state
because the host no longer exists. This patch checks for any VMs
that may have been tied to the removed host and resets their state
so that cloudstack can continue to manage them.
This reverts commit 94254e3c2bd38573adac22d0c66817db3cfa1873.
Conflicts:
server/src/com/cloud/configuration/ConfigurationManagerImpl.java
Regular user should be able to list the network offering with specifyVlan=true. He just can't use when create the network as he is unaware of the physical network topology. But as the admin can create the network on the user's behalf using this kind of offering, so the user should be able to see the offering's details
ASF 4.1 to 4.2 Upgrade: Missing Global Configuration parameters on the Upgraded Setup related to "storage.cache". Adding them
Signed off by : nitin mehta<nitin.mehta@citrix.com>
only when there is portable IP range added at region level.
region response will now have details if portable IP service is enabled
or not. Portable IP service for a region is turned off by default. when
adming adds a portable ip range portable ip service is enabled for the
region.
Updating the new system template URLs for the existing templates during upgrade to 4.2.
If new 4.2 system template is registered before upgrade then marking the old templates as removed during upgrade.
The time increased due to the newly added dedicated resources feature. During regular VM deployment, all dedicated resources are put in avoid list so that they are not considered for deployment.
Now the way to compute the list of dedicated resources is not optimal and performance deteriorates in an environment having lot of pods, clusters and hosts as the logic is to query db. for each suc resource.
The fix is to optimize the logic not to loop through all resources but get the list of each resource type in a single query.
Conflicts:
server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java
The findStoragePoolsForMigration and migrateVolume api were explicitly blocking moving
a volume if the instance to which it was attached was stopped. Updated the check for
the same.