anyjson dep needed for openstack.common.jsonutils conflicts across several projects

Bug #1026062 reported by Wall Lee
30
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Glance
Invalid
Low
Brian Waldon
OpenStack Compute (nova)
Invalid
Low
Brian Waldon
OpenStack Identity (keystone)
Invalid
Low
Unassigned
oslo-incubator
Invalid
Undecided
Unassigned

Bug Description

The keystone output is:
Traceback (most recent call last):
  File "/usr/local/bin/keystone-manage", line 5, in <module>
    pkg_resources.run_script('keystone==2012.2', 'keystone-manage')
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 499, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1235, in run_script
    execfile(script_filename, namespace, namespace)
  File "/usr/local/lib/python2.7/dist-packages/keystone-2012.2-py2.7.egg/EGG-INFO/scripts/keystone-manage", line 17, in <module>
    from keystone import cli
  File "/usr/local/lib/python2.7/dist-packages/keystone-2012.2-py2.7.egg/keystone/cli.py", line 25, in <module>
    from keystone.openstack.common import jsonutils
  File "/usr/local/lib/python2.7/dist-packages/keystone-2012.2-py2.7.egg/keystone/openstack/common/jsonutils.py", line 140, in <module>
    anyjson.force_implementation(__name__)
  File "/usr/local/lib/python2.7/dist-packages/anyjson/__init__.py", line 110, in force_implementation
    implementation = _JsonImplementation(spec)
  File "/usr/local/lib/python2.7/dist-packages/anyjson/__init__.py", line 62, in __init__
    fdec = modinfo["filedecoder"]
KeyError: 'filedecoder'

Revision history for this message
Wall Lee (eelilei) wrote :

I think the package has some error.The glance install anyjson 0.3 and the keystone need anyjson 0.2.4.So I think it need to add anyjson==0.2.4 in pip-requires of keystone file.

Revision history for this message
Brian Waldon (bcwaldon) wrote :

To give you an idea of why this might be happening: we only use anyjson on pre-python 2.6 environments but we don't run tests to ensure it works.

As you noted that this bug affects Glance, what work do you see being done there?

Changed in glance:
status: New → Incomplete
Revision history for this message
Wall Lee (eelilei) wrote :

Hi,I think the version of anyjson has some different.Glance use 0.3.3 and Keystone need 0.2.4,but the Keystone pip-requires has no anyjson,like this :
# keystone dependencies
pam==0.1.4
WebOb==1.0.8
eventlet
greenlet
PasteDeploy
paste
routes
sqlalchemy
sqlalchemy-migrate
passlib
lxml
iso8601>=0.1.4
And the Glance like this:
# The greenlet package must be compiled with gcc and needs
# the Python.h headers. Make sure you install the python-dev
# package to get the right headers...
greenlet>=0.3.1

SQLAlchemy>=0.7
anyjson
eventlet>=0.9.12
PasteDeploy
routes
webob==1.0.8
wsgiref
argparse
boto==2.1.1
sqlalchemy-migrate>=0.7
httplib2
xattr>=0.6.0
kombu
pycrypto>=2.1.0alpha1
pysendfile==2.0.0
iso8601>=0.1.4

# For Swift storage backend.
python-swiftclient>=1,<2

# Note you will need gcc buildtools installed and must
# have installed libxml headers for lxml to be successfully
# installed using pip, therefore you will need to install the
# libxml2-dev and libxslt-dev Ubuntu packages.
lxml

# For paste.util.template used in keystone.common.template
Paste

passlib
jsonschema

So If you install the Glance and Keystone in one PC,the Glance can reload the anyjson to 0.3.3.So I think you can add anyjson==0.2.4 to Keystone pip-requires and install.

Revision history for this message
Wall Lee (eelilei) wrote :

That is a same problem that I sloved.
link is:https://answers.launchpad.net/glance/+question/203488

Revision history for this message
Wall Lee (eelilei) wrote :

What's wrong with this problem?This is a real bug in glance require package information.Why dose not assigned?

Revision history for this message
Jay Pipes (jaypipes) wrote :

Are you saying that Glance's pip-requires should set anyjson=0.2.4 -- same with Keystone?

Revision history for this message
Wall Lee (eelilei) wrote :

Yes,I think so.
That is a same problem that I sloved.
link is:https://answers.launchpad.net/glance/+question/203488

Brian Waldon (bcwaldon)
Changed in glance:
status: Incomplete → In Progress
Changed in keystone:
status: New → In Progress
Changed in glance:
assignee: nobody → Brian Waldon (bcwaldon)
Changed in keystone:
assignee: nobody → Brian Waldon (bcwaldon)
Changed in glance:
importance: Undecided → Low
Changed in keystone:
importance: Undecided → Low
Changed in glance:
milestone: none → folsom-3
Changed in keystone:
milestone: none → folsom-3
Revision history for this message
Brian Waldon (bcwaldon) wrote : Re: The json tools package can not used in new glance and keystone project

The only sane paths forward are to either drop pre-python 2.6 support (and anyjson) or to let openstack-common set this dependency in all the openstack projects. We have three conflicting versions being installed right now that will be a pain to fix and maintain.

Changed in glance:
status: In Progress → Triaged
Changed in keystone:
status: In Progress → Triaged
Changed in nova:
importance: Undecided → Low
status: New → Triaged
assignee: nobody → Brian Waldon (bcwaldon)
Changed in keystone:
milestone: folsom-3 → none
Changed in glance:
milestone: folsom-3 → none
summary: - The json tools package can not used in new glance and keystone project
+ anyjson dep needed for openstack.common.jsonutils conflicts across
+ several projects
Revision history for this message
Monty Taylor (mordred) wrote :

The anyjson versoin needs to be set to 0.3.1 or higher. 0.3.1 is the version found in both oneiric and precise. It's essential that we produce software that can be installed on ubuntu, so going _lower_ than the version in the archive is a non-starter.

Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote :

At this point here's what i see, what should we change it to?

cinder/tools/pip-requires:anyjson>=0.2.4
glance/tools/pip-requires:anyjson
nova/tools/pip-requires:anyjson>=0.2.4
oslo-incubator/tools/pip-requires:anyjson>=0.2.4

Revision history for this message
Brian Waldon (bcwaldon) wrote :

So anyjson compat is only needed for python versions outside of our support statement. I propose we remove anyjson from all of our projects altogether.

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

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

Changed in oslo:
assignee: nobody → Brian Waldon (bcwaldon)
status: New → In Progress
Revision history for this message
Mark McLoughlin (markmc) wrote :

Oslo patch was auto-abandoned - see the discussion in the review

Changed in oslo:
status: In Progress → Triaged
assignee: Brian Waldon (bcwaldon) → nobody
Revision history for this message
Dolph Mathews (dolph) wrote :

Unassigning due to inactivity.

Changed in keystone:
assignee: Brian Waldon (bcwaldon) → nobody
Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote :

ceilometer/requirements.txt:anyjson>=0.3.3
cinder/requirements.txt:anyjson>=0.3.3
glance/requirements.txt:anyjson>=0.3.3
neutron/requirements.txt:anyjson>=0.3.3
nova/requirements.txt:anyjson>=0.3.3
oslo-incubator/requirements.txt:anyjson>=0.3.3
requirements/global-requirements.txt:anyjson>=0.3.3
tempest/requirements.txt:anyjson>=0.3.3

Changed in nova:
status: Triaged → Invalid
Changed in glance:
status: Triaged → Invalid
Changed in keystone:
status: Triaged → Invalid
Changed in oslo:
status: Triaged → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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