← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1667579] [NEW] swift-proxy-server fails to start with Python 3.5

 

Public bug reported:

Traceback (most recent call last):
  File "/usr/local/bin/swift-proxy-server", line 6, in <module>
    exec(compile(open(__file__).read(), __file__, 'exec'))
  File "/opt/stack/new/swift/bin/swift-proxy-server", line 23, in <module>
    sys.exit(run_wsgi(conf_file, 'proxy-server', **options))
  File "/opt/stack/new/swift/swift/common/wsgi.py", line 905, in run_wsgi
    loadapp(conf_path, global_conf=global_conf)
  File "/opt/stack/new/swift/swift/common/wsgi.py", line 389, in loadapp
    ctx = loadcontext(loadwsgi.APP, conf_file, global_conf=global_conf)
  File "/opt/stack/new/swift/swift/common/wsgi.py", line 373, in loadcontext
    global_conf=global_conf)
  File "/usr/local/lib/python3.5/dist-packages/paste/deploy/loadwsgi.py", line 296, in loadcontext
    global_conf=global_conf)
  File "/usr/local/lib/python3.5/dist-packages/paste/deploy/loadwsgi.py", line 320, in _loadconfig
    return loader.get_context(object_type, name, global_conf)
  File "/opt/stack/new/swift/swift/common/wsgi.py", line 66, in get_context
    object_type, name=name, global_conf=global_conf)
  File "/usr/local/lib/python3.5/dist-packages/paste/deploy/loadwsgi.py", line 450, in get_context
    global_additions=global_additions)
  File "/usr/local/lib/python3.5/dist-packages/paste/deploy/loadwsgi.py", line 562, in _pipeline_app_context
    for name in pipeline[:-1]]
  File "/usr/local/lib/python3.5/dist-packages/paste/deploy/loadwsgi.py", line 562, in <listcomp>
    for name in pipeline[:-1]]
  File "/opt/stack/new/swift/swift/common/wsgi.py", line 66, in get_context
    object_type, name=name, global_conf=global_conf)
  File "/usr/local/lib/python3.5/dist-packages/paste/deploy/loadwsgi.py", line 454, in get_context
    section)
  File "/usr/local/lib/python3.5/dist-packages/paste/deploy/loadwsgi.py", line 476, in _context_from_use
    object_type, name=use, global_conf=global_conf)
  File "/opt/stack/new/swift/swift/common/wsgi.py", line 66, in get_context
    object_type, name=name, global_conf=global_conf)
  File "/usr/local/lib/python3.5/dist-packages/paste/deploy/loadwsgi.py", line 406, in get_context
    global_conf=global_conf)
  File "/usr/local/lib/python3.5/dist-packages/paste/deploy/loadwsgi.py", line 296, in loadcontext
    global_conf=global_conf)
  File "/usr/local/lib/python3.5/dist-packages/paste/deploy/loadwsgi.py", line 328, in _loadegg
    return loader.get_context(object_type, name, global_conf)
  File "/usr/local/lib/python3.5/dist-packages/paste/deploy/loadwsgi.py", line 620, in get_context
    object_type, name=name)
  File "/usr/local/lib/python3.5/dist-packages/paste/deploy/loadwsgi.py", line 646, in find_egg_entry_point
    possible.append((entry.load(), protocol, entry.name))
  File "/usr/local/lib/python3.5/dist-packages/pkg_resources/__init__.py", line 2302, in load
    return self.resolve()
  File "/usr/local/lib/python3.5/dist-packages/pkg_resources/__init__.py", line 2308, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/opt/stack/new/swift/swift/common/middleware/slo.py", line 799
    def is_small_segment((seg_dict, start_byte, end_byte)):
                         ^
SyntaxError: invalid syntax

http://logs.openstack.org/14/437514/3/check/gate-rally-dsvm-py35
-neutron-neutron-ubuntu-xenial/3221186/logs/screen-s-proxy.txt.gz

This currently blocks neutron gate where we have a voting py3 tempest
job. The reason why swift is deployed with Python3.5 there is because we
special case in devstack to deploy the service with Python3:

http://git.openstack.org/cgit/openstack-
dev/devstack/tree/inc/python#n167

The short term solution is to disable the special casing. Swift should
then work on fixing the code, and gate on Python3 (preferably the same
job as neutron has).

** Affects: devstack
     Importance: Undecided
     Assignee: Ihar Hrachyshka (ihar-hrachyshka)
         Status: In Progress

** Affects: neutron
     Importance: Critical
     Assignee: Ihar Hrachyshka (ihar-hrachyshka)
         Status: Confirmed

** Affects: swift
     Importance: Undecided
         Status: New

** Also affects: neutron
   Importance: Undecided
       Status: New

** Also affects: devstack
   Importance: Undecided
       Status: New

** Changed in: neutron
       Status: New => Confirmed

** Changed in: neutron
   Importance: Undecided => Critical

** Changed in: neutron
     Assignee: (unassigned) => Ihar Hrachyshka (ihar-hrachyshka)

** Changed in: devstack
       Status: New => Confirmed

** Changed in: devstack
     Assignee: (unassigned) => Ihar Hrachyshka (ihar-hrachyshka)

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1667579

Title:
  swift-proxy-server fails to start with Python 3.5

Status in devstack:
  In Progress
Status in neutron:
  Confirmed
Status in OpenStack Object Storage (swift):
  New

Bug description:
  Traceback (most recent call last):
    File "/usr/local/bin/swift-proxy-server", line 6, in <module>
      exec(compile(open(__file__).read(), __file__, 'exec'))
    File "/opt/stack/new/swift/bin/swift-proxy-server", line 23, in <module>
      sys.exit(run_wsgi(conf_file, 'proxy-server', **options))
    File "/opt/stack/new/swift/swift/common/wsgi.py", line 905, in run_wsgi
      loadapp(conf_path, global_conf=global_conf)
    File "/opt/stack/new/swift/swift/common/wsgi.py", line 389, in loadapp
      ctx = loadcontext(loadwsgi.APP, conf_file, global_conf=global_conf)
    File "/opt/stack/new/swift/swift/common/wsgi.py", line 373, in loadcontext
      global_conf=global_conf)
    File "/usr/local/lib/python3.5/dist-packages/paste/deploy/loadwsgi.py", line 296, in loadcontext
      global_conf=global_conf)
    File "/usr/local/lib/python3.5/dist-packages/paste/deploy/loadwsgi.py", line 320, in _loadconfig
      return loader.get_context(object_type, name, global_conf)
    File "/opt/stack/new/swift/swift/common/wsgi.py", line 66, in get_context
      object_type, name=name, global_conf=global_conf)
    File "/usr/local/lib/python3.5/dist-packages/paste/deploy/loadwsgi.py", line 450, in get_context
      global_additions=global_additions)
    File "/usr/local/lib/python3.5/dist-packages/paste/deploy/loadwsgi.py", line 562, in _pipeline_app_context
      for name in pipeline[:-1]]
    File "/usr/local/lib/python3.5/dist-packages/paste/deploy/loadwsgi.py", line 562, in <listcomp>
      for name in pipeline[:-1]]
    File "/opt/stack/new/swift/swift/common/wsgi.py", line 66, in get_context
      object_type, name=name, global_conf=global_conf)
    File "/usr/local/lib/python3.5/dist-packages/paste/deploy/loadwsgi.py", line 454, in get_context
      section)
    File "/usr/local/lib/python3.5/dist-packages/paste/deploy/loadwsgi.py", line 476, in _context_from_use
      object_type, name=use, global_conf=global_conf)
    File "/opt/stack/new/swift/swift/common/wsgi.py", line 66, in get_context
      object_type, name=name, global_conf=global_conf)
    File "/usr/local/lib/python3.5/dist-packages/paste/deploy/loadwsgi.py", line 406, in get_context
      global_conf=global_conf)
    File "/usr/local/lib/python3.5/dist-packages/paste/deploy/loadwsgi.py", line 296, in loadcontext
      global_conf=global_conf)
    File "/usr/local/lib/python3.5/dist-packages/paste/deploy/loadwsgi.py", line 328, in _loadegg
      return loader.get_context(object_type, name, global_conf)
    File "/usr/local/lib/python3.5/dist-packages/paste/deploy/loadwsgi.py", line 620, in get_context
      object_type, name=name)
    File "/usr/local/lib/python3.5/dist-packages/paste/deploy/loadwsgi.py", line 646, in find_egg_entry_point
      possible.append((entry.load(), protocol, entry.name))
    File "/usr/local/lib/python3.5/dist-packages/pkg_resources/__init__.py", line 2302, in load
      return self.resolve()
    File "/usr/local/lib/python3.5/dist-packages/pkg_resources/__init__.py", line 2308, in resolve
      module = __import__(self.module_name, fromlist=['__name__'], level=0)
    File "/opt/stack/new/swift/swift/common/middleware/slo.py", line 799
      def is_small_segment((seg_dict, start_byte, end_byte)):
                           ^
  SyntaxError: invalid syntax

  http://logs.openstack.org/14/437514/3/check/gate-rally-dsvm-py35
  -neutron-neutron-ubuntu-xenial/3221186/logs/screen-s-proxy.txt.gz

  This currently blocks neutron gate where we have a voting py3 tempest
  job. The reason why swift is deployed with Python3.5 there is because
  we special case in devstack to deploy the service with Python3:

  http://git.openstack.org/cgit/openstack-
  dev/devstack/tree/inc/python#n167

  The short term solution is to disable the special casing. Swift should
  then work on fixing the code, and gate on Python3 (preferably the same
  job as neutron has).

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


Follow ups