#NEWLINE# def Exec( self , feedback_fn ) : #NEWLINE# #INDENT# 'Start the instance.\n\n    ' #NEWLINE# if ( not self . op . no_remember ) : #NEWLINE# #INDENT# self . instance = self . cfg . MarkInstanceUp ( self . instance . uuid ) #NEWLINE# #UNINDENT# if self . primary_offline : #NEWLINE# #INDENT# assert self . op . ignore_offline_nodes #NEWLINE# self . LogInfo ( 'Primary node offline, marked instance as started' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if self . requires_cleanup : #NEWLINE# #INDENT# result = self . rpc . call_instance_shutdown ( self . instance . primary_node , self . instance , self . op . shutdown_timeout , self . op . reason ) #NEWLINE# result . Raise ( ( "Could not shutdown instance '%s'" % self . instance . name ) ) #NEWLINE# ShutdownInstanceDisks ( self , self . instance ) #NEWLINE# #UNINDENT# StartInstanceDisks ( self , self . instance , self . op . force ) #NEWLINE# self . instance = self . cfg . GetInstanceInfo ( self . instance . uuid ) #NEWLINE# result = self . rpc . call_instance_start ( self . instance . primary_node , ( self . instance , self . op . hvparams , self . op . beparams ) , self . op . startup_paused , self . op . reason ) #NEWLINE# if result . fail_msg : #NEWLINE# #INDENT# ShutdownInstanceDisks ( self , self . instance ) #NEWLINE# result . Raise ( ( "Could not start instance '%s'" % self . instance . name ) )