m-api raises read_deleted error during devstack setup

Bug #1567043 reported by Yogesh
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Fix Released
Undecided
Tom Barron

Bug Description

Following error is raised by m-api during the devstack setup -

2016-04-06 15:14:38.982 INFO manila.api.openstack.wsgi [-] http://192.168.10.12:8786/ returned with HTTP 300
2016-04-06 15:14:38.989 INFO eventlet.wsgi.server [-] ::ffff:192.168.10.12 - - [06/Apr/2016 15:14:38] "GET / HTTP/1.1" 300 891 0.010625
2016-04-06 15:14:39.260 DEBUG eventlet.wsgi.server [-] (25989) accepted ('::ffff:192.168.10.12', 52143, 0, 0) from (pid=25989) server /usr/local/lib/python2.7/dist-packages/eventlet/wsgi.py:867
Traceback (most recent call last):
  File "/usr/lib/python2.7/logging/__init__.py", line 851, in emit
    msg = self.format(record)
  File "/usr/local/lib/python2.7/dist-packages/oslo_log/handlers.py", line 73, in format
    return logging.StreamHandler.format(self, record)
  File "/usr/lib/python2.7/logging/__init__.py", line 724, in format
    return fmt.format(record)
  File "/usr/local/lib/python2.7/dist-packages/oslo_log/formatters.py", line 198, in format
    context = _update_record_with_context(record)
  File "/usr/local/lib/python2.7/dist-packages/oslo_log/formatters.py", line 59, in _update_record_with_context
    d = _dictify_context(context)
  File "/usr/local/lib/python2.7/dist-packages/oslo_log/formatters.py", line 34, in _dictify_context
    context = context.to_dict()
  File "/opt/stack/manila/manila/context.py", line 113, in to_dict
    'read_deleted': self.read_deleted,
  File "/opt/stack/manila/manila/context.py", line 94, in _get_read_deleted
    return self._read_deleted
AttributeError: 'RequestContext' object has no attribute '_read_deleted'
Logged from file _cache_handler.py, line 38
Traceback (most recent call last):
  File "/usr/lib/python2.7/logging/__init__.py", line 851, in emit
    msg = self.format(record)
  File "/usr/local/lib/python2.7/dist-packages/oslo_log/handlers.py", line 73, in format
    return logging.StreamHandler.format(self, record)
  File "/usr/lib/python2.7/logging/__init__.py", line 724, in format
    return fmt.format(record)
  File "/usr/local/lib/python2.7/dist-packages/oslo_log/formatters.py", line 198, in format
    context = _update_record_with_context(record)
  File "/usr/local/lib/python2.7/dist-packages/oslo_log/formatters.py", line 59, in _update_record_with_context
    d = _dictify_context(context)
  File "/usr/local/lib/python2.7/dist-packages/oslo_log/formatters.py", line 34, in _dictify_context
    context = context.to_dict()
  File "/opt/stack/manila/manila/context.py", line 113, in to_dict
    'read_deleted': self.read_deleted,
  File "/opt/stack/manila/manila/context.py", line 94, in _get_read_deleted
    return self._read_deleted
AttributeError: 'RequestContext' object has no attribute '_read_deleted'
Logged from file policy.py, line 493

Yogesh (ykshirsa)
summary: - m-api raises read_context error during devstack setup
+ m-api raises read_deleted error during devstack setup
Revision history for this message
Valeriy Ponomaryov (vponomaryov) wrote :

It is environment setup error that appears on hosts that already have some artifacts from previous installations. Just update oslo lib "context" correctly.

Changed in manila:
status: New → Invalid
Revision history for this message
Yogesh (ykshirsa) wrote :

This issue is not an environmental issue.
It's a fresh devstack deployment.
You can also see this error here - http://logs.openstack.org/62/301962/2/check/gate-manila-tempest-dsvm-mysql-generic/137825f/logs/screen-m-api.txt.gz

Changed in manila:
status: Invalid → New
Revision history for this message
Alex Meade (alex-meade) wrote :

i'm sure it's barfing because '_set_read_deleted' had not been called before '_get_read_deleted'. From what I can tell, oslo.context never has called it '_read_deleted', they have a show_deleted kwarg we do not make use of.

$ cd oslo.context
$ git log -G ".*read_deleted.*"

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (master)

Fix proposed to branch: master
Review: https://review.openstack.org/315259

Changed in manila:
assignee: nobody → Tom Barron (tpb)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (master)

Reviewed: https://review.openstack.org/315259
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=f52d032be3760aa432b1bf57faedf52c44c18be6
Submitter: Jenkins
Branch: master

commit f52d032be3760aa432b1bf57faedf52c44c18be6
Author: Tom Barron <email address hidden>
Date: Wed May 11 17:22:30 2016 -0400

    Fix Manila RequestContext.to_dict() AttributeError

    During context initialization RequestContext.to_dict() method
    may be triggered before all Manila specific keys have been set
    in the context, in which case an AttributeError is raised.

    Fix to_dict() method to set None values for the Manila specific
    keys in the context when these attributes have not yet been
    set.

    Change-Id: I95381cd0e5478e516c0f6a77f1284c3b5b83d492
    Closes-Bug: #1561559
    Closes-Bug: #1567043

Changed in manila:
status: In Progress → Fix Released
Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/manila 3.0.0.0b1

This issue was fixed in the openstack/manila 3.0.0.0b1 development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.