Skip to content

Commit 722c2e3

Browse files
committed
set nfsVersion in ssvm agent.properties only if it is not null
1 parent 56a39e6 commit 722c2e3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

services/secondary-storage/controller/src/main/java/org/apache/cloudstack/secondarystorage/SecondaryStorageManagerImpl.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1225,7 +1225,9 @@ public boolean finalizeVirtualMachineProfile(VirtualMachineProfile profile, Depl
12251225
buf.append(" dns2=").append(dc.getDns2());
12261226
}
12271227
String nfsVersion = imageStoreDetailsUtil != null ? imageStoreDetailsUtil.getNfsVersion(secStores.get(0).getId()) : null;
1228-
buf.append(" nfsVersion=").append(nfsVersion);
1228+
if (nfsVersion != null) {
1229+
buf.append(" nfsVersion=").append(nfsVersion);
1230+
}
12291231
buf.append(" keystore_password=").append(VirtualMachineGuru.getEncodedString(PasswordGenerator.generateRandomPassword(16)));
12301232
String bootArgs = buf.toString();
12311233
if (logger.isDebugEnabled()) {

0 commit comments

Comments
 (0)