cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject [35/36] git commit: updated refs/heads/master to cd7218e
Date Sat, 29 Aug 2015 20:06:32 GMT
Solved jira ticket: CLOUDSTACK-8750

Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/3818257a
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/3818257a
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/3818257a

Branch: refs/heads/master
Commit: 3818257a6809facbc9acca43a84482fff3307f69
Parents: f5a7395
Author: Rafael Weingartner <rafaelweingartner@gmail.com>
Authored: Fri Aug 28 22:35:08 2015 -0300
Committer: Rafael Weingartner <rafaelweingartner@gmail.com>
Committed: Fri Aug 28 22:35:08 2015 -0300

----------------------------------------------------------------------
 .../cloud/storage/template/IsoProcessor.java    |   6 +-
 .../cloud/storage/template/OVAProcessor.java    |  24 +-
 .../cloud/storage/template/QCOW2Processor.java  |   8 +-
 .../storage/template/RawImageProcessor.java     |   8 +-
 .../cloud/storage/template/TARProcessor.java    |   6 +-
 .../cloud/storage/template/VhdProcessor.java    |   8 +-
 .../cloud/storage/template/VmdkProcessor.java   |  20 +-
 .../cloud/agent/manager/AgentManagerImpl.java   | 245 ++++----
 .../manager/ClusteredAgentManagerImpl.java      | 331 ++++++-----
 .../ClusterBasedAgentLoadBalancerPlanner.java   |  16 +-
 .../com/cloud/vm/VirtualMachineManagerImpl.java | 576 +++++++++----------
 .../src/com/cloud/vm/VmWorkJobDispatcher.java   |  22 +-
 .../com/cloud/vm/VmWorkJobWakeupDispatcher.java |  14 +-
 .../entity/api/db/dao/EngineClusterDaoImpl.java |   6 +-
 .../orchestration/NetworkOrchestrator.java      | 352 ++++++------
 .../orchestration/VolumeOrchestrator.java       | 154 +++--
 .../com/cloud/capacity/dao/CapacityDaoImpl.java |   8 +-
 .../certificate/dao/CertificateDaoImpl.java     |   4 +-
 .../agentlb/dao/HostTransferMapDaoImpl.java     |   2 -
 .../src/com/cloud/dc/dao/DataCenterDaoImpl.java |   4 +-
 .../dc/dao/DataCenterIpAddressDaoImpl.java      |  14 +-
 .../DataCenterLinkLocalIpAddressDaoImpl.java    |   6 +-
 .../src/com/cloud/dc/dao/HostPodDaoImpl.java    |   4 +-
 .../src/com/cloud/domain/dao/DomainDaoImpl.java |  20 +-
 .../src/com/cloud/event/dao/EventDaoImpl.java   |   2 -
 .../com/cloud/event/dao/UsageEventDaoImpl.java  |  20 +-
 .../event/dao/UsageEventDetailsDaoImpl.java     |   2 -
 .../com/cloud/gpu/dao/HostGpuGroupsDaoImpl.java |   2 -
 .../src/com/cloud/gpu/dao/VGPUTypesDaoImpl.java |   2 -
 .../src/com/cloud/host/dao/HostDaoImpl.java     |  64 +--
 .../dao/HypervisorCapabilitiesDaoImpl.java      |   2 -
 .../network/dao/FirewallRulesCidrsDaoImpl.java  |   2 -
 .../com/cloud/network/dao/IPAddressDaoImpl.java |   4 +-
 .../cloud/network/dao/PortProfileDaoImpl.java   |   2 -
 .../network/dao/RemoteAccessVpnDaoImpl.java     |   2 -
 .../dao/Site2SiteVpnConnectionDaoImpl.java      |   2 -
 .../network/dao/Site2SiteVpnGatewayDaoImpl.java |   2 -
 .../network/dao/UserIpv6AddressDaoImpl.java     |   2 -
 .../security/dao/VmRulesetLogDaoImpl.java       |  26 +-
 .../vpc/dao/NetworkACLItemCidrsDaoImpl.java     |   2 -
 .../network/vpc/dao/NetworkACLItemDaoImpl.java  |   2 -
 .../cloud/network/vpc/dao/PrivateIpDaoImpl.java |   6 +-
 .../projects/dao/ProjectAccountDaoImpl.java     |   4 +-
 .../com/cloud/projects/dao/ProjectDaoImpl.java  |   4 +-
 .../projects/dao/ProjectInvitationDaoImpl.java  |   8 +-
 .../storage/dao/LaunchPermissionDaoImpl.java    |   6 +-
 .../com/cloud/storage/dao/SnapshotDaoImpl.java  |  10 +-
 .../storage/dao/StoragePoolHostDaoImpl.java     |   8 +-
 .../com/cloud/storage/dao/UploadDaoImpl.java    |   2 -
 .../cloud/storage/dao/VMTemplateDaoImpl.java    |  24 +-
 .../storage/dao/VMTemplateHostDaoImpl.java      |  14 +-
 .../storage/dao/VMTemplatePoolDaoImpl.java      |  16 +-
 .../storage/dao/VMTemplateZoneDaoImpl.java      |   2 -
 .../com/cloud/storage/dao/VolumeDaoImpl.java    |  10 +-
 .../cloud/storage/dao/VolumeHostDaoImpl.java    |   6 +-
 .../cloud/upgrade/DatabaseIntegrityChecker.java |  42 +-
 .../com/cloud/upgrade/dao/VersionDaoImpl.java   |  14 +-
 .../src/com/cloud/usage/dao/UsageDaoImpl.java   |  28 +-
 .../cloud/usage/dao/UsageIPAddressDaoImpl.java  |   6 +-
 .../com/cloud/usage/dao/UsageJobDaoImpl.java    |   6 +-
 .../dao/UsageLoadBalancerPolicyDaoImpl.java     |   8 +-
 .../cloud/usage/dao/UsageNetworkDaoImpl.java    |   8 +-
 .../usage/dao/UsageNetworkOfferingDaoImpl.java  |   6 +-
 .../dao/UsagePortForwardingRuleDaoImpl.java     |   8 +-
 .../usage/dao/UsageSecurityGroupDaoImpl.java    |   6 +-
 .../cloud/usage/dao/UsageStorageDaoImpl.java    |   8 +-
 .../cloud/usage/dao/UsageVMInstanceDaoImpl.java |   8 +-
 .../cloud/usage/dao/UsageVMSnapshotDaoImpl.java |   8 +-
 .../cloud/usage/dao/UsageVPNUserDaoImpl.java    |   6 +-
 .../com/cloud/usage/dao/UsageVmDiskDaoImpl.java |   8 +-
 .../com/cloud/usage/dao/UsageVolumeDaoImpl.java |   8 +-
 .../src/com/cloud/user/dao/AccountDaoImpl.java  |   8 +-
 .../cloud/user/dao/UserStatisticsDaoImpl.java   |   6 +-
 .../cloud/user/dao/VmDiskStatisticsDaoImpl.java |   6 +-
 .../com/cloud/vm/dao/ConsoleProxyDaoImpl.java   |  14 +-
 .../cloud/vm/dao/UserVmCloneSettingDaoImpl.java |   2 -
 .../src/com/cloud/vm/dao/UserVmDaoImpl.java     |  22 +-
 .../src/com/cloud/vm/dao/VMInstanceDaoImpl.java |  14 +-
 .../vm/snapshot/dao/VMSnapshotDaoImpl.java      |   6 +-
 .../entity/api/db/dao/VMEntityDaoImpl.java      |   2 -
 .../cloudstack/region/dao/RegionDaoImpl.java    |   2 -
 .../test/DirectAgentManagerSimpleImpl.java      |   2 -
 .../vmsnapshot/DefaultVMSnapshotStrategy.java   |  26 +-
 .../allocator/AbstractStoragePoolAllocator.java |  30 +-
 .../GarbageCollectingStoragePoolAllocator.java  |   6 +-
 .../allocator/LocalStoragePoolAllocator.java    |  14 +-
 .../allocator/ZoneWideStoragePoolAllocator.java |  12 +-
 .../provider/DataStoreProviderManagerImpl.java  |  10 +-
 .../storage/db/ObjectInDataStoreDaoImpl.java    |   6 +-
 .../image/db/SnapshotDataStoreDaoImpl.java      |  20 +-
 .../image/db/TemplateDataStoreDaoImpl.java      |  18 +-
 .../image/db/VolumeDataStoreDaoImpl.java        |  14 +-
 .../db/TemplatePrimaryDataStoreDaoImpl.java     |   6 +-
 .../cloud/cluster/ClusterFenceManagerImpl.java  |   4 +-
 .../com/cloud/cluster/ClusterManagerImpl.java   | 196 ++++---
 .../cluster/ClusterServiceServletAdapter.java   |  10 +-
 .../dao/ManagementServerHostDaoImpl.java        |  14 +-
 .../dao/ManagementServerHostPeerDaoImpl.java    |   4 +-
 .../config/dao/ConfigurationDaoImpl.java        |   8 +-
 .../src/com/cloud/utils/db/GenericDaoBase.java  |  38 +-
 .../framework/jobs/dao/AsyncJobDaoImpl.java     |   8 +-
 .../jobs/dao/AsyncJobJoinMapDaoImpl.java        |   4 +-
 .../framework/jobs/dao/SyncQueueDaoImpl.java    |   6 +-
 .../jobs/dao/SyncQueueItemDaoImpl.java          |   6 +-
 .../framework/jobs/dao/VmWorkJobDaoImpl.java    |  14 +-
 .../jobs/impl/AsyncJobManagerImpl.java          | 146 +++--
 .../framework/jobs/impl/AsyncJobMonitor.java    |  10 +-
 .../jobs/impl/SyncQueueManagerImpl.java         |  32 +-
 .../framework/jobs/AsyncJobTestDispatcher.java  |   7 +-
 .../security/keystore/KeystoreManagerImpl.java  |  18 +-
 .../spring/lifecycle/registry/DumpRegistry.java |   9 +-
 .../acl/StaticRoleBasedAPIAccessChecker.java    |   4 +-
 .../affinity/ExplicitDedicationProcessor.java   |  22 +-
 .../affinity/HostAntiAffinityProcessor.java     |  18 +-
 .../discovery/ApiDiscoveryServiceImpl.java      |  12 +-
 .../ratelimit/ApiRateLimitServiceImpl.java      |   8 +-
 .../cloud/deploy/ImplicitDedicationPlanner.java |  12 +-
 .../deploy/UserConcentratedPodPlanner.java      |  22 +-
 .../com/cloud/deploy/UserDispersingPlanner.java |  38 +-
 .../mom/inmemory/InMemoryEventBus.java          |   2 -
 .../cloudstack/mom/kafka/KafkaEventBus.java     |   2 -
 .../mom/rabbitmq/RabbitMQEventBus.java          |  24 +-
 .../src/com/cloud/netapp/NetappManagerImpl.java | 112 ++--
 .../src/com/cloud/netapp/dao/LunDaoImpl.java    |   2 -
 .../src/com/cloud/netapp/dao/PoolDaoImpl.java   |   2 -
 .../src/com/cloud/netapp/dao/VolumeDaoImpl.java |   2 -
 .../com/cloud/deploy/SkipHeuresticsPlanner.java |   6 +-
 .../manager/allocator/impl/RandomAllocator.java |  30 +-
 .../baremetal/manager/BareMetalDiscoverer.java  |  20 +-
 .../cloud/baremetal/manager/BareMetalGuru.java  |   2 -
 .../baremetal/manager/BareMetalPlanner.java     |  12 +-
 .../manager/BareMetalTemplateAdapter.java       |  12 +-
 .../baremetal/manager/BaremetalManagerImpl.java |  10 +-
 .../BareMetalPingServiceImpl.java               |  14 +-
 .../networkservice/BareMetalResourceBase.java   |  52 +-
 .../networkservice/BaremetaNetworkGuru.java     |   6 +-
 .../networkservice/BaremetalDhcpElement.java    |   4 +-
 .../BaremetalDhcpManagerImpl.java               |  12 +-
 .../BaremetalDhcpResourceBase.java              |   4 +-
 .../networkservice/BaremetalDhcpdResource.java  |   8 +-
 .../BaremetalDnsmasqResource.java               |   8 +-
 .../BaremetalKickStartPxeResource.java          |  16 +-
 .../BaremetalKickStartServiceImpl.java          |  16 +-
 .../BaremetalPingPxeResource.java               |  22 +-
 .../networkservice/BaremetalPxeElement.java     |   4 +-
 .../networkservice/BaremetalPxeManagerImpl.java |   6 +-
 .../BaremetalPxeResourceBase.java               |   4 +-
 .../src/com/cloud/ha/HypervInvestigator.java    |   4 +-
 .../discoverer/HypervServerDiscoverer.java      |  46 +-
 .../kvm/src/com/cloud/ha/KVMInvestigator.java   |  10 +-
 .../com/cloud/ovm/hypervisor/OvmDiscoverer.java |  22 +-
 .../src/com/cloud/ovm/hypervisor/OvmFencer.java |  16 +-
 .../java/com/cloud/ha/Ovm3Investigator.java     |   8 +-
 .../ovm3/resources/Ovm3Discoverer.java          |  54 +-
 .../ovm3/resources/Ovm3FenceBuilder.java        |  14 +-
 .../ovm3/resources/Ovm3HypervisorGuru.java      |   6 +-
 .../agent/manager/MockAgentManagerImpl.java     |  24 +-
 .../agent/manager/MockNetworkManagerImpl.java   |  12 +-
 .../agent/manager/MockStorageManagerImpl.java   |   4 +-
 .../cloud/agent/manager/MockVmManagerImpl.java  |  28 +-
 .../agent/manager/SimulatorManagerImpl.java     |  12 +-
 .../src/com/cloud/ha/SimulatorFencer.java       |  16 +-
 .../src/com/cloud/ha/SimulatorInvestigator.java |  12 +-
 .../com/cloud/resource/SimulatorDiscoverer.java |  28 +-
 .../resource/SimulatorSecondaryDiscoverer.java  |   4 +-
 .../simulator/dao/MockConfigurationDaoImpl.java |   4 +-
 .../com/cloud/hypervisor/guru/VMwareGuru.java   |  12 +-
 .../vmware/VmwareServerDiscoverer.java          |  72 ++-
 .../vmware/dao/LegacyZoneDaoImpl.java           |   2 -
 .../vmware/dao/VmwareDatacenterDaoImpl.java     |   2 -
 .../vmware/manager/VmwareManagerImpl.java       | 144 +++--
 .../network/CiscoNexusVSMDeviceManagerImpl.java |   8 +-
 .../network/dao/CiscoNexusVSMDeviceDaoImpl.java |   2 -
 .../network/element/CiscoNexusVSMElement.java   |  10 +-
 .../src/com/cloud/ha/XenServerFencer.java       |  18 +-
 .../discoverer/XcpServerDiscoverer.java         |  60 +-
 .../network/element/BigSwitchBcfElement.java    |  16 +-
 .../guru/BigSwitchBcfGuestNetworkGuru.java      |  20 +-
 .../network/resource/BigSwitchBcfResource.java  |  18 +-
 .../network/element/BrocadeVcsElement.java      |  12 +-
 .../guru/BrocadeVcsGuestNetworkGuru.java        |  32 +-
 .../cloud/network/element/CiscoVnmcElement.java |  64 +--
 .../element/ElasticLoadBalancerElement.java     |   6 +-
 .../lb/ElasticLoadBalancerManagerImpl.java      |  50 +-
 .../element/F5ExternalLoadBalancerElement.java  |  10 +-
 .../cloudstack/element/GloboDnsElement.java     |   6 +-
 .../cloudstack/resource/GloboDnsResource.java   |  32 +-
 .../element/InternalLoadBalancerElement.java    |  62 +-
 .../lb/InternalLoadBalancerVMManagerImpl.java   |  80 ++-
 .../test/resources/lb_element.xml               |   2 +-
 .../management/ContrailElementImpl.java         |  46 +-
 .../contrail/management/ContrailGuru.java       |  52 +-
 .../management/ContrailManagerImpl.java         |  50 +-
 .../management/ContrailVpcElementImpl.java      |  25 +-
 .../management/ManagementNetworkGuru.java       |  10 +-
 .../contrail/management/MockAccountManager.java |   4 +-
 .../JuniperSRXExternalFirewallElement.java      |  16 +-
 .../cloud/network/element/MidoNetElement.java   |  36 +-
 .../network/guru/MidoNetGuestNetworkGuru.java   |  22 +-
 .../network/guru/MidoNetPublicNetworkGuru.java  |  28 +-
 .../cloud/network/element/NetscalerElement.java |  50 +-
 .../cloud/network/element/NiciraNvpElement.java |  62 +-
 .../network/guru/NiciraNvpGuestNetworkGuru.java |  26 +-
 .../cloud/network/element/NuageVspElement.java  |  36 +-
 .../network/guru/NuageVspGuestNetworkGuru.java  |  54 +-
 .../network/manager/NuageVspManagerImpl.java    |   6 +-
 .../network/resource/NuageVspResource.java      |  12 +-
 .../opendaylight/OpendaylightElement.java       |   2 -
 .../OpendaylightGuestNetworkGuru.java           |  34 +-
 .../com/cloud/network/element/OvsElement.java   |  22 +-
 .../cloud/network/guru/OvsGuestNetworkGuru.java |  13 +-
 .../cloud/network/ovs/OvsTunnelManagerImpl.java | 104 ++--
 .../dao/VpcDistributedRouterSeqNoDaoImpl.java   |   2 -
 .../PaloAltoExternalFirewallElement.java        |  16 +-
 .../cloudstack/network/dao/SspUuidDaoImpl.java  |   2 -
 .../cloudstack/network/element/SspElement.java  |  72 ++-
 .../network/guru/SspGuestNetworkGuru.java       |  22 +-
 .../network/guru/VxlanGuestNetworkGuru.java     |   6 +-
 .../allocator/RandomStoragePoolAllocator.java   |  16 +-
 .../util/ElastistorVolumeApiServiceImpl.java    |  10 +-
 .../cloudstack/ldap/LdapAuthenticator.java      |   6 +-
 .../cloud/server/auth/MD5UserAuthenticator.java |  12 +-
 .../server/auth/PBKDF2UserAuthenticator.java    |  14 +-
 .../server/auth/PlainTextUserAuthenticator.java |  12 +-
 .../cloudstack/saml/SAML2AuthManagerImpl.java   |  46 +-
 .../cloudstack/saml/SAML2UserAuthenticator.java |  10 +-
 .../auth/SHA256SaltedUserAuthenticator.java     |  12 +-
 .../allocator/impl/FirstFitAllocator.java       |  88 ++-
 .../allocator/impl/RecreateHostAllocator.java   |  22 +-
 .../impl/UserConcentratedAllocator.java         |  40 +-
 .../authn/impl/BasicAgentAuthManager.java       |   4 +-
 .../src/com/cloud/alert/AlertManagerImpl.java   |  69 ++-
 .../com/cloud/alert/ClusterAlertAdapter.java    |  32 +-
 .../cloud/alert/ConsoleProxyAlertAdapter.java   |  42 +-
 .../alert/SecondaryStorageVmAlertAdapter.java   |  42 +-
 .../com/cloud/api/ApiAsyncJobDispatcher.java    |   4 +-
 server/src/com/cloud/api/ApiServer.java         | 286 +++++----
 .../api/auth/APIAuthenticationManagerImpl.java  |   8 +-
 .../com/cloud/api/query/QueryManagerImpl.java   |  20 +-
 .../cloud/api/query/dao/AccountJoinDaoImpl.java |   2 -
 .../api/query/dao/AffinityGroupJoinDaoImpl.java |   2 -
 .../api/query/dao/DataCenterJoinDaoImpl.java    |   2 -
 .../api/query/dao/DiskOfferingJoinDaoImpl.java  |   2 -
 .../cloud/api/query/dao/DomainJoinDaoImpl.java  |   2 -
 .../api/query/dao/DomainRouterJoinDaoImpl.java  |   2 -
 .../cloud/api/query/dao/HostJoinDaoImpl.java    |   4 +-
 .../com/cloud/api/query/dao/HostTagDaoImpl.java |   2 -
 .../api/query/dao/ImageStoreJoinDaoImpl.java    |   2 -
 .../api/query/dao/InstanceGroupJoinDaoImpl.java |   2 -
 .../query/dao/ProjectAccountJoinDaoImpl.java    |   2 -
 .../query/dao/ProjectInvitationJoinDaoImpl.java |   2 -
 .../cloud/api/query/dao/ProjectJoinDaoImpl.java |   2 -
 .../api/query/dao/StoragePoolJoinDaoImpl.java   |   2 -
 .../cloud/api/query/dao/StorageTagDaoImpl.java  |   2 -
 .../api/query/dao/TemplateJoinDaoImpl.java      |   2 -
 .../api/query/dao/UserAccountJoinDaoImpl.java   |   2 -
 .../cloud/api/query/dao/UserVmJoinDaoImpl.java  |   2 -
 .../cloud/api/query/dao/VolumeJoinDaoImpl.java  |   2 -
 .../com/cloud/capacity/CapacityManagerImpl.java | 150 +++--
 .../configuration/ConfigurationManagerImpl.java |  94 ++-
 .../AgentBasedConsoleProxyManager.java          |  22 +-
 ...AgentBasedStandaloneConsoleProxyManager.java |  18 +-
 .../consoleproxy/ConsoleProxyManagerImpl.java   | 268 +++++----
 .../deploy/DeploymentPlanningManagerImpl.java   | 166 +++---
 .../src/com/cloud/deploy/FirstFitPlanner.java   |  92 ++-
 .../com/cloud/event/dao/EventJoinDaoImpl.java   |   2 -
 .../com/cloud/ha/AbstractInvestigatorImpl.java  |  22 +-
 .../com/cloud/ha/CheckOnAgentInvestigator.java  |  10 +-
 .../ha/HighAvailabilityManagerExtImpl.java      |  10 +-
 .../cloud/ha/HighAvailabilityManagerImpl.java   | 172 +++---
 server/src/com/cloud/ha/KVMFencer.java          |  10 +-
 .../ha/ManagementIPSystemVMInvestigator.java    |  28 +-
 server/src/com/cloud/ha/RecreatableFencer.java  |  14 +-
 .../com/cloud/ha/UserVmDomRInvestigator.java    |  50 +-
 .../src/com/cloud/ha/XenServerInvestigator.java |   4 +-
 .../cloud/ha/dao/HighAvailabilityDaoImpl.java   |   2 -
 .../hypervisor/CloudZonesStartupProcessor.java  |  66 ++-
 .../cloud/hypervisor/HypervisorGuruBase.java    |   4 +-
 .../hypervisor/HypervisorGuruManagerImpl.java   |   2 -
 .../kvm/discoverer/KvmServerDiscoverer.java     |   2 -
 .../kvm/discoverer/LibvirtServerDiscoverer.java |  28 +-
 .../kvm/discoverer/LxcServerDiscoverer.java     |   2 -
 .../metadata/ResourceMetaDataManagerImpl.java   |   2 -
 .../network/ExternalDeviceUsageManagerImpl.java |  76 ++-
 .../ExternalFirewallDeviceManagerImpl.java      |  38 +-
 .../network/ExternalIpAddressAllocator.java     |  10 +-
 .../ExternalLoadBalancerDeviceManagerImpl.java  |  84 ++-
 .../ExternalNetworkDeviceManagerImpl.java       |   4 +-
 .../com/cloud/network/IpAddressManagerImpl.java | 142 +++--
 .../cloud/network/Ipv6AddressManagerImpl.java   |   4 +-
 .../src/com/cloud/network/NetworkModelImpl.java |  68 ++-
 .../com/cloud/network/NetworkServiceImpl.java   | 148 +++--
 .../cloud/network/NetworkUsageManagerImpl.java  |  36 +-
 .../network/StorageNetworkManagerImpl.java      |   8 +-
 .../cloud/network/as/AutoScaleManagerImpl.java  |  96 ++--
 .../element/CloudZonesNetworkElement.java       |   8 +-
 .../cloud/network/element/HAProxyLBRule.java    | 134 +++++
 .../network/element/VirtualRouterElement.java   | 162 +-----
 .../element/VpcVirtualRouterElement.java        |  86 ++-
 .../network/firewall/FirewallManagerImpl.java   |  58 +-
 .../cloud/network/guru/ControlNetworkGuru.java  |  18 +-
 .../cloud/network/guru/DirectNetworkGuru.java   |  20 +-
 .../network/guru/DirectPodBasedNetworkGuru.java |   8 +-
 .../network/guru/ExternalGuestNetworkGuru.java  |   4 +-
 .../cloud/network/guru/GuestNetworkGuru.java    |  10 +-
 .../cloud/network/guru/PodBasedNetworkGuru.java |   8 +-
 .../cloud/network/guru/PrivateNetworkGuru.java  |   8 +-
 .../cloud/network/guru/PublicNetworkGuru.java   |  10 +-
 .../cloud/network/guru/StorageNetworkGuru.java  |   8 +-
 .../network/lb/LBHealthCheckManagerImpl.java    |  16 +-
 .../lb/LoadBalancingRulesManagerImpl.java       | 172 +++---
 .../VirtualNetworkApplianceManagerImpl.java     | 244 ++++----
 .../VpcVirtualNetworkApplianceManagerImpl.java  |  86 ++-
 .../cloud/network/rules/RulesManagerImpl.java   | 118 ++--
 .../security/SecurityGroupManagerImpl2.java     |  54 +-
 .../network/vpc/NetworkACLManagerImpl.java      |  40 +-
 .../network/vpc/NetworkACLServiceImpl.java      |   8 +-
 .../com/cloud/network/vpc/VpcManagerImpl.java   | 184 +++---
 .../network/vpn/RemoteAccessVpnManagerImpl.java |  26 +-
 .../network/vpn/Site2SiteVpnManagerImpl.java    |   4 +-
 .../com/cloud/projects/ProjectManagerImpl.java  |  68 ++-
 .../src/com/cloud/resource/DiscovererBase.java  |  20 +-
 .../com/cloud/resource/DummyHostDiscoverer.java |   4 +-
 .../com/cloud/resource/ResourceManagerImpl.java | 162 +++---
 .../resourcelimit/ResourceLimitManagerImpl.java |  20 +-
 .../cloud/server/ConfigurationServerImpl.java   | 152 +++--
 .../com/cloud/server/ManagementServerImpl.java  | 116 ++--
 server/src/com/cloud/server/StatsCollector.java |  86 ++-
 .../storage/ImageStoreUploadMonitorImpl.java    |  66 ++-
 .../src/com/cloud/storage/OCFS2ManagerImpl.java |  12 +-
 .../com/cloud/storage/StorageManagerImpl.java   | 172 +++---
 .../com/cloud/storage/VolumeApiServiceImpl.java |  60 +-
 .../storage/download/DownloadMonitorImpl.java   |  18 +-
 .../storage/snapshot/SnapshotManagerImpl.java   |  50 +-
 .../storage/snapshot/SnapshotSchedulerImpl.java |  24 +-
 .../cloud/storage/upload/UploadMonitorImpl.java |  34 +-
 .../cloud/tags/TaggedResourceManagerImpl.java   |   4 +-
 .../template/HypervisorTemplateAdapter.java     |  32 +-
 .../com/cloud/template/TemplateAdapterBase.java |   4 +-
 .../com/cloud/template/TemplateManagerImpl.java |  88 ++-
 .../src/com/cloud/usage/UsageServiceImpl.java   |  10 +-
 .../src/com/cloud/user/AccountManagerImpl.java  | 228 ++++----
 .../src/com/cloud/user/DomainManagerImpl.java   |  38 +-
 server/src/com/cloud/vm/UserVmManagerImpl.java  | 342 ++++++-----
 .../vm/snapshot/VMSnapshotManagerImpl.java      |  20 +-
 .../affinity/AffinityGroupServiceImpl.java      |  16 +-
 .../lb/ApplicationLoadBalancerManagerImpl.java  |  10 +-
 .../cloudstack/region/RegionManagerImpl.java    |   2 -
 .../cloudstack/region/RegionServiceImpl.java    |   2 -
 .../consoleproxy/ConsoleProxyManagerTest.java   |   1 +
 .../com/cloud/vpc/MockNetworkManagerImpl.java   |   4 +-
 .../vpc/dao/MockNetworkOfferingDaoImpl.java     |   6 +-
 .../test/com/cloud/vpc/dao/MockVpcDaoImpl.java  |   6 +-
 .../SecondaryStorageManagerImpl.java            | 206 ++++---
 .../resource/SecondaryStorageDiscoverer.java    |  32 +-
 .../storage/template/DownloadManagerImpl.java   |  84 ++-
 .../storage/template/UploadManagerImpl.java     |  76 ++-
 .../com/cloud/usage/UsageAlertManagerImpl.java  |  19 +-
 usage/src/com/cloud/usage/UsageManagerImpl.java | 306 +++++-----
 .../utils/component/ComponentLifecycleBase.java |   2 +-
 .../utils/identity/ManagementServerNode.java    |   4 +-
 361 files changed, 5859 insertions(+), 6550 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/core/src/com/cloud/storage/template/IsoProcessor.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/storage/template/IsoProcessor.java b/core/src/com/cloud/storage/template/IsoProcessor.java
index 4d0a331..7828f78 100644
--- a/core/src/com/cloud/storage/template/IsoProcessor.java
+++ b/core/src/com/cloud/storage/template/IsoProcessor.java
@@ -25,7 +25,6 @@ import java.util.Map;
 import javax.ejb.Local;
 import javax.naming.ConfigurationException;
 
-import org.apache.log4j.Logger;
 
 import com.cloud.storage.Storage.ImageFormat;
 import com.cloud.storage.StorageLayer;
@@ -33,21 +32,20 @@ import com.cloud.utils.component.AdapterBase;
 
 @Local(value = Processor.class)
 public class IsoProcessor extends AdapterBase implements Processor {
-    private static final Logger s_logger = Logger.getLogger(IsoProcessor.class);
 
     StorageLayer _storage;
 
     @Override
     public FormatInfo process(String templatePath, ImageFormat format, String templateName) {
         if (format != null) {
-            s_logger.debug("We don't handle conversion from " + format + " to ISO.");
+            logger.debug("We don't handle conversion from " + format + " to ISO.");
             return null;
         }
 
         String isoPath = templatePath + File.separator + templateName + "." + ImageFormat.ISO.getFileExtension();
 
         if (!_storage.exists(isoPath)) {
-            s_logger.debug("Unable to find the iso file: " + isoPath);
+            logger.debug("Unable to find the iso file: " + isoPath);
             return null;
         }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/core/src/com/cloud/storage/template/OVAProcessor.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/storage/template/OVAProcessor.java b/core/src/com/cloud/storage/template/OVAProcessor.java
index 3d7f7a2..9c61487 100644
--- a/core/src/com/cloud/storage/template/OVAProcessor.java
+++ b/core/src/com/cloud/storage/template/OVAProcessor.java
@@ -26,7 +26,6 @@ import javax.ejb.Local;
 import javax.naming.ConfigurationException;
 import javax.xml.parsers.DocumentBuilderFactory;
 
-import org.apache.log4j.Logger;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
@@ -38,39 +37,38 @@ import com.cloud.utils.script.Script;
 
 @Local(value = Processor.class)
 public class OVAProcessor extends AdapterBase implements Processor {
-    private static final Logger s_logger = Logger.getLogger(OVAProcessor.class);
 
     StorageLayer _storage;
 
     @Override
     public FormatInfo process(String templatePath, ImageFormat format, String templateName) throws InternalErrorException {
         if (format != null) {
-            if (s_logger.isInfoEnabled()) {
-                s_logger.info("We currently don't handle conversion from " + format + " to OVA.");
+            if (logger.isInfoEnabled()) {
+                logger.info("We currently don't handle conversion from " + format + " to OVA.");
             }
             return null;
         }
 
-        s_logger.info("Template processing. templatePath: " + templatePath + ", templateName: " + templateName);
+        logger.info("Template processing. templatePath: " + templatePath + ", templateName: " + templateName);
         String templateFilePath = templatePath + File.separator + templateName + "." + ImageFormat.OVA.getFileExtension();
         if (!_storage.exists(templateFilePath)) {
-            if (s_logger.isInfoEnabled()) {
-                s_logger.info("Unable to find the vmware template file: " + templateFilePath);
+            if (logger.isInfoEnabled()) {
+                logger.info("Unable to find the vmware template file: " + templateFilePath);
             }
             return null;
         }
 
-        s_logger.info("Template processing - untar OVA package. templatePath: " + templatePath + ", templateName: " + templateName);
+        logger.info("Template processing - untar OVA package. templatePath: " + templatePath + ", templateName: " + templateName);
         String templateFileFullPath = templatePath + File.separator + templateName + "." + ImageFormat.OVA.getFileExtension();
         File templateFile = new File(templateFileFullPath);
 
-        Script command = new Script("tar", 0, s_logger);
+        Script command = new Script("tar", 0, logger);
         command.add("--no-same-owner");
         command.add("-xf", templateFileFullPath);
         command.setWorkDir(templateFile.getParent());
         String result = command.execute();
         if (result != null) {
-            s_logger.info("failed to untar OVA package due to " + result + ". templatePath: " + templatePath + ", templateName: " + templateName);
+            logger.info("failed to untar OVA package due to " + result + ". templatePath: " + templatePath + ", templateName: " + templateName);
             return null;
         }
 
@@ -91,7 +89,7 @@ public class OVAProcessor extends AdapterBase implements Processor {
             long size = getTemplateVirtualSize(file.getParent(), file.getName());
             return size;
         } catch (Exception e) {
-            s_logger.info("[ignored]"
+            logger.info("[ignored]"
                     + "failed to get virtual template size for ova: " + e.getLocalizedMessage());
         }
         return file.length();
@@ -105,7 +103,7 @@ public class OVAProcessor extends AdapterBase implements Processor {
         String ovfFileName = getOVFFilePath(templateFileFullPath);
         if (ovfFileName == null) {
             String msg = "Unable to locate OVF file in template package directory: " + templatePath;
-            s_logger.error(msg);
+            logger.error(msg);
             throw new InternalErrorException(msg);
         }
         try {
@@ -130,7 +128,7 @@ public class OVAProcessor extends AdapterBase implements Processor {
             return virtualSize;
         } catch (Exception e) {
             String msg = "Unable to parse OVF XML document to get the virtual disk size due to" + e;
-            s_logger.error(msg);
+            logger.error(msg);
             throw new InternalErrorException(msg);
         }
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/core/src/com/cloud/storage/template/QCOW2Processor.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/storage/template/QCOW2Processor.java b/core/src/com/cloud/storage/template/QCOW2Processor.java
index 2c66415..5956005 100644
--- a/core/src/com/cloud/storage/template/QCOW2Processor.java
+++ b/core/src/com/cloud/storage/template/QCOW2Processor.java
@@ -27,7 +27,6 @@ import java.util.Map;
 import javax.ejb.Local;
 import javax.naming.ConfigurationException;
 
-import org.apache.log4j.Logger;
 
 import com.cloud.storage.Storage.ImageFormat;
 import com.cloud.storage.StorageLayer;
@@ -36,7 +35,6 @@ import com.cloud.utils.component.AdapterBase;
 
 @Local(value = Processor.class)
 public class QCOW2Processor extends AdapterBase implements Processor {
-    private static final Logger s_logger = Logger.getLogger(QCOW2Processor.class);
     private static final int VIRTUALSIZE_HEADER_LOCATION = 24;
 
     private StorageLayer _storage;
@@ -44,14 +42,14 @@ public class QCOW2Processor extends AdapterBase implements Processor {
     @Override
     public FormatInfo process(String templatePath, ImageFormat format, String templateName) {
         if (format != null) {
-            s_logger.debug("We currently don't handle conversion from " + format + " to QCOW2.");
+            logger.debug("We currently don't handle conversion from " + format + " to QCOW2.");
             return null;
         }
 
         String qcow2Path = templatePath + File.separator + templateName + "." + ImageFormat.QCOW2.getFileExtension();
 
         if (!_storage.exists(qcow2Path)) {
-            s_logger.debug("Unable to find the qcow2 file: " + qcow2Path);
+            logger.debug("Unable to find the qcow2 file: " + qcow2Path);
             return null;
         }
 
@@ -66,7 +64,7 @@ public class QCOW2Processor extends AdapterBase implements Processor {
         try {
             info.virtualSize = getVirtualSize(qcow2File);
         } catch (IOException e) {
-            s_logger.error("Unable to get virtual size from " + qcow2File.getName());
+            logger.error("Unable to get virtual size from " + qcow2File.getName());
             return null;
         }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/core/src/com/cloud/storage/template/RawImageProcessor.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/storage/template/RawImageProcessor.java b/core/src/com/cloud/storage/template/RawImageProcessor.java
index 820ef19..74b7428 100644
--- a/core/src/com/cloud/storage/template/RawImageProcessor.java
+++ b/core/src/com/cloud/storage/template/RawImageProcessor.java
@@ -25,7 +25,6 @@ import java.util.Map;
 import javax.ejb.Local;
 import javax.naming.ConfigurationException;
 
-import org.apache.log4j.Logger;
 
 import com.cloud.exception.InternalErrorException;
 import com.cloud.storage.Storage.ImageFormat;
@@ -34,7 +33,6 @@ import com.cloud.utils.component.AdapterBase;
 
 @Local(value = Processor.class)
 public class RawImageProcessor extends AdapterBase implements Processor {
-    private static final Logger s_logger = Logger.getLogger(RawImageProcessor.class);
     StorageLayer _storage;
 
     @Override
@@ -50,13 +48,13 @@ public class RawImageProcessor extends AdapterBase implements Processor {
     @Override
     public FormatInfo process(String templatePath, ImageFormat format, String templateName) throws InternalErrorException {
         if (format != null) {
-            s_logger.debug("We currently don't handle conversion from " + format + " to raw image.");
+            logger.debug("We currently don't handle conversion from " + format + " to raw image.");
             return null;
         }
 
         String imgPath = templatePath + File.separator + templateName + "." + ImageFormat.RAW.getFileExtension();
         if (!_storage.exists(imgPath)) {
-            s_logger.debug("Unable to find raw image:" + imgPath);
+            logger.debug("Unable to find raw image:" + imgPath);
             return null;
         }
         FormatInfo info = new FormatInfo();
@@ -64,7 +62,7 @@ public class RawImageProcessor extends AdapterBase implements Processor {
         info.filename = templateName + "." + ImageFormat.RAW.getFileExtension();
         info.size = _storage.getSize(imgPath);
         info.virtualSize = info.size;
-        s_logger.debug("Process raw image " + info.filename + " successfully");
+        logger.debug("Process raw image " + info.filename + " successfully");
         return info;
     }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/core/src/com/cloud/storage/template/TARProcessor.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/storage/template/TARProcessor.java b/core/src/com/cloud/storage/template/TARProcessor.java
index 96c866e..e120f89 100644
--- a/core/src/com/cloud/storage/template/TARProcessor.java
+++ b/core/src/com/cloud/storage/template/TARProcessor.java
@@ -22,7 +22,6 @@ package com.cloud.storage.template;
 import com.cloud.storage.Storage.ImageFormat;
 import com.cloud.storage.StorageLayer;
 import com.cloud.utils.component.AdapterBase;
-import org.apache.log4j.Logger;
 
 import javax.ejb.Local;
 import javax.naming.ConfigurationException;
@@ -31,21 +30,20 @@ import java.util.Map;
 
 @Local(value = Processor.class)
 public class TARProcessor extends AdapterBase implements Processor {
-    private static final Logger s_logger = Logger.getLogger(TARProcessor.class);
 
     private StorageLayer _storage;
 
     @Override
     public FormatInfo process(String templatePath, ImageFormat format, String templateName) {
         if (format != null) {
-            s_logger.debug("We currently don't handle conversion from " + format + " to TAR.");
+            logger.debug("We currently don't handle conversion from " + format + " to TAR.");
             return null;
         }
 
         String tarPath = templatePath + File.separator + templateName + "." + ImageFormat.TAR.getFileExtension();
 
         if (!_storage.exists(tarPath)) {
-            s_logger.debug("Unable to find the tar file: " + tarPath);
+            logger.debug("Unable to find the tar file: " + tarPath);
             return null;
         }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/core/src/com/cloud/storage/template/VhdProcessor.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/storage/template/VhdProcessor.java b/core/src/com/cloud/storage/template/VhdProcessor.java
index 2974c75..adece96 100644
--- a/core/src/com/cloud/storage/template/VhdProcessor.java
+++ b/core/src/com/cloud/storage/template/VhdProcessor.java
@@ -27,7 +27,6 @@ import java.util.Map;
 import javax.ejb.Local;
 import javax.naming.ConfigurationException;
 
-import org.apache.log4j.Logger;
 
 import com.cloud.storage.Storage.ImageFormat;
 import com.cloud.storage.StorageLayer;
@@ -43,7 +42,6 @@ import com.cloud.utils.component.AdapterBase;
 @Local(value = Processor.class)
 public class VhdProcessor extends AdapterBase implements Processor {
 
-    private static final Logger s_logger = Logger.getLogger(VhdProcessor.class);
     StorageLayer _storage;
     private int vhdFooterSize = 512;
     private int vhdFooterCreatorAppOffset = 28;
@@ -54,13 +52,13 @@ public class VhdProcessor extends AdapterBase implements Processor {
     @Override
     public FormatInfo process(String templatePath, ImageFormat format, String templateName) {
         if (format != null) {
-            s_logger.debug("We currently don't handle conversion from " + format + " to VHD.");
+            logger.debug("We currently don't handle conversion from " + format + " to VHD.");
             return null;
         }
 
         String vhdPath = templatePath + File.separator + templateName + "." + ImageFormat.VHD.getFileExtension();
         if (!_storage.exists(vhdPath)) {
-            s_logger.debug("Unable to find the vhd file: " + vhdPath);
+            logger.debug("Unable to find the vhd file: " + vhdPath);
             return null;
         }
 
@@ -74,7 +72,7 @@ public class VhdProcessor extends AdapterBase implements Processor {
         try {
             info.virtualSize = getVirtualSize(vhdFile);
         } catch (IOException e) {
-            s_logger.error("Unable to get the virtual size for " + vhdPath);
+            logger.error("Unable to get the virtual size for " + vhdPath);
             return null;
         }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/core/src/com/cloud/storage/template/VmdkProcessor.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/storage/template/VmdkProcessor.java b/core/src/com/cloud/storage/template/VmdkProcessor.java
index 3d399f5..ca03d4f 100644
--- a/core/src/com/cloud/storage/template/VmdkProcessor.java
+++ b/core/src/com/cloud/storage/template/VmdkProcessor.java
@@ -31,7 +31,6 @@ import java.util.regex.Pattern;
 import javax.ejb.Local;
 import javax.naming.ConfigurationException;
 
-import org.apache.log4j.Logger;
 
 import com.cloud.exception.InternalErrorException;
 import com.cloud.storage.Storage.ImageFormat;
@@ -40,24 +39,23 @@ import com.cloud.utils.component.AdapterBase;
 
 @Local(value = Processor.class)
 public class VmdkProcessor extends AdapterBase implements Processor {
-    private static final Logger s_logger = Logger.getLogger(VmdkProcessor.class);
 
     StorageLayer _storage;
 
     @Override
     public FormatInfo process(String templatePath, ImageFormat format, String templateName) throws InternalErrorException {
         if (format != null) {
-            if (s_logger.isInfoEnabled()) {
-                s_logger.info("We currently don't handle conversion from " + format + " to VMDK.");
+            if (logger.isInfoEnabled()) {
+                logger.info("We currently don't handle conversion from " + format + " to VMDK.");
             }
             return null;
         }
 
-        s_logger.info("Template processing. templatePath: " + templatePath + ", templateName: " + templateName);
+        logger.info("Template processing. templatePath: " + templatePath + ", templateName: " + templateName);
         String templateFilePath = templatePath + File.separator + templateName + "." + ImageFormat.VMDK.getFileExtension();
         if (!_storage.exists(templateFilePath)) {
-            if (s_logger.isInfoEnabled()) {
-                s_logger.info("Unable to find the vmware template file: " + templateFilePath);
+            if (logger.isInfoEnabled()) {
+                logger.info("Unable to find the vmware template file: " + templateFilePath);
             }
             return null;
         }
@@ -77,7 +75,7 @@ public class VmdkProcessor extends AdapterBase implements Processor {
             long size = getTemplateVirtualSize(file.getParent(), file.getName());
             return size;
         } catch (Exception e) {
-            s_logger.info("[ignored]"
+            logger.info("[ignored]"
                     + "failed to get template virtual size for vmdk: " + e.getLocalizedMessage());
         }
         return file.length();
@@ -103,15 +101,15 @@ public class VmdkProcessor extends AdapterBase implements Processor {
             }
         } catch(FileNotFoundException ex) {
             String msg = "Unable to open file '" + templateFileFullPath + "' " + ex.toString();
-            s_logger.error(msg);
+            logger.error(msg);
             throw new InternalErrorException(msg);
         } catch(IOException ex) {
             String msg = "Unable read open file '" + templateFileFullPath + "' " + ex.toString();
-            s_logger.error(msg);
+            logger.error(msg);
             throw new InternalErrorException(msg);
         }
 
-        s_logger.debug("vmdk file had size="+virtualSize);
+        logger.debug("vmdk file had size="+virtualSize);
         return virtualSize;
     }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/engine/orchestration/src/com/cloud/agent/manager/AgentManagerImpl.java
----------------------------------------------------------------------
diff --git a/engine/orchestration/src/com/cloud/agent/manager/AgentManagerImpl.java b/engine/orchestration/src/com/cloud/agent/manager/AgentManagerImpl.java
index a38fd08..de1d53c 100644
--- a/engine/orchestration/src/com/cloud/agent/manager/AgentManagerImpl.java
+++ b/engine/orchestration/src/com/cloud/agent/manager/AgentManagerImpl.java
@@ -45,7 +45,6 @@ import org.apache.cloudstack.framework.jobs.AsyncJob;
 import org.apache.cloudstack.framework.jobs.AsyncJobExecutionContext;
 import org.apache.cloudstack.managed.context.ManagedContextRunnable;
 import org.apache.cloudstack.utils.identity.ManagementServerNode;
-import org.apache.log4j.Logger;
 
 import com.cloud.agent.AgentManager;
 import com.cloud.agent.Listener;
@@ -116,8 +115,6 @@ import com.cloud.utils.time.InaccurateClock;
  **/
 @Local(value = {AgentManager.class})
 public class AgentManagerImpl extends ManagerBase implements AgentManager, HandlerFactory, Configurable {
-    protected static final Logger s_logger = Logger.getLogger(AgentManagerImpl.class);
-    protected static final Logger status_logger = Logger.getLogger(Status.class);
 
     /**
      * _agents is a ConcurrentHashMap, but it is used from within a synchronized block.
@@ -200,12 +197,12 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl
     @Override
     public boolean configure(final String name, final Map<String, Object> params) throws ConfigurationException {
 
-        s_logger.info("Ping Timeout is " + PingTimeout.value());
+        logger.info("Ping Timeout is " + PingTimeout.value());
 
         final int threads = DirectAgentLoadSize.value();
 
         _nodeId = ManagementServerNode.getManagementServerId();
-        s_logger.info("Configuring AgentManagerImpl. management server node id(msid): " + _nodeId);
+        logger.info("Configuring AgentManagerImpl. management server node id(msid): " + _nodeId);
 
         final long lastPing = (System.currentTimeMillis() >> 10) - (long)(PingTimeout.value() * PingInterval.value());
         _hostDao.markHostsAsDisconnected(_nodeId, lastPing);
@@ -219,13 +216,13 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl
         _connectExecutor.allowCoreThreadTimeOut(true);
 
         _connection = new NioServer("AgentManager", Port.value(), Workers.value() + 10, this);
-        s_logger.info("Listening on " + Port.value() + " with " + Workers.value() + " workers");
+        logger.info("Listening on " + Port.value() + " with " + Workers.value() + " workers");
 
         // executes all agent commands other than cron and ping
         _directAgentExecutor = new ScheduledThreadPoolExecutor(DirectAgentPoolSize.value(), new NamedThreadFactory("DirectAgent"));
         // executes cron and ping agent commands
         _cronJobExecutor = new ScheduledThreadPoolExecutor(DirectAgentPoolSize.value(), new NamedThreadFactory("DirectAgentCronJob"));
-        s_logger.debug("Created DirectAgentAttache pool with size: " + DirectAgentPoolSize.value());
+        logger.debug("Created DirectAgentAttache pool with size: " + DirectAgentPoolSize.value());
         _directAgentThreadCap = Math.round(DirectAgentPoolSize.value() * DirectAgentThreadCap.value()) + 1; // add 1 to always make the value > 0
 
         _monitorExecutor = new ScheduledThreadPoolExecutor(1, new NamedThreadFactory("AgentMonitor"));
@@ -260,8 +257,8 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl
                     _cmdMonitors.add(new Pair<Integer, Listener>(_monitorId, listener));
                 }
             }
-            if (s_logger.isDebugEnabled()) {
-                s_logger.debug("Registering listener " + listener.getClass().getSimpleName() + " with id " + _monitorId);
+            if (logger.isDebugEnabled()) {
+                logger.debug("Registering listener " + listener.getClass().getSimpleName() + " with id " + _monitorId);
             }
             return _monitorId;
         }
@@ -282,7 +279,7 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl
 
     @Override
     public void unregisterForHostEvents(final int id) {
-        s_logger.debug("Deregistering " + id);
+        logger.debug("Deregistering " + id);
         _hostMonitors.remove(id);
     }
 
@@ -297,15 +294,15 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl
             }
         }
 
-        s_logger.warn("No handling of agent control command: " + cmd + " sent from " + attache.getId());
+        logger.warn("No handling of agent control command: " + cmd + " sent from " + attache.getId());
         return new AgentControlAnswer(cmd);
     }
 
     public void handleCommands(final AgentAttache attache, final long sequence, final Command[] cmds) {
         for (final Pair<Integer, Listener> listener : _cmdMonitors) {
             final boolean processed = listener.second().processCommands(attache.getId(), sequence, cmds);
-            if (s_logger.isTraceEnabled()) {
-                s_logger.trace("SeqA " + attache.getId() + "-" + sequence + ": " + (processed ? "processed" : "not processed") + " by " + listener.getClass());
+            if (logger.isTraceEnabled()) {
+                logger.trace("SeqA " + attache.getId() + "-" + sequence + ": " + (processed ? "processed" : "not processed") + " by " + listener.getClass());
             }
         }
     }
@@ -365,7 +362,7 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl
         }
 
         if (answers != null && answers[0] instanceof UnsupportedAnswer) {
-            s_logger.warn("Unsupported Command: " + answers[0].getDetails());
+            logger.warn("Unsupported Command: " + answers[0].getDetails());
             return answers[0];
         }
 
@@ -458,14 +455,14 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl
         final Long hostId = agent.getId();
         final HostVO host = _hostDao.findById(hostId);
         if (host != null && host.getType() != null && !host.getType().isVirtual()) {
-            if (s_logger.isDebugEnabled()) {
-                s_logger.debug("checking if agent (" + hostId + ") is alive");
+            if (logger.isDebugEnabled()) {
+                logger.debug("checking if agent (" + hostId + ") is alive");
             }
             final Answer answer = easySend(hostId, new CheckHealthCommand());
             if (answer != null && answer.getResult()) {
                 final Status status = Status.Up;
-                if (s_logger.isDebugEnabled()) {
-                    s_logger.debug("agent (" + hostId + ") responded to checkHeathCommand, reporting that agent is " + status);
+                if (logger.isDebugEnabled()) {
+                    logger.debug("agent (" + hostId + ") responded to checkHeathCommand, reporting that agent is " + status);
                 }
                 return status;
             }
@@ -480,7 +477,7 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl
         }
         final AgentAttache agent = findAttache(hostId);
         if (agent == null) {
-            s_logger.debug("Unable to find agent for " + hostId);
+            logger.debug("Unable to find agent for " + hostId);
             throw new AgentUnavailableException("Unable to find agent ", hostId);
         }
 
@@ -508,8 +505,8 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl
             return;
         }
         final long hostId = attache.getId();
-        if (s_logger.isDebugEnabled()) {
-            s_logger.debug("Remove Agent : " + hostId);
+        if (logger.isDebugEnabled()) {
+            logger.debug("Remove Agent : " + hostId);
         }
         AgentAttache removed = null;
         boolean conflict = false;
@@ -522,15 +519,15 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl
             }
         }
         if (conflict) {
-            s_logger.debug("Agent for host " + hostId + " is created when it is being disconnected");
+            logger.debug("Agent for host " + hostId + " is created when it is being disconnected");
         }
         if (removed != null) {
             removed.disconnect(nextState);
         }
 
         for (final Pair<Integer, Listener> monitor : _hostMonitors) {
-            if (s_logger.isDebugEnabled()) {
-                s_logger.debug("Sending Disconnect to listener: " + monitor.second().getClass().getName());
+            if (logger.isDebugEnabled()) {
+                logger.debug("Sending Disconnect to listener: " + monitor.second().getClass().getName());
             }
             monitor.second().processDisconnect(hostId, nextState);
         }
@@ -540,8 +537,8 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl
         final long hostId = attache.getId();
         final HostVO host = _hostDao.findById(hostId);
         for (final Pair<Integer, Listener> monitor : _hostMonitors) {
-            if (s_logger.isDebugEnabled()) {
-                s_logger.debug("Sending Connect to listener: " + monitor.second().getClass().getSimpleName());
+            if (logger.isDebugEnabled()) {
+                logger.debug("Sending Connect to listener: " + monitor.second().getClass().getSimpleName());
             }
             for (int i = 0; i < cmd.length; i++) {
                 try {
@@ -550,12 +547,12 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl
                     if (e instanceof ConnectionException) {
                         final ConnectionException ce = (ConnectionException)e;
                         if (ce.isSetupError()) {
-                            s_logger.warn("Monitor " + monitor.second().getClass().getSimpleName() + " says there is an error in the connect process for " + hostId +
+                            logger.warn("Monitor " + monitor.second().getClass().getSimpleName() + " says there is an error in the connect process for " + hostId +
                                     " due to " + e.getMessage());
                             handleDisconnectWithoutInvestigation(attache, Event.AgentDisconnected, true, true);
                             throw ce;
                         } else {
-                            s_logger.info("Monitor " + monitor.second().getClass().getSimpleName() + " says not to continue the connect process for " + hostId +
+                            logger.info("Monitor " + monitor.second().getClass().getSimpleName() + " says not to continue the connect process for " + hostId +
                                     " due to " + e.getMessage());
                             handleDisconnectWithoutInvestigation(attache, Event.ShutdownRequested, true, true);
                             return attache;
@@ -564,7 +561,7 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl
                         handleDisconnectWithoutInvestigation(attache, Event.ShutdownRequested, true, true);
                         throw new CloudRuntimeException("Unable to connect " + attache.getId(), e);
                     } else {
-                        s_logger.error("Monitor " + monitor.second().getClass().getSimpleName() + " says there is an error in the connect process for " + hostId +
+                        logger.error("Monitor " + monitor.second().getClass().getSimpleName() + " says there is an error in the connect process for " + hostId +
                                 " due to " + e.getMessage(), e);
                         handleDisconnectWithoutInvestigation(attache, Event.AgentDisconnected, true, true);
                         throw new CloudRuntimeException("Unable to connect " + attache.getId(), e);
@@ -616,19 +613,19 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl
             final Constructor<?> constructor = clazz.getConstructor();
             resource = (ServerResource)constructor.newInstance();
         } catch (final ClassNotFoundException e) {
-            s_logger.warn("Unable to find class " + host.getResource(), e);
+            logger.warn("Unable to find class " + host.getResource(), e);
         } catch (final InstantiationException e) {
-            s_logger.warn("Unablet to instantiate class " + host.getResource(), e);
+            logger.warn("Unablet to instantiate class " + host.getResource(), e);
         } catch (final IllegalAccessException e) {
-            s_logger.warn("Illegal access " + host.getResource(), e);
+            logger.warn("Illegal access " + host.getResource(), e);
         } catch (final SecurityException e) {
-            s_logger.warn("Security error on " + host.getResource(), e);
+            logger.warn("Security error on " + host.getResource(), e);
         } catch (final NoSuchMethodException e) {
-            s_logger.warn("NoSuchMethodException error on " + host.getResource(), e);
+            logger.warn("NoSuchMethodException error on " + host.getResource(), e);
         } catch (final IllegalArgumentException e) {
-            s_logger.warn("IllegalArgumentException error on " + host.getResource(), e);
+            logger.warn("IllegalArgumentException error on " + host.getResource(), e);
         } catch (final InvocationTargetException e) {
-            s_logger.warn("InvocationTargetException error on " + host.getResource(), e);
+            logger.warn("InvocationTargetException error on " + host.getResource(), e);
         }
 
         if (resource != null) {
@@ -662,12 +659,12 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl
             try {
                 resource.configure(host.getName(), params);
             } catch (final ConfigurationException e) {
-                s_logger.warn("Unable to configure resource due to " + e.getMessage());
+                logger.warn("Unable to configure resource due to " + e.getMessage());
                 return null;
             }
 
             if (!resource.start()) {
-                s_logger.warn("Unable to start the resource");
+                logger.warn("Unable to start the resource");
                 return null;
             }
         }
@@ -685,14 +682,14 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl
             //load the respective discoverer
             final Discoverer discoverer = _resourceMgr.getMatchingDiscover(host.getHypervisorType());
             if (discoverer == null) {
-                s_logger.info("Could not to find a Discoverer to load the resource: " + host.getId() + " for hypervisor type: " + host.getHypervisorType());
+                logger.info("Could not to find a Discoverer to load the resource: " + host.getId() + " for hypervisor type: " + host.getHypervisorType());
                 resource = loadResourcesWithoutHypervisor(host);
             } else {
                 resource = discoverer.reloadResource(host);
             }
 
             if (resource == null) {
-                s_logger.warn("Unable to load the resource: " + host.getId());
+                logger.warn("Unable to load the resource: " + host.getId());
                 return false;
             }
 
@@ -718,7 +715,7 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl
     }
 
     protected AgentAttache createAttacheForDirectConnect(final Host host, final ServerResource resource) throws ConnectionException {
-        s_logger.debug("create DirectAgentAttache for " + host.getId());
+        logger.debug("create DirectAgentAttache for " + host.getId());
         final DirectAgentAttache attache = new DirectAgentAttache(this, host.getId(), host.getName(), resource, host.isInMaintenanceStates());
 
         AgentAttache old = null;
@@ -739,13 +736,13 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl
             _connection.stop();
         }
 
-        s_logger.info("Disconnecting agents: " + _agents.size());
+        logger.info("Disconnecting agents: " + _agents.size());
         synchronized (_agents) {
             for (final AgentAttache agent : _agents.values()) {
                 final HostVO host = _hostDao.findById(agent.getId());
                 if (host == null) {
-                    if (s_logger.isDebugEnabled()) {
-                        s_logger.debug("Cant not find host " + agent.getId());
+                    if (logger.isDebugEnabled()) {
+                        logger.debug("Cant not find host " + agent.getId());
                     }
                 } else {
                     if (!agent.forForward()) {
@@ -763,17 +760,17 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl
     protected boolean handleDisconnectWithoutInvestigation(final AgentAttache attache, final Status.Event event, final boolean transitState, final boolean removeAgent) {
         final long hostId = attache.getId();
 
-        s_logger.info("Host " + hostId + " is disconnecting with event " + event);
+        logger.info("Host " + hostId + " is disconnecting with event " + event);
         Status nextStatus = null;
         final HostVO host = _hostDao.findById(hostId);
         if (host == null) {
-            s_logger.warn("Can't find host with " + hostId);
+            logger.warn("Can't find host with " + hostId);
             nextStatus = Status.Removed;
         } else {
             final Status currentStatus = host.getStatus();
             if (currentStatus == Status.Down || currentStatus == Status.Alert || currentStatus == Status.Removed) {
-                if (s_logger.isDebugEnabled()) {
-                    s_logger.debug("Host " + hostId + " is already " + currentStatus);
+                if (logger.isDebugEnabled()) {
+                    logger.debug("Host " + hostId + " is already " + currentStatus);
                 }
                 nextStatus = currentStatus;
             } else {
@@ -781,18 +778,18 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl
                     nextStatus = currentStatus.getNextStatus(event);
                 } catch (final NoTransitionException e) {
                     final String err = "Cannot find next status for " + event + " as current status is " + currentStatus + " for agent " + hostId;
-                    s_logger.debug(err);
+                    logger.debug(err);
                     throw new CloudRuntimeException(err);
                 }
 
-                if (s_logger.isDebugEnabled()) {
-                    s_logger.debug("The next status of agent " + hostId + "is " + nextStatus + ", current status is " + currentStatus);
+                if (logger.isDebugEnabled()) {
+                    logger.debug("The next status of agent " + hostId + "is " + nextStatus + ", current status is " + currentStatus);
                 }
             }
         }
 
-        if (s_logger.isDebugEnabled()) {
-            s_logger.debug("Deregistering link for " + hostId + " with state " + nextStatus);
+        if (logger.isDebugEnabled()) {
+            logger.debug("Deregistering link for " + hostId + " with state " + nextStatus);
         }
 
         removeAgent(attache, nextStatus);
@@ -817,48 +814,48 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl
                  * Why this can happen? Ask God not me. I hate there was no piece of comment for code handling race condition.
                  * God knew what race condition the code dealt with!
                  */
-                s_logger.debug("Caught exception while getting agent's next status", ne);
+                logger.debug("Caught exception while getting agent's next status", ne);
             }
 
             if (nextStatus == Status.Alert) {
                 /* OK, we are going to the bad status, let's see what happened */
-                s_logger.info("Investigating why host " + hostId + " has disconnected with event " + event);
+                logger.info("Investigating why host " + hostId + " has disconnected with event " + event);
 
                 Status determinedState = investigate(attache);
                 // if state cannot be determined do nothing and bail out
                 if (determinedState == null) {
                     if (((System.currentTimeMillis() >> 10) - host.getLastPinged()) > AlertWait.value()) {
-                        s_logger.warn("Agent " + hostId + " state cannot be determined for more than " + AlertWait + "(" + AlertWait.value() + ") seconds, will go to Alert state");
+                        logger.warn("Agent " + hostId + " state cannot be determined for more than " + AlertWait + "(" + AlertWait.value() + ") seconds, will go to Alert state");
                         determinedState = Status.Alert;
                     } else {
-                        s_logger.warn("Agent " + hostId + " state cannot be determined, do nothing");
+                        logger.warn("Agent " + hostId + " state cannot be determined, do nothing");
                         return false;
                     }
                 }
 
                 final Status currentStatus = host.getStatus();
-                s_logger.info("The agent " + hostId + " state determined is " + determinedState);
+                logger.info("The agent " + hostId + " state determined is " + determinedState);
 
                 if (determinedState == Status.Down) {
                     String message = "Host is down: " + host.getId() + "-" + host.getName() + ". Starting HA on the VMs";
-                    s_logger.error(message);
+                    logger.error(message);
                     if (host.getType() != Host.Type.SecondaryStorage && host.getType() != Host.Type.ConsoleProxy) {
                         _alertMgr.sendAlert(AlertManager.AlertType.ALERT_TYPE_HOST, host.getDataCenterId(), host.getPodId(), "Host down, " + host.getId(), message);
                     }
                     event = Status.Event.HostDown;
                 } else if (determinedState == Status.Up) {
                     /* Got ping response from host, bring it back */
-                    s_logger.info("Agent is determined to be up and running");
+                    logger.info("Agent is determined to be up and running");
                     agentStatusTransitTo(host, Status.Event.Ping, _nodeId);
                     return false;
                 } else if (determinedState == Status.Disconnected) {
-                    s_logger.warn("Agent is disconnected but the host is still up: " + host.getId() + "-" + host.getName());
+                    logger.warn("Agent is disconnected but the host is still up: " + host.getId() + "-" + host.getName());
                     if (currentStatus == Status.Disconnected) {
                         if ((System.currentTimeMillis() >> 10) - host.getLastPinged() > AlertWait.value()) {
-                            s_logger.warn("Host " + host.getId() + " has been disconnected past the wait time it should be disconnected.");
+                            logger.warn("Host " + host.getId() + " has been disconnected past the wait time it should be disconnected.");
                             event = Status.Event.WaitedTooLong;
                         } else {
-                            s_logger.debug("Host " + host.getId() + " has been determined to be disconnected but it hasn't passed the wait time yet.");
+                            logger.debug("Host " + host.getId() + " has been determined to be disconnected but it hasn't passed the wait time yet.");
                             return false;
                         }
                     } else if (currentStatus == Status.Up) {
@@ -880,7 +877,7 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl
                             "In availability zone " + host.getDataCenterId() + ", host is in alert state: " + host.getId() + "-" + host.getName());
                 }
             } else {
-                s_logger.debug("The next status of agent " + host.getId() + " is not Alert, no need to investigate what happened");
+                logger.debug("The next status of agent " + host.getId() + " is not Alert, no need to investigate what happened");
             }
         }
         handleDisconnectWithoutInvestigation(attache, event, true, true);
@@ -911,7 +908,7 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl
                     handleDisconnectWithoutInvestigation(_attache, _event, true, false);
                 }
             } catch (final Exception e) {
-                s_logger.error("Exception caught while handling disconnect: ", e);
+                logger.error("Exception caught while handling disconnect: ", e);
             }
         }
     }
@@ -921,34 +918,34 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl
         try {
             final Host h = _hostDao.findById(hostId);
             if (h == null || h.getRemoved() != null) {
-                s_logger.debug("Host with id " + hostId + " doesn't exist");
+                logger.debug("Host with id " + hostId + " doesn't exist");
                 return null;
             }
             final Status status = h.getStatus();
             if (!status.equals(Status.Up) && !status.equals(Status.Connecting)) {
-                s_logger.debug("Can not send command " + cmd + " due to Host " + hostId + " is not up");
+                logger.debug("Can not send command " + cmd + " due to Host " + hostId + " is not up");
                 return null;
             }
             final Answer answer = send(hostId, cmd);
             if (answer == null) {
-                s_logger.warn("send returns null answer");
+                logger.warn("send returns null answer");
                 return null;
             }
 
-            if (s_logger.isDebugEnabled() && answer.getDetails() != null) {
-                s_logger.debug("Details from executing " + cmd.getClass() + ": " + answer.getDetails());
+            if (logger.isDebugEnabled() && answer.getDetails() != null) {
+                logger.debug("Details from executing " + cmd.getClass() + ": " + answer.getDetails());
             }
 
             return answer;
 
         } catch (final AgentUnavailableException e) {
-            s_logger.warn(e.getMessage());
+            logger.warn(e.getMessage());
             return null;
         } catch (final OperationTimedoutException e) {
-            s_logger.warn("Operation timed out: " + e.getMessage());
+            logger.warn("Operation timed out: " + e.getMessage());
             return null;
         } catch (final Exception e) {
-            s_logger.warn("Exception while sending", e);
+            logger.warn("Exception while sending", e);
             return null;
         }
     }
@@ -970,23 +967,23 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl
 
         host = _hostDao.findById(hostId);
         if (host == null || host.getRemoved() != null) {
-            s_logger.warn("Unable to find host " + hostId);
+            logger.warn("Unable to find host " + hostId);
             return false;
         }
 
         if (host.getStatus() == Status.Disconnected) {
-            s_logger.info("Host is already disconnected, no work to be done");
+            logger.info("Host is already disconnected, no work to be done");
             return true;
         }
 
         if (host.getStatus() != Status.Up && host.getStatus() != Status.Alert && host.getStatus() != Status.Rebalancing) {
-            s_logger.info("Unable to disconnect host because it is not in the correct state: host=" + hostId + "; Status=" + host.getStatus());
+            logger.info("Unable to disconnect host because it is not in the correct state: host=" + hostId + "; Status=" + host.getStatus());
             return false;
         }
 
         final AgentAttache attache = findAttache(hostId);
         if (attache == null) {
-            s_logger.info("Unable to disconnect host because it is not connected to this server: " + hostId);
+            logger.info("Unable to disconnect host because it is not connected to this server: " + hostId);
             return false;
         }
 
@@ -996,8 +993,8 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl
 
     public boolean executeUserRequest(final long hostId, final Event event) throws AgentUnavailableException {
         if (event == Event.AgentDisconnected) {
-            if (s_logger.isDebugEnabled()) {
-                s_logger.debug("Received agent disconnect event for host " + hostId);
+            if (logger.isDebugEnabled()) {
+                logger.debug("Received agent disconnect event for host " + hostId);
             }
             AgentAttache attache = null;
             attache = findAttache(hostId);
@@ -1018,7 +1015,7 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl
     }
 
     protected AgentAttache createAttacheForConnect(final HostVO host, final Link link) throws ConnectionException {
-        s_logger.debug("create ConnectedAgentAttache for " + host.getId());
+        logger.debug("create ConnectedAgentAttache for " + host.getId());
         final AgentAttache attache = new ConnectedAgentAttache(this, host.getId(), host.getName(), link, host.isInMaintenanceStates());
         link.attach(attache);
 
@@ -1044,7 +1041,7 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl
                 attache = notifyMonitorsOfConnection(attache, startup, false);
             }
         } catch (final Exception e) {
-            s_logger.debug("Failed to handle host connection: " + e.toString());
+            logger.debug("Failed to handle host connection: " + e.toString());
             ready = new ReadyCommand(null);
             ready.setDetails(e.toString());
         } finally {
@@ -1061,7 +1058,7 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl
                 easySend(attache.getId(), ready);
             }
         } catch (final Exception e) {
-            s_logger.debug("Failed to send ready command:" + e.toString());
+            logger.debug("Failed to send ready command:" + e.toString());
         }
         return attache;
     }
@@ -1080,28 +1077,28 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl
         @Override
         protected void runInContext() {
             try {
-                if (s_logger.isDebugEnabled()) {
-                    s_logger.debug("Simulating start for resource " + resource.getName() + " id " + id);
+                if (logger.isDebugEnabled()) {
+                    logger.debug("Simulating start for resource " + resource.getName() + " id " + id);
                 }
 
                 if (tapLoadingAgents(id, TapAgentsAction.Add)) {
                     try {
                         final AgentAttache agentattache = findAttache(id);
                         if (agentattache == null) {
-                            s_logger.debug("Creating agent for host " + id);
+                            logger.debug("Creating agent for host " + id);
                             _resourceMgr.createHostAndAgent(id, resource, details, false, null, false);
-                            s_logger.debug("Completed creating agent for host " + id);
+                            logger.debug("Completed creating agent for host " + id);
                         } else {
-                            s_logger.debug("Agent already created in another thread for host " + id + ", ignore this");
+                            logger.debug("Agent already created in another thread for host " + id + ", ignore this");
                         }
                     } finally {
                         tapLoadingAgents(id, TapAgentsAction.Del);
                     }
                 } else {
-                    s_logger.debug("Agent creation already getting processed in another thread for host " + id + ", ignore this");
+                    logger.debug("Agent creation already getting processed in another thread for host " + id + ", ignore this");
                 }
             } catch (final Exception e) {
-                s_logger.warn("Unable to simulate start on resource " + id + " name " + resource.getName(), e);
+                logger.warn("Unable to simulate start on resource " + id + " name " + resource.getName(), e);
             }
         }
     }
@@ -1127,7 +1124,7 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl
 
             final AgentAttache attache = handleConnectedAgent(_link, startups, _request);
             if (attache == null) {
-                s_logger.warn("Unable to create attache for agent: " + _request);
+                logger.warn("Unable to create attache for agent: " + _request);
             }
         }
     }
@@ -1149,7 +1146,7 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl
         try {
             link.send(response.toBytes());
         } catch (final ClosedChannelException e) {
-            s_logger.debug("Failed to send startupanswer: " + e.toString());
+            logger.debug("Failed to send startupanswer: " + e.toString());
         }
         _connectExecutor.execute(new HandleAgentConnectTask(link, cmds, request));
     }
@@ -1167,7 +1164,7 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl
 
             if (attache == null) {
                 if (!(cmd instanceof StartupCommand)) {
-                    s_logger.warn("Throwing away a request because it came through as the first command on a connect: " + request);
+                    logger.warn("Throwing away a request because it came through as the first command on a connect: " + request);
                 } else {
                     //submit the task for execution
                     request.logD("Scheduling the first command ");
@@ -1178,17 +1175,17 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl
 
             final long hostId = attache.getId();
 
-            if (s_logger.isDebugEnabled()) {
+            if (logger.isDebugEnabled()) {
                 if (cmd instanceof PingRoutingCommand) {
                     logD = false;
-                    s_logger.debug("Ping from " + hostId);
-                    s_logger.trace("SeqA " + hostId + "-" + request.getSequence() + ": Processing " + request);
+                    logger.debug("Ping from " + hostId);
+                    logger.trace("SeqA " + hostId + "-" + request.getSequence() + ": Processing " + request);
                 } else if (cmd instanceof PingCommand) {
                     logD = false;
-                    s_logger.debug("Ping from " + hostId);
-                    s_logger.trace("SeqA " + attache.getId() + "-" + request.getSequence() + ": Processing " + request);
+                    logger.debug("Ping from " + hostId);
+                    logger.trace("SeqA " + attache.getId() + "-" + request.getSequence() + ": Processing " + request);
                 } else {
-                    s_logger.debug("SeqA " + attache.getId() + "-" + request.getSequence() + ": Processing " + request);
+                    logger.debug("SeqA " + attache.getId() + "-" + request.getSequence() + ": Processing " + request);
                 }
             }
 
@@ -1212,7 +1209,7 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl
                     } else if (cmd instanceof ShutdownCommand) {
                         final ShutdownCommand shutdown = (ShutdownCommand)cmd;
                         final String reason = shutdown.getReason();
-                        s_logger.info("Host " + attache.getId() + " has informed us that it is shutting down with reason " + reason + " and detail " +
+                        logger.info("Host " + attache.getId() + " has informed us that it is shutting down with reason " + reason + " and detail " +
                                 shutdown.getDetail());
                         if (reason.equals(ShutdownCommand.Update)) {
                             //disconnectWithoutInvestigation(attache, Event.UpdateNeeded);
@@ -1250,7 +1247,7 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl
                                         _alertMgr.clearAlert(AlertManager.AlertType.ALERT_TYPE_ROUTING, host.getDataCenterId(), host.getPodId());
                                     }
                                 } else {
-                                    s_logger.debug("Not processing " + PingRoutingCommand.class.getSimpleName() + " for agent id=" + cmdHostId +
+                                    logger.debug("Not processing " + PingRoutingCommand.class.getSimpleName() + " for agent id=" + cmdHostId +
                                             "; can't find the host in the DB");
                                 }
                             }
@@ -1258,8 +1255,8 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl
                         } else if (cmd instanceof ReadyAnswer) {
                             final HostVO host = _hostDao.findById(attache.getId());
                             if (host == null) {
-                                if (s_logger.isDebugEnabled()) {
-                                    s_logger.debug("Cant not find host " + attache.getId());
+                                if (logger.isDebugEnabled()) {
+                                    logger.debug("Cant not find host " + attache.getId());
                                 }
                             }
                             answer = new Answer(cmd);
@@ -1268,33 +1265,33 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl
                         }
                     }
                 } catch (final Throwable th) {
-                    s_logger.warn("Caught: ", th);
+                    logger.warn("Caught: ", th);
                     answer = new Answer(cmd, false, th.getMessage());
                 }
                 answers[i] = answer;
             }
 
             final Response response = new Response(request, answers, _nodeId, attache.getId());
-            if (s_logger.isDebugEnabled()) {
+            if (logger.isDebugEnabled()) {
                 if (logD) {
-                    s_logger.debug("SeqA " + attache.getId() + "-" + response.getSequence() + ": Sending " + response);
+                    logger.debug("SeqA " + attache.getId() + "-" + response.getSequence() + ": Sending " + response);
                 } else {
-                    s_logger.trace("SeqA " + attache.getId() + "-" + response.getSequence() + ": Sending " + response);
+                    logger.trace("SeqA " + attache.getId() + "-" + response.getSequence() + ": Sending " + response);
                 }
             }
             try {
                 link.send(response.toBytes());
             } catch (final ClosedChannelException e) {
-                s_logger.warn("Unable to send response because connection is closed: " + response);
+                logger.warn("Unable to send response because connection is closed: " + response);
             }
         }
 
         protected void processResponse(final Link link, final Response response) {
             final AgentAttache attache = (AgentAttache)link.attachment();
             if (attache == null) {
-                s_logger.warn("Unable to process: " + response);
+                logger.warn("Unable to process: " + response);
             } else if (!attache.processAnswers(response.getSequence(), response)) {
-                s_logger.info("Host " + attache.getId() + " - Seq " + response.getSequence() + ": Response is not processed: " + response);
+                logger.info("Host " + attache.getId() + " - Seq " + response.getSequence() + ": Response is not processed: " + response);
             }
         }
 
@@ -1313,7 +1310,7 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl
                             processRequest(task.getLink(), event);
                         }
                     } catch (final UnsupportedVersionException e) {
-                        s_logger.warn(e.getMessage());
+                        logger.warn(e.getMessage());
                         // upgradeAgent(task.getLink(), data, e.getReason());
                     }
                 } else if (type == Task.Type.CONNECT) {
@@ -1323,7 +1320,7 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl
                     if (attache != null) {
                         disconnectWithInvestigation(attache, Event.AgentDisconnected);
                     } else {
-                        s_logger.info("Connection from " + link.getIpAddress() + " closed but no cleanup was done.");
+                        logger.info("Connection from " + link.getIpAddress() + " closed but no cleanup was done.");
                         link.close();
                         link.terminated();
                     }
@@ -1360,20 +1357,20 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl
     public boolean agentStatusTransitTo(final HostVO host, final Status.Event e, final long msId) {
         try {
             _agentStatusLock.lock();
-            if (status_logger.isDebugEnabled()) {
+            if (logger.isDebugEnabled()) {
                 final ResourceState state = host.getResourceState();
                 final StringBuilder msg = new StringBuilder("Transition:");
                 msg.append("[Resource state = ").append(state);
                 msg.append(", Agent event = ").append(e.toString());
                 msg.append(", Host id = ").append(host.getId()).append(", name = " + host.getName()).append("]");
-                status_logger.debug(msg);
+                logger.debug(msg);
             }
 
             host.setManagementServerId(msId);
             try {
                 return _statusStateMachine.transitTo(host, e, host.getId(), _hostDao);
             } catch (final NoTransitionException e1) {
-                status_logger.debug("Cannot transit agent status with event " + e + " for host " + host.getId() + ", name=" + host.getName() +
+                logger.debug("Cannot transit agent status with event " + e + " for host " + host.getId() + ", name=" + host.getName() +
                         ", mangement server id is " + msId);
                 throw new CloudRuntimeException("Cannot transit agent status with event " + e + " for host " + host.getId() + ", mangement server id is " + msId + "," +
                         e1.getMessage());
@@ -1404,7 +1401,7 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl
     protected boolean isHostOwnerSwitched(final long hostId) {
         final HostVO host = _hostDao.findById(hostId);
         if (host == null) {
-            s_logger.warn("Can't find the host " + hostId);
+            logger.warn("Can't find the host " + hostId);
             return false;
         }
         return isHostOwnerSwitched(host);
@@ -1429,7 +1426,7 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl
         } else {
             /* Agent is still in connecting process, don't allow to disconnect right away */
             if (tapLoadingAgents(hostId, TapAgentsAction.Contains)) {
-                s_logger.info("Host " + hostId + " is being loaded so no disconnects needed.");
+                logger.info("Host " + hostId + " is being loaded so no disconnects needed.");
                 return;
             }
 
@@ -1501,14 +1498,14 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl
     public void pingBy(final long agentId) {
         // Update PingMap with the latest time if agent entry exists in the PingMap
         if (_pingMap.replace(agentId, InaccurateClock.getTimeInSeconds()) == null) {
-            s_logger.info("PingMap for agent: " + agentId + " will not be updated because agent is no longer in the PingMap");
+            logger.info("PingMap for agent: " + agentId + " will not be updated because agent is no longer in the PingMap");
         }
     }
 
     protected class MonitorTask extends ManagedContextRunnable {
         @Override
         protected void runInContext() {
-            s_logger.trace("Agent Monitor is started.");
+            logger.trace("Agent Monitor is started.");
 
             try {
                 final List<Long> behindAgents = findAgentsBehindOnPing();
@@ -1524,17 +1521,17 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl
                              * investigation and direct put agent to
                              * Disconnected
                              */
-                            status_logger.debug("Ping timeout but host " + agentId + " is in resource state of " + resourceState + ", so no investigation");
+                            logger.debug("Ping timeout but host " + agentId + " is in resource state of " + resourceState + ", so no investigation");
                             disconnectWithoutInvestigation(agentId, Event.ShutdownRequested);
                         } else {
                             final HostVO host = _hostDao.findById(agentId);
                             if (host != null && (host.getType() == Host.Type.ConsoleProxy || host.getType() == Host.Type.SecondaryStorageVM
                                     || host.getType() == Host.Type.SecondaryStorageCmdExecutor)) {
 
-                                s_logger.warn("Disconnect agent for CPVM/SSVM due to physical connection close. host: " + host.getId());
+                                logger.warn("Disconnect agent for CPVM/SSVM due to physical connection close. host: " + host.getId());
                                 disconnectWithoutInvestigation(agentId, Event.ShutdownRequested);
                             } else {
-                                status_logger.debug("Ping timeout for host " + agentId + ", do invstigation");
+                                logger.debug("Ping timeout for host " + agentId + ", do invstigation");
                                 disconnectWithInvestigation(agentId, Event.PingTimeout);
                             }
                         }
@@ -1555,10 +1552,10 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl
                     }
                 }
             } catch (final Throwable th) {
-                s_logger.error("Caught the following exception: ", th);
+                logger.error("Caught the following exception: ", th);
             }
 
-            s_logger.trace("Agent Monitor is leaving the building!");
+            logger.trace("Agent Monitor is leaving the building!");
         }
 
         protected List<Long> findAgentsBehindOnPing() {
@@ -1571,7 +1568,7 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl
             }
 
             if (agentsBehind.size() > 0) {
-                s_logger.info("Found the following agents behind on ping: " + agentsBehind);
+                logger.info("Found the following agents behind on ping: " + agentsBehind);
             }
 
             return agentsBehind;


Mime
View raw message