Skip to content

Commit 92cd779

Browse files
vishesh92dhslove
authored andcommitted
Merge branch '4.19'
1 parent 10064a7 commit 92cd779

File tree

13 files changed

+30
-29
lines changed

13 files changed

+30
-29
lines changed

debian/control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Description: CloudStack server library
2424

2525
Package: cloudstack-agent
2626
Architecture: all
27-
Depends: ${python:Depends}, ${python3:Depends}, openjdk-11-jre-headless | java11-runtime-headless | java11-runtime | openjdk-11-jre-headless | zulu-11, cloudstack-common (= ${source:Version}), lsb-base (>= 9), openssh-client, qemu-kvm (>= 2.5) | qemu-system-x86 (>= 5.2), libvirt-bin (>= 1.3) | libvirt-daemon-system (>= 3.0), iproute2, ebtables, vlan, ipset, python3-libvirt, ethtool, iptables, cryptsetup, rng-tools, lsb-release, ufw, apparmor, cpu-checker
27+
Depends: ${python:Depends}, ${python3:Depends}, openjdk-17-jre-headless | java17-runtime-headless | java17-runtime | zulu-17, cloudstack-common (= ${source:Version}), lsb-base (>= 9), openssh-client, qemu-kvm (>= 2.5) | qemu-system-x86 (>= 5.2), libvirt-bin (>= 1.3) | libvirt-daemon-system (>= 3.0), iproute2, ebtables, vlan, ipset, python3-libvirt, ethtool, iptables, cryptsetup, rng-tools, lsb-release, ufw, apparmor, cpu-checker
2828
Recommends: init-system-helpers
2929
Conflicts: cloud-agent, cloud-agent-libs, cloud-agent-deps, cloud-agent-scripts
3030
Description: CloudStack agent

engine/orchestration/src/test/java/org/apache/cloudstack/engine/orchestration/NetworkOrchestratorTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,8 @@ public void setUp() {
138138
when(provider.getCapabilities()).thenReturn(services);
139139
capabilities.put(Network.Capability.DhcpAccrossMultipleSubnets, "true");
140140

141-
when(testOrchastrator._ntwkSrvcDao.getProviderForServiceInNetwork(ArgumentMatchers.anyLong(), ArgumentMatchers.eq(Service.Dhcp))).thenReturn(dhcpProvider);
142-
when(testOrchastrator._networkModel.getElementImplementingProvider(dhcpProvider)).thenReturn(provider);
141+
when(testOrchestrator._ntwkSrvcDao.getProviderForServiceInNetwork(ArgumentMatchers.anyLong(), ArgumentMatchers.eq(Service.Dhcp))).thenReturn(dhcpProvider);
142+
when(testOrchestrator._networkModel.getElementImplementingProvider(dhcpProvider)).thenReturn(provider);
143143

144144
when(guru.getName()).thenReturn(guruName);
145145
List<NetworkGuru> networkGurus = new ArrayList<NetworkGuru>();

engine/schema/src/main/java/com/cloud/vm/dao/VmStatsDaoImpl.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121

2222
import javax.annotation.PostConstruct;
2323

24-
import org.apache.log4j.Logger;
24+
import org.apache.logging.log4j.LogManager;
25+
import org.apache.logging.log4j.Logger;
2526
import org.springframework.stereotype.Component;
2627

2728
import com.cloud.utils.db.Filter;
@@ -34,7 +35,7 @@
3435
@Component
3536
public class VmStatsDaoImpl extends GenericDaoBase<VmStatsVO, Long> implements VmStatsDao {
3637

37-
protected Logger logger = Logger.getLogger(getClass());
38+
protected Logger logger = LogManager.getLogger(getClass());
3839

3940
protected SearchBuilder<VmStatsVO> vmIdSearch;
4041
protected SearchBuilder<VmStatsVO> vmIdTimestampGreaterThanEqualSearch;

engine/storage/datamotion/src/main/java/org/apache/cloudstack/storage/motion/StorageSystemDataMotionStrategy.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -875,7 +875,7 @@ private void handleVolumeMigrationForKVM(VolumeInfo srcVolumeInfo, VolumeInfo de
875875
try {
876876
_volumeService.revokeAccess(destVolumeInfo, hostVO, destVolumeInfo.getDataStore());
877877
} catch (Exception e) {
878-
LOGGER.warn(String.format("Failed to revoke access for volume 'name=%s,uuid=%s' after a migration attempt", destVolumeInfo.getVolume(), destVolumeInfo.getUuid()), e);
878+
logger.warn(String.format("Failed to revoke access for volume 'name=%s,uuid=%s' after a migration attempt", destVolumeInfo.getVolume(), destVolumeInfo.getUuid()), e);
879879
}
880880
}
881881

@@ -961,7 +961,7 @@ private VolumeInfo createTemporaryVolumeCopyOfSnapshotAdaptive(SnapshotInfo snap
961961
_volumeDao.remove(tempVolumeVO.getId());
962962
}
963963
} catch (Throwable e2) {
964-
LOGGER.warn("Failed to delete temporary volume created for copy", e2);
964+
logger.warn("Failed to delete temporary volume created for copy", e2);
965965
}
966966

967967
throw e;
@@ -1009,7 +1009,7 @@ private void handleCopyAsyncToSecondaryStorageAdaptive(SnapshotInfo snapshotInfo
10091009
copyCmdAnswer = (CopyCmdAnswer)agentManager.send(hostVO.getId(), copyCommand);
10101010
} catch (Exception ex) {
10111011
String msg = "Failed to create template from snapshot (Snapshot ID = " + snapshotInfo.getId() + ") : ";
1012-
LOGGER.warn(msg, ex);
1012+
logger.warn(msg, ex);
10131013
throw new CloudRuntimeException(msg + ex.getMessage(), ex);
10141014
}
10151015
finally {
@@ -1023,7 +1023,7 @@ private void handleCopyAsyncToSecondaryStorageAdaptive(SnapshotInfo snapshotInfo
10231023
try {
10241024
srcFinal.getDataStore().getDriver().deleteAsync(srcFinal.getDataStore(), srcFinal, null);
10251025
} catch (Throwable e) {
1026-
LOGGER.warn("Failed to delete temporary volume created for copy", e);
1026+
logger.warn("Failed to delete temporary volume created for copy", e);
10271027
}
10281028
}
10291029

@@ -1893,7 +1893,7 @@ private void createVolumeFromSnapshot(SnapshotInfo snapshotInfo) {
18931893
*/
18941894
private void deleteVolumeFromSnapshot(SnapshotInfo snapshotInfo) {
18951895
try {
1896-
LOGGER.debug("Cleaning up temporary volume created for copy from a snapshot");
1896+
logger.debug("Cleaning up temporary volume created for copy from a snapshot");
18971897

18981898
SnapshotDetailsVO snapshotDetails = handleSnapshotDetails(snapshotInfo.getId(), "delete");
18991899

@@ -1905,7 +1905,7 @@ private void deleteVolumeFromSnapshot(SnapshotInfo snapshotInfo) {
19051905
}
19061906

19071907
} catch (Throwable e) {
1908-
LOGGER.warn("Failed to clean up temporary volume created for copy from a snapshot, transction will not be failed but an adminstrator should clean this up: " + snapshotInfo.getUuid() + " - " + snapshotInfo.getPath(), e);
1908+
logger.warn("Failed to clean up temporary volume created for copy from a snapshot, transction will not be failed but an adminstrator should clean this up: " + snapshotInfo.getUuid() + " - " + snapshotInfo.getPath(), e);
19091909
}
19101910
}
19111911

engine/storage/datamotion/src/test/java/org/apache/cloudstack/storage/motion/StorageSystemDataMotionStrategyTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
import org.mockito.Mock;
4747
import org.mockito.Mockito;
4848
import org.mockito.Spy;
49-
import org.mockito.runners.MockitoJUnitRunner;
49+
import org.mockito.junit.MockitoJUnitRunner;
5050

5151
import com.cloud.agent.api.MigrateCommand;
5252
import com.cloud.host.HostVO;

framework/spring/module/src/main/java/org/apache/cloudstack/spring/module/model/impl/DefaultModuleDefinitionSet.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public void with(ModuleDefinition def, Stack<ModuleDefinition> parents) {
103103
ApplicationContext context = getApplicationContext(moduleDefinitionName);
104104
try {
105105
if (context == null) {
106-
log.warn(String.format("Application context not found for module definition [%s]", moduleDefinitionName));
106+
logger.warn(String.format("Application context not found for module definition [%s]", moduleDefinitionName));
107107
} else if (context.containsBean("moduleStartup")) {
108108
Runnable runnable = context.getBean("moduleStartup", Runnable.class);
109109
logger.info(String.format("Starting module [%s].", moduleDefinitionName));

plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtGetRemoteVmsCommandWrapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public Answer execute(final GetRemoteVmsCommand command, final LibvirtComputingR
5353
try {
5454
Connect conn = LibvirtConnection.getConnection(hypervisorURI);
5555
final List<String> allVmNames = libvirtComputingResource.getAllVmNames(conn);
56-
s_logger.info(String.format("Found %d VMs on the remote host %s", allVmNames.size(), remoteIp));
56+
logger.info(String.format("Found %d VMs on the remote host %s", allVmNames.size(), remoteIp));
5757
for (String name : allVmNames) {
5858
final Domain domain = libvirtComputingResource.getDomain(conn, name);
5959
final DomainInfo.DomainState ps = domain.getInfo().state;

plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ private void checkNetfsStoragePoolMounted(String uuid) {
284284
int mountpointResult = Script.runSimpleBashScriptForExitValue("mountpoint -q " + targetPath);
285285
if (mountpointResult != 0) {
286286
String errMsg = String.format("libvirt failed to mount storage pool %s at %s", uuid, targetPath);
287-
s_logger.error(errMsg);
287+
logger.error(errMsg);
288288
throw new CloudRuntimeException(errMsg);
289289
}
290290
}
@@ -828,11 +828,11 @@ public boolean deleteStoragePool(String uuid) {
828828
// handle ebusy error when pool is quickly destroyed
829829
if (e.toString().contains("exit status 16")) {
830830
String targetPath = _mountPoint + File.separator + uuid;
831-
logger.error("deleteStoragePool removed pool from libvirt, but libvirt had trouble unmounting the pool. Trying umount location " + targetPath +
832-
"again in a few seconds");
831+
logger.error("deleteStoragePool removed pool from libvirt, but libvirt had trouble unmounting the pool. Trying umount location " + targetPath +
832+
" again in a few seconds");
833833
String result = Script.runSimpleBashScript("sleep 5 && umount " + targetPath);
834834
if (result == null) {
835-
logger.error("Succeeded in unmounting " + targetPath);
835+
logger.info("Succeeded in unmounting " + targetPath);
836836
return true;
837837
}
838838
logger.error("Failed to unmount " + targetPath);

plugins/storage/volume/adaptive/src/main/java/org/apache/cloudstack/storage/datastore/driver/AdaptiveDataStoreDriverImpl.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ public void resize(DataObject data, AsyncCompletionCallback<CreateCmdResult> cal
484484
}
485485

486486
public boolean grantAccess(DataObject dataObject, Host host, DataStore dataStore) {
487-
s_logger.debug("Granting host " + host.getName() + " access to volume " + dataObject.getUuid());
487+
logger.debug("Granting host " + host.getName() + " access to volume " + dataObject.getUuid());
488488

489489
try {
490490
StoragePoolVO storagePool = _storagePoolDao.findById(dataObject.getDataStore().getId());
@@ -502,11 +502,11 @@ public boolean grantAccess(DataObject dataObject, Host host, DataStore dataStore
502502
persistVolumeOrTemplateData(storagePool, details, dataObject, vol, connIdMap);
503503

504504

505-
s_logger.info("Granted host " + host.getName() + " access to volume " + dataObject.getUuid());
505+
logger.info("Granted host " + host.getName() + " access to volume " + dataObject.getUuid());
506506
return true;
507507
} catch (Throwable e) {
508508
String msg = "Error granting host " + host.getName() + " access to volume " + dataObject.getUuid() + ":" + e.getMessage();
509-
s_logger.error(msg);
509+
logger.error(msg);
510510
throw new CloudRuntimeException(msg, e);
511511
}
512512
}
@@ -517,7 +517,7 @@ public void revokeAccess(DataObject dataObject, Host host, DataStore dataStore)
517517
return;
518518
}
519519

520-
s_logger.debug("Revoking access for host " + host.getName() + " to volume " + dataObject.getUuid());
520+
logger.debug("Revoking access for host " + host.getName() + " to volume " + dataObject.getUuid());
521521

522522
try {
523523
StoragePoolVO storagePool = _storagePoolDao.findById(dataObject.getDataStore().getId());
@@ -535,10 +535,10 @@ public void revokeAccess(DataObject dataObject, Host host, DataStore dataStore)
535535
Map<String,String> connIdMap = api.getConnectionIdMap(dataIn);
536536
persistVolumeOrTemplateData(storagePool, details, dataObject, vol, connIdMap);
537537

538-
s_logger.info("Revoked access for host " + host.getName() + " to volume " + dataObject.getUuid());
538+
logger.info("Revoked access for host " + host.getName() + " to volume " + dataObject.getUuid());
539539
} catch (Throwable e) {
540540
String msg = "Error revoking access for host " + host.getName() + " to volume " + dataObject.getUuid() + ":" + e.getMessage();
541-
s_logger.error(msg);
541+
logger.error(msg);
542542
throw new CloudRuntimeException(msg, e);
543543
}
544544
}

server/src/main/java/com/cloud/hypervisor/kvm/discoverer/LibvirtServerDiscoverer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ protected boolean isHostOsCompatibleWithOtherHost(String hostOsInCluster, String
493493
return true;
494494
}
495495
if (COMPATIBLE_HOST_OSES.contains(hostOsInCluster) && COMPATIBLE_HOST_OSES.contains(hostOs)) {
496-
s_logger.info(String.format("The host OS (%s) is compatible with the existing host OS (%s) in the cluster.", hostOs, hostOsInCluster));
496+
logger.info(String.format("The host OS (%s) is compatible with the existing host OS (%s) in the cluster.", hostOs, hostOsInCluster));
497497
return true;
498498
}
499499
return false;

0 commit comments

Comments
 (0)