Ask Your Question
1

Cannot start docker-registry at PackStacked CONTROLLER node.

asked 2014-05-23 00:20:54 -0500

t.goto gravatar image

updated 2014-05-25 20:21:47 -0500

Hello. I'm bumped at error while installing docker-registry to the PackStacked(Icehouse) environment. Though I successfuly installed docker-registry to the vanilla CentOS environment.

here's docker-registry startup log from PackStacked environment.

Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/gunicorn/arbiter.py", line 495, in spawn_worker
    worker.init_process()
  File "/usr/lib/python2.6/site-packages/gunicorn/workers/ggevent.py", line 165, in init_process
    super(GeventWorker, self).init_process()
  File "/usr/lib/python2.6/site-packages/gunicorn/workers/base.py", line 106, in init_process
    self.wsgi = self.app.wsgi()
  File "/usr/lib/python2.6/site-packages/gunicorn/app/base.py", line 114, in wsgi
    self.callable = self.load()
  File "/usr/lib/python2.6/site-packages/gunicorn/app/wsgiapp.py", line 62, in load
    return self.load_wsgiapp()
  File "/usr/lib/python2.6/site-packages/gunicorn/app/wsgiapp.py", line 49, in load_wsgiapp
    return util.import_app(self.app_uri)
  File "/usr/lib/python2.6/site-packages/gunicorn/util.py", line 354, in import_app
    __import__(module)
  File "/usr/lib/python2.6/site-packages/docker-registry/wsgi.py", line 11, in <module>
    import registry
  File "/usr/lib/python2.6/site-packages/docker-registry/registry/__init__.py", line 6, in <module>
    from .images import *
  File "/usr/lib/python2.6/site-packages/docker-registry/registry/images.py", line 18, in <module>
    import layers
  File "/usr/lib/python2.6/site-packages/docker-registry/lib/layers.py", line 4, in <module>
    import backports.lzma as lzma
ImportError: No module named lzma

Anybody successfuly installed and booted docker-registry at PackStacked environment?

Thanks for advance.


I investigated this error further and found some clue. (thanks sgordon)
You need python-backports package for docker-registry, but this package from rdo-release repository lacks some files.
I think that's why importing fails.

python-backports.x86_64.1.0-4.el6 from openstack-icehouse (FAILS)

/usr/lib/python2.6/site-packages/backports
/usr/lib/python2.6/site-packages/backports/__init__.py
/usr/lib/python2.6/site-packages/backports/__init__.pyc
/usr/lib/python2.6/site-packages/backports/__init__.pyo

python-backports.x86_64.1.0-3.el6 from EPEL6 (SUCCEEDS)

/usr/lib/python2.6/site-packages/backports
/usr/lib/python2.6/site-packages/backports/__init__.py
/usr/lib/python2.6/site-packages/backports/__init__.pyc
/usr/lib/python2.6/site-packages/backports/__init__.pyo
/usr/lib64/python2.6/site-packages/backports
/usr/lib64/python2.6/site-packages/backports/__init__.py
/usr/lib64/python2.6/site-packages/backports/__init__.pyc
/usr/lib64/python2.6/site-packages/backports/__init__.py

I think docker-registry code tries to look into /usr/lib64/python2.6/site-packages.
Maybe tinkering python-PATH solves it. I'll report result later.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
2

answered 2014-05-23 12:34:33 -0500

sgordon gravatar image

updated 2014-05-23 12:37:06 -0500

The important part of the stack trace is this error:

  File "/usr/lib/python2.6/site-packages/docker-registry/lib/layers.py", line 4, in <module> import backports.lzma as lzma
ImportError: No module named lzma

It indicates that the python-backports-lzma package is not installed, which probably means the creator of the docker-registry package missed listing it as a dependency (worth reporting). You can find it in EPEL for RHEL/CentOS 6:

To install it directly from this location:

# yum localinstall http://dl.fedoraproject.org/pub/epel/6/x86_64/python-backports-lzma-0.0.2-5.el6.x86_64.rpm

For Fedora 20 it's in the normal updates repository:

# yum install python-backports-lzma
edit flag offensive delete link more

Comments

Sorry to be late to reply and thanks for advice, sgordon. I checked this package, but it had been already installed. :)

t.goto gravatar imaget.goto ( 2014-05-25 20:06:58 -0500 )edit

Since python-backports of RDO repo doesn't provide /usr/lib/python2.6/site-packages/backports/__init__.py , I couldn't import backports.lzma.
I instead used/constructed docker-registry container. It worked :)

t.goto gravatar imaget.goto ( 2014-05-29 04:04:43 -0500 )edit

This issue with python-backports is tracked at https://bugzilla.redhat.com/1061051

pixelbeat gravatar imagepixelbeat ( 2014-05-29 06:02:13 -0500 )edit

Thanks for info, pixelbeat. I'm glad to hear someone is already on it.

t.goto gravatar imaget.goto ( 2014-05-29 19:30:56 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-05-23 00:20:54 -0500

Seen: 601 times

Last updated: May 25 '14