From c3e1775eb0c64adc6eb117906f0a67c50022fcd3 Mon Sep 17 00:00:00 2001 From: Harikrishna Patnala Date: Tue, 30 Mar 2021 15:24:57 +0530 Subject: [PATCH] Log messages and API name fixing --- server/src/main/java/com/cloud/storage/StorageManagerImpl.java | 3 ++- tools/apidoc/gen_toc.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/server/src/main/java/com/cloud/storage/StorageManagerImpl.java b/server/src/main/java/com/cloud/storage/StorageManagerImpl.java index a21dfe06a49..76faee0726b 100644 --- a/server/src/main/java/com/cloud/storage/StorageManagerImpl.java +++ b/server/src/main/java/com/cloud/storage/StorageManagerImpl.java @@ -1791,6 +1791,7 @@ public class StorageManagerImpl extends ManagerBase implements StorageManager, C if (hostId == null) { hostId = vmInstance.getLastHostId(); } + HostVO hostVO = _hostDao.findById(hostId); // Prepare for the syncvolumepath command DataTO volTO = volFactory.getVolume(volume.getId()).getTO(); @@ -1799,6 +1800,7 @@ public class StorageManagerImpl extends ManagerBase implements StorageManager, C details.put(DiskTO.PROTOCOL_TYPE, Storage.StoragePoolType.DatastoreCluster.toString()); disk.setDetails(details); + s_logger.debug(String.format("Attempting to process SyncVolumePathCommand for the volume %d on the host %d with state %s", volumeId, hostId, hostVO.getResourceState())); SyncVolumePathCommand cmd = new SyncVolumePathCommand(disk); final Answer answer = _agentMgr.easySend(hostId, cmd); // validate answer @@ -1806,7 +1808,6 @@ public class StorageManagerImpl extends ManagerBase implements StorageManager, C throw new CloudRuntimeException("Unable to get an answer to the SyncVolumePath command for volume " + volumeId); } if (!answer.getResult()) { - String msg = "Unable to process SyncVolumePathCommand for the volume" + volumeId + " to the host" + hostId; throw new CloudRuntimeException("Unable to process SyncVolumePathCommand for the volume" + volumeId + " to the host " + hostId + " due to " + answer.getDetails()); } assert (answer instanceof SyncVolumePathAnswer) : "Well, now why won't you actually return the SyncVolumePathAnswer when it's SyncVolumePathCommand? volume=" + diff --git a/tools/apidoc/gen_toc.py b/tools/apidoc/gen_toc.py index 09d3586a930..f3bb57a01a8 100644 --- a/tools/apidoc/gen_toc.py +++ b/tools/apidoc/gen_toc.py @@ -95,7 +95,7 @@ known_categories = { 'StorageMaintenance': 'Storage Pool', 'StoragePool': 'Storage Pool', 'StorageProvider': 'Storage Pool', - 'SyncStoragePool': 'Storage Pool', + 'syncStoragePool': 'Storage Pool', 'SecurityGroup': 'Security Group', 'SSH': 'SSH', 'register': 'Registration',