You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by da...@apache.org on 2024/09/09 13:51:53 UTC
(cloudstack) branch main updated: merge conflict (in loggers)
This is an automated email from the ASF dual-hosted git repository.
dahn pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/main by this push:
new b068c68bffb merge conflict (in loggers)
b068c68bffb is described below
commit b068c68bffb4bc34b5a91ce1ba995164848f5e67
Author: Daan Hoogland <da...@onecht.net>
AuthorDate: Mon Sep 9 15:51:43 2024 +0200
merge conflict (in loggers)
---
.../kvm/storage/LinstorStorageAdaptor.java | 25 ++++++++++------------
1 file changed, 11 insertions(+), 14 deletions(-)
diff --git a/plugins/storage/volume/linstor/src/main/java/com/cloud/hypervisor/kvm/storage/LinstorStorageAdaptor.java b/plugins/storage/volume/linstor/src/main/java/com/cloud/hypervisor/kvm/storage/LinstorStorageAdaptor.java
index 13bd89bd380..fabe2ab3536 100644
--- a/plugins/storage/volume/linstor/src/main/java/com/cloud/hypervisor/kvm/storage/LinstorStorageAdaptor.java
+++ b/plugins/storage/volume/linstor/src/main/java/com/cloud/hypervisor/kvm/storage/LinstorStorageAdaptor.java
@@ -154,8 +154,7 @@ public class LinstorStorageAdaptor implements StorageAdaptor {
public KVMStoragePool createStoragePool(String name, String host, int port, String path, String userInfo,
Storage.StoragePoolType type, Map<String, String> details)
{
- logger.debug(String.format(
- "Linstor createStoragePool: name: '%s', host: '%s', path: %s, userinfo: %s", name, host, path, userInfo));
+ logger.debug("Linstor createStoragePool: name: '{}', host: '{}', path: {}, userinfo: {}", name, host, path, userInfo);
LinstorStoragePool storagePool = new LinstorStoragePool(name, host, port, userInfo, type, this);
MapStorageUuidToStoragePool.put(name, storagePool);
@@ -190,7 +189,7 @@ public class LinstorStorageAdaptor implements StorageAdaptor {
public KVMPhysicalDisk createPhysicalDisk(String name, KVMStoragePool pool, QemuImg.PhysicalDiskFormat format,
Storage.ProvisioningType provisioningType, long size, byte[] passphrase)
{
- logger.debug(String.format("Linstor.createPhysicalDisk: %s;%s", name, format));
+ logger.debug("Linstor.createPhysicalDisk: {};{}", name, format);
final String rscName = getLinstorRscName(name);
LinstorStoragePool lpool = (LinstorStoragePool) pool;
final DevelopersApi api = getLinstorAPI(pool);
@@ -231,7 +230,7 @@ public class LinstorStorageAdaptor implements StorageAdaptor {
throw new CloudRuntimeException("Linstor: viewResources didn't return resources or volumes.");
}
} catch (ApiException apiEx) {
- logger.error(String.format("Linstor.createPhysicalDisk: ApiException: %s", apiEx.getBestMessage()));
+ logger.error("Linstor.createPhysicalDisk: ApiException: {}", apiEx.getBestMessage());
throw new CloudRuntimeException(apiEx.getBestMessage(), apiEx);
}
}
@@ -254,9 +253,8 @@ public class LinstorStorageAdaptor implements StorageAdaptor {
rcm.setOverrideProps(props);
ApiCallRcList answers = api.resourceConnectionModify(rscName, inUseNode, localNodeName, rcm);
if (answers.hasError()) {
- logger.error(String.format(
- "Unable to set protocol C and 'allow-two-primaries' on %s/%s/%s",
- inUseNode, localNodeName, rscName));
+ logger.error("Unable to set protocol C and 'allow-two-primaries' on {}/{}/{}",
+ inUseNode, localNodeName, rscName);
// do not fail here as adding allow-two-primaries property is only a problem while live migrating
}
}
@@ -265,7 +263,7 @@ public class LinstorStorageAdaptor implements StorageAdaptor {
@Override
public boolean connectPhysicalDisk(String volumePath, KVMStoragePool pool, Map<String, String> details)
{
- logger.debug(String.format("Linstor: connectPhysicalDisk %s:%s -> %s", pool.getUuid(), volumePath, details));
+ logger.debug("Linstor: connectPhysicalDisk {}:{} -> {}", pool.getUuid(), volumePath, details);
if (volumePath == null) {
logger.warn("volumePath is null, ignoring");
return false;
@@ -304,11 +302,10 @@ public class LinstorStorageAdaptor implements StorageAdaptor {
rcm.deleteProps(deleteProps);
ApiCallRcList answers = api.resourceConnectionModify(rscName, localNodeName, inUseNode, rcm);
if (answers.hasError()) {
- logger.error(
- String.format("Failed to remove 'protocol' and 'allow-two-primaries' on %s/%s/%s: %s",
+ logger.error("Failed to remove 'protocol' and 'allow-two-primaries' on {}/{}/{}: {}",
localNodeName,
inUseNode,
- rscName, LinstorUtil.getBestErrorMessage(answers)));
+ rscName, LinstorUtil.getBestErrorMessage(answers));
// do not fail here as removing allow-two-primaries property isn't fatal
}
}
@@ -512,7 +509,7 @@ public class LinstorStorageAdaptor implements StorageAdaptor {
@Override
public KVMPhysicalDisk copyPhysicalDisk(KVMPhysicalDisk disk, String name, KVMStoragePool destPools, int timeout, byte[] srcPassphrase, byte[] destPassphrase, Storage.ProvisioningType provisioningType)
{
- logger.debug(String.format("Linstor.copyPhysicalDisk: %s -> %s", disk.getPath(), name));
+ logger.debug("Linstor.copyPhysicalDisk: {} -> {}", disk.getPath(), name);
final QemuImg.PhysicalDiskFormat sourceFormat = disk.getFormat();
final String sourcePath = disk.getPath();
@@ -526,11 +523,11 @@ public class LinstorStorageAdaptor implements StorageAdaptor {
try {
LinstorUtil.applyAuxProps(api, rscName, disk.getDispName(), disk.getVmName());
} catch (ApiException apiExc) {
- s_logger.error(String.format("Error setting aux properties for %s", rscName));
+ logger.error("Error setting aux properties for {}", rscName);
logLinstorAnswers(apiExc.getApiCallRcList());
}
- logger.debug(String.format("Linstor.copyPhysicalDisk: dstPath: %s", dstDisk.getPath()));
+ logger.debug("Linstor.copyPhysicalDisk: dstPath: {}", dstDisk.getPath());
final QemuImgFile destFile = new QemuImgFile(dstDisk.getPath());
destFile.setFormat(dstDisk.getFormat());
destFile.setSize(disk.getVirtualSize());