DK101010 commented on a change in pull request #4548:
URL: https://github.com/apache/cloudstack/pull/4548#discussion_r557432642
##########
File path:
plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource/VmwareResource.java
##########
@@ -7274,9 +7277,7 @@ public int compare(final UnmanagedInstanceTO.Disk disk1,
final UnmanagedInstance
}
int extractInt(UnmanagedInstanceTO.Disk disk) {
- String num = disk.getLabel().replaceAll("\\D", "");
- // return 0 if no digits found
- return num.isEmpty() ? 0 : Integer.parseInt(num);
+ return disk.getPosition() + (disk.getControllerUnit() *
100);
Review comment:
Hi @shwstppr, I talked with my team about this behavior. First, your
controller ids are correct. Increments are per controller type. For this reason
is my implementation not better as the old one. Perhaps we could check in the
sort algorithm if device type == scsi controller, but then it isn't no longer
possible to boot from other controller types. It exist no safety way to find
out which disk is bootable. The only way to get sure that CS use the right
volume is that the user indicates during the ingest process via rest call which
volume is the right. Therefore I think we should close this pull request. What
do you think?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]