This is an automated email from the ASF dual-hosted git repository.
dahn pushed a commit to branch 4.18
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/4.18 by this push:
new 7affbb1dacf protect against null-path (#8915)
7affbb1dacf is described below
commit 7affbb1dacf709424b33f30a5305c44ea201acd4
Author: dahn <[email protected]>
AuthorDate: Fri Apr 19 12:23:31 2024 +0200
protect against null-path (#8915)
Co-authored-by: Vladimir Dombrovski <[email protected]>
Co-authored-by: Vishesh <[email protected]>
Co-authored-by: Suresh Kumar Anaparti <[email protected]>
---
.../java/com/cloud/hypervisor/vmware/resource/VmwareResource.java | 5 ++++-
systemvm/debian/etc/logrotate.d/haproxy | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git
a/plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource/VmwareResource.java
b/plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource/VmwareResource.java
index b65a7847675..0612ed70510 100644
---
a/plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource/VmwareResource.java
+++
b/plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource/VmwareResource.java
@@ -3066,7 +3066,10 @@ public class VmwareResource extends ServerResourceBase
implements StoragePoolRes
}
private String appendFileType(String path, String fileType) {
- if (path.toLowerCase().endsWith(fileType.toLowerCase())) {
+ if (StringUtils.isBlank(path)) {
+ throw new CloudRuntimeException("No path given, cannot append
filetype " + fileType);
+ }
+ if (fileType == null ||
path.toLowerCase().endsWith(fileType.toLowerCase())) {
return path;
}
diff --git a/systemvm/debian/etc/logrotate.d/haproxy
b/systemvm/debian/etc/logrotate.d/haproxy
index 464209791a3..a6b72b6f77a 100644
--- a/systemvm/debian/etc/logrotate.d/haproxy
+++ b/systemvm/debian/etc/logrotate.d/haproxy
@@ -4,6 +4,6 @@
notifempty
maxsize 10M
postrotate
- /bin/kill -HUP `cat /var/run/rsyslog.pid 2> /dev/null` 2> /dev/null ||
true
+ /usr/lib/rsyslog/rsyslog-rotate
endscript
}