Set nfsVersion in ssvm agent.properties only if it is not null (#12445)

This commit is contained in:
Abhisar Sinha 2026-01-20 12:55:16 +05:30 committed by GitHub
parent da518e9036
commit cf36fb0000
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 2 deletions

View File

@ -1224,8 +1224,10 @@ public class SecondaryStorageManagerImpl extends ManagerBase implements Secondar
if (dc.getDns2() != null) {
buf.append(" dns2=").append(dc.getDns2());
}
String nfsVersion = imageStoreDetailsUtil != null ? imageStoreDetailsUtil.getNfsVersion(secStores.get(0).getId()) : null;
buf.append(" nfsVersion=").append(nfsVersion);
String nfsVersion = imageStoreDetailsUtil.getNfsVersion(secStores.get(0).getId());
if (StringUtils.isNotBlank(nfsVersion)) {
buf.append(" nfsVersion=").append(nfsVersion);
}
buf.append(" keystore_password=").append(VirtualMachineGuru.getEncodedString(PasswordGenerator.generateRandomPassword(16)));
String bootArgs = buf.toString();
if (logger.isDebugEnabled()) {