def _log_compute_error(instance_uuid, retry):
 exc = retry.get('exc')
 if (not exc):
  return
 hosts = retry.get('hosts', None)
 if (not hosts):
  return
 (last_host, last_node) = hosts[(-1)]
 LOG.error(_LE('Error from last host: %(last_host)s (node %(last_node)s): %(exc)s'), {'last_host': last_host, 'last_node': last_node, 'exc': exc}, instance_uuid=instance_uuid)

def _log_compute_error ( instance_uuid , retry ) : exc = retry . get ( 'exc' ) if ( not exc ) : return hosts = retry . get ( 'hosts' , None ) if ( not hosts ) : return ( last_host , last_node ) = hosts [ ( - 1 ) ] LOG . error ( _LE ( 'Error from last host: %(last_host)s (node %(last_node)s): %(exc)s' ) , { 'last_host' : last_host , 'last_node' : last_node , 'exc' : exc } , instance_uuid = instance_uuid )
if the request contained an exception from a previous compute build/resize operation .