File tree Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -156,12 +156,20 @@ let release_locks ~__context =
156156      Xapi_vm_lifecycle. force_state_reset ~__context ~self  ~value: `Halted 
157157    )
158158    vms ;
159-   (*  All VMs should have their scheduled_to_be_resident_on field cleared *) 
160-   List. iter
161-     (fun  self  ->
162-       Db.VM. set_scheduled_to_be_resident_on ~__context ~self  ~value: Ref. null
163-     )
164-     (Db.VM. get_all ~__context)
159+   (*  Clear all assignments that are only scheduled *) 
160+   let  value =  Ref. null in 
161+   Db.VM. get_all ~__context
162+   |>  List. iter (fun  self  ->
163+          Db.VM. set_scheduled_to_be_resident_on ~__context ~self  ~value 
164+      ) ;
165+   Db.PCI. get_all ~__context
166+   |>  List. iter (fun  self  ->
167+          Db.PCI. set_scheduled_to_be_attached_to ~__context ~self  ~value 
168+      ) ;
169+   Db.VGPU. get_all ~__context
170+   |>  List. iter (fun  self  ->
171+          Db.VGPU. set_scheduled_to_be_resident_on ~__context ~self  ~value 
172+      )
165173
166174let  create_tools_sr  __context  name_label  name_description  sr_introduce 
167175    maybe_create_pbd  = 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments