Skip to content

Commit 7f5096a

Browse files
authored
storage: don't select an SSVM that is removed (#3668)
In case an older SSVM is removed without changing it's state from Up to Destroyed/Removed etc, the SSVM may be randomly selected for image store related operations. This fix ensures that endpoints for an image store are found only from a set of SSVM hosts that are not removed. Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
1 parent a9b4da6 commit 7f5096a

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

engine/storage/src/main/java/org/apache/cloudstack/storage/endpoint/DefaultEndPointSelector.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@ private List<HostVO> listUpAndConnectingSecondaryStorageVmHost(Long dcId) {
263263
}
264264
sc.and(sc.entity().getStatus(), Op.IN, Status.Up, Status.Connecting);
265265
sc.and(sc.entity().getType(), Op.EQ, Host.Type.SecondaryStorageVM);
266+
sc.and(sc.entity().getRemoved(), Op.NULL);
266267
return sc.list();
267268
}
268269

0 commit comments

Comments
 (0)