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 865da730e55 log sanitation on output of jobs (#8890)
865da730e55 is described below
commit 865da730e5507cd0f6339214f5c2a689d9b0701e
Author: dahn <[email protected]>
AuthorDate: Tue Apr 23 12:19:22 2024 +0200
log sanitation on output of jobs (#8890)
---
.../cloudstack/storage/resource/NfsSecondaryStorageResource.java | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git
a/services/secondary-storage/server/src/main/java/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java
b/services/secondary-storage/server/src/main/java/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java
index af422f1ab4f..074827a9852 100644
---
a/services/secondary-storage/server/src/main/java/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java
+++
b/services/secondary-storage/server/src/main/java/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java
@@ -86,7 +86,6 @@ import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.FilenameUtils;
import org.apache.commons.lang3.BooleanUtils;
-import org.apache.commons.lang3.StringUtils;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
@@ -169,6 +168,7 @@ import com.cloud.utils.EncryptionUtil;
import com.cloud.utils.LogUtils;
import com.cloud.utils.NumbersUtil;
import com.cloud.utils.Pair;
+import com.cloud.utils.StringUtils;
import com.cloud.utils.SwiftUtil;
import com.cloud.utils.exception.CloudRuntimeException;
import com.cloud.utils.net.NetUtils;
@@ -3106,9 +3106,8 @@ public class NfsSecondaryStorageResource extends
ServerResourceBase implements S
extraOpts.append(name + "=" + nvp.getValue() + ",");
}
- if (logger.isDebugEnabled()) {
- logger.error("extraOpts now " + extraOpts);
- }
+ String extraOptions = extraOpts.toString();
+ logger.debug("extraOpts now ",
()->StringUtils.cleanString(extraOptions));
if (!foundUser || !foundPswd) {
String errMsg = "Missing user and password from URI. Make sure
they" + "are in the query string and separated by '&'. E.g. "
@@ -3116,7 +3115,7 @@ public class NfsSecondaryStorageResource extends
ServerResourceBase implements S
logger.error(errMsg);
throw new CloudRuntimeException(errMsg);
}
- return extraOpts.toString();
+ return extraOptions;
}
protected boolean mountExists(String localRootPath, URI uri) {