Skip to content

Commit 001f320

Browse files
shwstpprweizhouapache
authored andcommitted
return if okay
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
1 parent bbb7f3e commit 001f320

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1980,7 +1980,7 @@ protected Pair<String, String> getNextVmHostAndDisplayName(AutoScaleVmGroupVO as
19801980
// Truncate vm group name because max length of vm name is 63
19811981
int subStringLength = Math.min(asGroup.getName().length(), 63 - VM_HOSTNAME_PREFIX.length() - vmHostNameSuffix.length());
19821982
String name = VM_HOSTNAME_PREFIX + asGroup.getName().substring(0, subStringLength) + vmHostNameSuffix;
1983-
if (!isWindows) {
1983+
if (!isWindows || name.length() <= 15) {
19841984
return new Pair<>(name, name);
19851985
}
19861986
String hostName = name.substring(Math.max(0, name.length() - 15));

0 commit comments

Comments
 (0)