Skip to content

Commit beb0422

Browse files
skattoju3DaanHoogland
authored andcommitted
fix incorrect iscsi path stat for managed storage (#3181)
## Description The issue was that an Incorrect iscsi path was being passed for managed storage pools when collecting volume stats. Storage pools normally have a UUID based path while managed storage pools require an IQN based path
1 parent 4985e57 commit beb0422

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

server/src/main/java/com/cloud/server/StatsCollector.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -928,7 +928,11 @@ protected void runInContext() {
928928
List<String> volumeLocators = new ArrayList<String>();
929929
for (VolumeVO volume : volumes) {
930930
if (volume.getFormat() == ImageFormat.QCOW2) {
931-
volumeLocators.add(volume.getUuid());
931+
if (pool.isManaged()) {
932+
volumeLocators.add(volume.getPath());
933+
} else {
934+
volumeLocators.add(volume.getUuid());
935+
}
932936
} else if (volume.getFormat() == ImageFormat.VHD) {
933937
volumeLocators.add(volume.getPath());
934938
} else if (volume.getFormat() == ImageFormat.OVA) {

0 commit comments

Comments
 (0)