← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1343858] Re: build/resize retry behavior not consistent

 

** Changed in: nova
       Status: In Progress => Opinion

** Changed in: nova
   Importance: Undecided => Wishlist

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1343858

Title:
  build/resize retry behavior not consistent

Status in OpenStack Compute (Nova):
  Opinion

Bug description:
  nova/schedule/utils.py:

  Case1: when CONF.scheduler_max_attempts >1,  if the request contained an exception from a previous compute build/resize operation, the exception message would be logged in conductor.log
  Case2:when CONF.scheduler_max_attempts ==1,  if the request contained an exception from a previous compute build/resize operation, the exception message would        not             be logged in conductor.log

  I think this two case should keep consistent behavior even this may
  not cause something wrong, just for Strict code

  
  def populate_retry(filter_properties, instance_uuid):
      max_attempts = _max_attempts()
      force_hosts = filter_properties.get('force_hosts', [])
      force_nodes = filter_properties.get('force_nodes', [])

      if max_attempts == 1 or force_hosts or force_nodes:
          # re-scheduling is disabled.
          return

      # retry is enabled, update attempt count:
      retry = filter_properties.setdefault(
          'retry', {
              'num_attempts': 0,
              'hosts': []  # list of compute hosts tried
      })
      retry['num_attempts'] += 1

      _log_compute_error(instance_uuid, retry)  <<< would not run here
  when  max_attempts == 1

      if retry['num_attempts'] > max_attempts:
          exc = retry.pop('exc', None)
          msg = (_('Exceeded max scheduling attempts %(max_attempts)d '
                   'for instance %(instance_uuid)s. '
                   'Last exception: %(exc)s.')
                 % {'max_attempts': max_attempts,
                    'instance_uuid': instance_uuid,
                    'exc': exc})
          raise exception.NoValidHost(reason=msg)

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1343858/+subscriptions


References