File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -181,6 +181,8 @@ func (c *Base) CreateClone(cloneRequest *types.CloneCreateRequest) (*models.Clon
181181 AvailableDB : cloneRequest .DB .DBName ,
182182 }
183183
184+ c .incrementCloneNumber (clone .Snapshot .ID )
185+
184186 go func () {
185187 session , err := c .provision .StartSession (clone .Snapshot .ID , ephemeralUser , cloneRequest .ExtraConf )
186188 if err != nil {
@@ -216,7 +218,6 @@ func (c *Base) fillCloneSession(cloneID string, session *resources.Session) {
216218
217219 w .Session = session
218220 w .TimeStartedAt = time .Now ()
219- c .incrementCloneNumber (w .Clone .Snapshot .ID )
220221
221222 clone := w .Clone
222223 clone .Status = models.Status {
@@ -621,8 +622,11 @@ func (c *Base) isIdleClone(wrapper *CloneWrapper) (bool, error) {
621622
622623 session := wrapper .Session
623624
624- // TODO(akartasov): Remove wrappers without session.
625625 if session == nil {
626+ if wrapper .Clone .Status .Code == models .StatusFatal {
627+ return true , nil
628+ }
629+
626630 return false , errors .New ("failed to get clone session" )
627631 }
628632
You can’t perform that action at this time.
0 commit comments