@@ -202,7 +202,6 @@ def all_failed(*, reservations: ReservationSet) -> bool:
202202 """
203203 We don't introduce a special state to flag when a slice is ALL FAILED, however this helper function helps decide
204204 when to GC a slice
205-
206205 @return true or false
207206 """
208207 bins = StateBins ()
@@ -252,7 +251,7 @@ def transition_slice(self, *, operation: SliceOperation, reservations: Reservati
252251 bins .add (s = r .get_state ())
253252
254253 if self .state == SliceState .Nascent or self .state == SliceState .Configuring :
255- if not bins .has_state_other_than (ReservationStates .Active ):
254+ if not bins .has_state_other_than (ReservationStates .Active , ReservationStates . Closed ):
256255 self .state = SliceState .StableOK
257256
258257 if (not bins .has_state_other_than (ReservationStates .Active , ReservationStates .Failed ,
@@ -265,7 +264,7 @@ def transition_slice(self, *, operation: SliceOperation, reservations: Reservati
265264 self .state = SliceState .Closing
266265
267266 elif self .state == SliceState .Modifying :
268- if not bins .has_state_other_than (ReservationStates .Active ):
267+ if not bins .has_state_other_than (ReservationStates .Active , ReservationStates . Closed ):
269268 self .state = SliceState .ModifyOK
270269
271270 if (not bins .has_state_other_than (ReservationStates .Active , ReservationStates .Failed ,
@@ -300,4 +299,4 @@ def get_state(self) -> SliceState:
300299 return self .state
301300
302301 def clear (self ):
303- self .state = SliceState .Nascent
302+ self .state = SliceState .Nascent
0 commit comments