← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1719859] [NEW] Resize failure due to instance group being None in request spec

 

Public bug reported:

Description
===========
During resize operation the migrate task nova\conductor\tasks\migrate.py tries to setup the
instance group in the request spec via following call -
scheduler_utils.setup_instance_group(self.context, self.request_spec)

The setup_instance_group tries to get the group details
If there are instance groups available following code gets executed - 
    group_info = _get_group_details(context, instance_uuid, group_hosts)
    if group_info is not None and request_spec.instance_group is not None:
        request_spec.instance_group.hosts = list(group_info.hosts)
        request_spec.instance_group.policies = group_info.policies
        request_spec.instance_group.members = group_info.members

If the group info is not None, then the call fails as the
request_spec.instance_group is None.

Steps to reproduce
==================
- create an instance group.
- Add an instance as a member for that instance group.
- Resize the instance.
- The resize operation fails with following error - 
Unexpected exception in API method: AttributeError: 'NoneType' object has no attribute 'hosts'
Traceback (most recent call last):

  File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/server.py", line 160, in _process_incoming
    res = self.dispatcher.dispatch(message)

  File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 213, in dispatch
    return self._do_dispatch(endpoint, method, ctxt, args)

  File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 183, in _do_dispatch
    result = func(ctxt, **new_args)

  File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/server.py", line 232, in inner
    return func(*args, **kwargs)

  File "/usr/lib/python2.7/site-packages/nova/conductor/manager.py", line 83, in wrapper
    return fn(self, context, *args, **kwargs)

  File "/usr/lib/python2.7/site-packages/nova/compute/utils.py", line 953, in decorated_function
    return function(self, context, *args, **kwargs)

  File "/usr/lib/python2.7/site-packages/nova/conductor/manager.py", line 282, in migrate_server
    reservations, clean_shutdown, request_spec)

  File "/usr/lib/python2.7/site-packages/nova/conductor/manager.py", line 345, in _cold_migrate
    updates, ex, legacy_spec)

  File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
    self.force_reraise()

  File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
    six.reraise(self.type_, self.value, self.tb)

  File "/usr/lib/python2.7/site-packages/nova/conductor/manager.py", line 314, in _cold_migrate
    task.execute()

Expected result
===============
Expect to successfully resize the instance.

Actual result
=============
Resize fails with above error.

Environment
===========

1. Openstack Pike 
openstack-nova-api-16.0.0-201709220608.ibm.el7.60.noarch
openstack-nova-16.0.0-201709220608.ibm.el7.60.noarch

2. Which hypervisor did you use?
  Not relevant here as error is in API/conductor layer itself.

2. Which storage type did you use?
   SAN

3. Which networking type did you use?
Not relevant

Logs & Configs
==============
The above exception trace should give a good understanding of where the issue is occurring.

** Affects: nova
     Importance: Undecided
         Status: New

-- 
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/1719859

Title:
  Resize failure due to instance group being None in request spec

Status in OpenStack Compute (nova):
  New

Bug description:
  Description
  ===========
  During resize operation the migrate task nova\conductor\tasks\migrate.py tries to setup the
  instance group in the request spec via following call -
  scheduler_utils.setup_instance_group(self.context, self.request_spec)

  The setup_instance_group tries to get the group details
  If there are instance groups available following code gets executed - 
      group_info = _get_group_details(context, instance_uuid, group_hosts)
      if group_info is not None and request_spec.instance_group is not None:
          request_spec.instance_group.hosts = list(group_info.hosts)
          request_spec.instance_group.policies = group_info.policies
          request_spec.instance_group.members = group_info.members

  If the group info is not None, then the call fails as the
  request_spec.instance_group is None.

  Steps to reproduce
  ==================
  - create an instance group.
  - Add an instance as a member for that instance group.
  - Resize the instance.
  - The resize operation fails with following error - 
  Unexpected exception in API method: AttributeError: 'NoneType' object has no attribute 'hosts'
  Traceback (most recent call last):

    File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/server.py", line 160, in _process_incoming
      res = self.dispatcher.dispatch(message)

    File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 213, in dispatch
      return self._do_dispatch(endpoint, method, ctxt, args)

    File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 183, in _do_dispatch
      result = func(ctxt, **new_args)

    File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/server.py", line 232, in inner
      return func(*args, **kwargs)

    File "/usr/lib/python2.7/site-packages/nova/conductor/manager.py", line 83, in wrapper
      return fn(self, context, *args, **kwargs)

    File "/usr/lib/python2.7/site-packages/nova/compute/utils.py", line 953, in decorated_function
      return function(self, context, *args, **kwargs)

    File "/usr/lib/python2.7/site-packages/nova/conductor/manager.py", line 282, in migrate_server
      reservations, clean_shutdown, request_spec)

    File "/usr/lib/python2.7/site-packages/nova/conductor/manager.py", line 345, in _cold_migrate
      updates, ex, legacy_spec)

    File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
      self.force_reraise()

    File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
      six.reraise(self.type_, self.value, self.tb)

    File "/usr/lib/python2.7/site-packages/nova/conductor/manager.py", line 314, in _cold_migrate
      task.execute()

  Expected result
  ===============
  Expect to successfully resize the instance.

  Actual result
  =============
  Resize fails with above error.

  Environment
  ===========

  1. Openstack Pike 
  openstack-nova-api-16.0.0-201709220608.ibm.el7.60.noarch
  openstack-nova-16.0.0-201709220608.ibm.el7.60.noarch

  2. Which hypervisor did you use?
    Not relevant here as error is in API/conductor layer itself.

  2. Which storage type did you use?
     SAN

  3. Which networking type did you use?
  Not relevant

  Logs & Configs
  ==============
  The above exception trace should give a good understanding of where the issue is occurring.

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


Follow ups