← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1788833] Re: Error during ComputeManager.update_available_resource: AttributeError: '_TransactionContextManager' object has no attribute 'async_

 

Reviewed:  https://review.openstack.org/597173
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=bd7d991309ea2bea5d175cb1f2710519936fd0c2
Submitter: Zuul
Branch:    master

commit bd7d991309ea2bea5d175cb1f2710519936fd0c2
Author: Stephen Finucane <sfinucan@xxxxxxxxxx>
Date:   Tue Aug 28 17:01:07 2018 +0100

    Don't use '_TransactionContextManager._async'
    
    In commit 2d532963, all instances of 'async' were replaced with 'async_'
    in preparation for Python 3.7. However, one of these should not have
    been changed as it refers to an oslo.db object attribute. That attribute
    has actually been renamed itself but that rename is only present from
    oslo.db 4.40.0 [1]. Thankfully, an alias to the older name is provided
    so we use that.
    
    [1] https://github.com/openstack/oslo.db/commit/df6bf34
    
    Change-Id: I1afd0ba34a9ebcb63edb91e880ef60580befb32e
    Closes-Bug: #1788833


** Changed in: nova
       Status: In Progress => Fix Released

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

Title:
  Error during ComputeManager.update_available_resource: AttributeError:
  '_TransactionContextManager' object has no attribute 'async_

Status in OpenStack Compute (nova):
  Fix Released
Status in OpenStack Compute (nova) rocky series:
  Triaged

Bug description:
  Hi all,

  I have a rocky openstack cluster. I am using Mariadb galera cluster (3
  galera nodes Active/Active) behind haproxy.

  When i resize or migrate an instance, I am hitting with the following
  errors.

  2018-08-24 12:06:37.668 19857 ERROR oslo_service.periodic_task [req-67381a5e-24e2-4dd2-bfc6-693bd1fabb8d 290bb90f6cbc46548951cbcaee0c0a34 9804c6f8ffe148bc9fa7ed409d41cb16 - default default] Error during ComputeManager._heal_instance_info_cache: AttributeError: '_TransactionContextManager' object has no attribute 'async_'
  Traceback (most recent call last):

    File "/usr/lib/python2.7/dist-packages/nova/conductor/manager.py", line 126, in _object_dispatch
      return getattr(target, method)(*args, **kwargs)

    File "/usr/lib/python2.7/dist-packages/oslo_versionedobjects/base.py", line 184, in wrapper
      result = fn(cls, context, *args, **kwargs)

    File "/usr/lib/python2.7/dist-packages/nova/objects/instance.py", line 1351, in get_by_host
      use_slave=use_slave)

    File "/usr/lib/python2.7/dist-packages/nova/db/sqlalchemy/api.py", line 218, in wrapper
      reader_mode = get_context_manager(context).async_

  AttributeError: '_TransactionContextManager' object has no attribute 'async_'
  2018-08-24 12:06:37.668 19857 ERROR oslo_service.periodic_task Traceback (most recent call last):
  2018-08-24 12:06:37.668 19857 ERROR oslo_service.periodic_task   File "/usr/lib/python2.7/dist-packages/oslo_service/periodic_task.py", line 220, in run_periodic_tasks
  2018-08-24 12:06:37.668 19857 ERROR oslo_service.periodic_task     task(self, context)
  2018-08-24 12:06:37.668 19857 ERROR oslo_service.periodic_task   File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 6632, in _heal_instance_info_cache
  2018-08-24 12:06:37.668 19857 ERROR oslo_service.periodic_task     context, self.host, expected_attrs=[], use_slave=True)
  2018-08-24 12:06:37.668 19857 ERROR oslo_service.periodic_task   File "/usr/lib/python2.7/dist-packages/oslo_versionedobjects/base.py", line 177, in wrapper
  2018-08-24 12:06:37.668 19857 ERROR oslo_service.periodic_task     args, kwargs)
  2018-08-24 12:06:37.668 19857 ERROR oslo_service.periodic_task   File "/usr/lib/python2.7/dist-packages/nova/conductor/rpcapi.py", line 241, in object_class_action_versions
  2018-08-24 12:06:37.668 19857 ERROR oslo_service.periodic_task     args=args, kwargs=kwargs)
  2018-08-24 12:06:37.668 19857 ERROR oslo_service.periodic_task   File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/client.py", line 179, in call
  2018-08-24 12:06:37.668 19857 ERROR oslo_service.periodic_task     retry=self.retry)
  2018-08-24 12:06:37.668 19857 ERROR oslo_service.periodic_task   File "/usr/lib/python2.7/dist-packages/oslo_messaging/transport.py", line 133, in _send
  2018-08-24 12:06:37.668 19857 ERROR oslo_service.periodic_task     retry=retry)
  2018-08-24 12:06:37.668 19857 ERROR oslo_service.periodic_task   File "/usr/lib/python2.7/dist-packages/oslo_messaging/_drivers/amqpdriver.py", line 584, in send
  2018-08-24 12:06:37.668 19857 ERROR oslo_service.periodic_task     call_monitor_timeout, retry=retry)
  2018-08-24 12:06:37.668 19857 ERROR oslo_service.periodic_task   File "/usr/lib/python2.7/dist-packages/oslo_messaging/_drivers/amqpdriver.py", line 575, in _send
  2018-08-24 12:06:37.668 19857 ERROR oslo_service.periodic_task     raise result
  2018-08-24 12:06:37.668 19857 ERROR oslo_service.periodic_task AttributeError: '_TransactionContextManager' object has no attribute 'async_'
  2018-08-24 12:06:37.668 19857 ERROR oslo_service.periodic_task Traceback (most recent call last):
  2018-08-24 12:06:37.668 19857 ERROR oslo_service.periodic_task 
  2018-08-24 12:06:37.668 19857 ERROR oslo_service.periodic_task   File "/usr/lib/python2.7/dist-packages/nova/conductor/manager.py", line 126, in _object_dispatch
  2018-08-24 12:06:37.668 19857 ERROR oslo_service.periodic_task     return getattr(target, method)(*args, **kwargs)
  2018-08-24 12:06:37.668 19857 ERROR oslo_service.periodic_task 
  2018-08-24 12:06:37.668 19857 ERROR oslo_service.periodic_task   File "/usr/lib/python2.7/dist-packages/oslo_versionedobjects/base.py", line 184, in wrapper
  2018-08-24 12:06:37.668 19857 ERROR oslo_service.periodic_task     result = fn(cls, context, *args, **kwargs)
  2018-08-24 12:06:37.668 19857 ERROR oslo_service.periodic_task 
  2018-08-24 12:06:37.668 19857 ERROR oslo_service.periodic_task   File "/usr/lib/python2.7/dist-packages/nova/objects/instance.py", line 1351, in get_by_host
  2018-08-24 12:06:37.668 19857 ERROR oslo_service.periodic_task     use_slave=use_slave)
  2018-08-24 12:06:37.668 19857 ERROR oslo_service.periodic_task 
  2018-08-24 12:06:37.668 19857 ERROR oslo_service.periodic_task   File "/usr/lib/python2.7/dist-packages/nova/db/sqlalchemy/api.py", line 218, in wrapper
  2018-08-24 12:06:37.668 19857 ERROR oslo_service.periodic_task     reader_mode = get_context_manager(context).async_
  2018-08-24 12:06:37.668 19857 ERROR oslo_service.periodic_task 
  2018-08-24 12:06:37.668 19857 ERROR oslo_service.periodic_task AttributeError: '_TransactionContextManager' object has no attribute 'async_'
  2018-08-24 12:06:37.668 19857 ERROR oslo_service.periodic_task 
  2018-08-24 12:06:37.668 19857 ERROR oslo_service.periodic_task 
  2018-08-24 12:07:29.064 19857 INFO nova.compute.resource_tracker [req-67381a5e-24e2-4dd2-bfc6-693bd1fabb8d 290bb90f6cbc46548951cbcaee0c0a34 9804c6f8ffe148bc9fa7ed409d41cb16 - default default] Final resource view: name=kvm4 phys_ram=257618MB used_ram=512MB phys_disk=100816GB used_disk=0GB total_vcpus=40 used_vcpus=0 pci_stats=[]

  
  Full log file is at

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


References