Skip to content

Commit 16240b9

Browse files
committed
return if okay
Signed-off-by: Abhishek Kumar <[email protected]>
1 parent 4c9ff4c commit 16240b9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/src/main/java/com/cloud/network/as/AutoScaleManagerImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1969,7 +1969,7 @@ protected Pair<String, String> getNextVmHostAndDisplayName(AutoScaleVmGroupVO as
19691969
// Truncate vm group name because max length of vm name is 63
19701970
int subStringLength = Math.min(asGroup.getName().length(), 63 - VM_HOSTNAME_PREFIX.length() - vmHostNameSuffix.length());
19711971
String name = VM_HOSTNAME_PREFIX + asGroup.getName().substring(0, subStringLength) + vmHostNameSuffix;
1972-
if (!isWindows) {
1972+
if (!isWindows || name.length() <= 15) {
19731973
return new Pair<>(name, name);
19741974
}
19751975
String hostName = name.substring(Math.max(0, name.length() - 15));

0 commit comments

Comments
 (0)