Set state back to start in both migrate fail cases
This commit is contained in:
		@@ -81,8 +81,8 @@ class VMInstance:
 | 
				
			|||||||
            if dest_conn == None:
 | 
					            if dest_conn == None:
 | 
				
			||||||
                raise
 | 
					                raise
 | 
				
			||||||
        except:
 | 
					        except:
 | 
				
			||||||
            self.zk.set(self.zkey + '/state', 'start'.encode('ascii'))
 | 
					 | 
				
			||||||
            print('Failed to open connection to qemu+ssh://%s/system' % target)
 | 
					            print('Failed to open connection to qemu+ssh://%s/system' % target)
 | 
				
			||||||
 | 
					            self.zk.set(self.zkey + '/state', 'start'.encode('ascii'))
 | 
				
			||||||
            return
 | 
					            return
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        try:
 | 
					        try:
 | 
				
			||||||
@@ -90,7 +90,8 @@ class VMInstance:
 | 
				
			|||||||
            if target_dom == None:
 | 
					            if target_dom == None:
 | 
				
			||||||
                raise
 | 
					                raise
 | 
				
			||||||
        except:
 | 
					        except:
 | 
				
			||||||
            print('Could not migrate to the new domain')
 | 
					            print('Could not migrate to the new domain; forcing away uncleanly')
 | 
				
			||||||
 | 
					            self.zk.set(self.zkey + '/state', 'start'.encode('ascii'))
 | 
				
			||||||
            self.stop_vm()
 | 
					            self.stop_vm()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        self.thishypervisor.domain_list.remove(self.domuuid)
 | 
					        self.thishypervisor.domain_list.remove(self.domuuid)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user