mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
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>
This commit is contained in:
parent
a9b4da621e
commit
7f5096a4d0
@ -263,6 +263,7 @@ public class DefaultEndPointSelector implements EndPointSelector {
|
||||
}
|
||||
sc.and(sc.entity().getStatus(), Op.IN, Status.Up, Status.Connecting);
|
||||
sc.and(sc.entity().getType(), Op.EQ, Host.Type.SecondaryStorageVM);
|
||||
sc.and(sc.entity().getRemoved(), Op.NULL);
|
||||
return sc.list();
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user