Bug 1012590 - Installing python dependency for django app fails to install relevant C library dependencies
Summary: Installing python dependency for django app fails to install relevant C libra...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: All
OS: Unspecified
high
low
Target Milestone: ---
: ---
Assignee: Rob Millner
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-26 17:01 UTC by moxious
Modified: 2015-05-14 23:29 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-10-17 13:32:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description moxious 2013-09-26 17:01:41 UTC
Description of problem:

When a django app requests the dependency named 'extractor', openshift installs the correct python modules but fails to install the C libraries (libextractor) necessary to support this library.  The result is that the python library is present at runtime, but completely non-functional.

Version-Release number of selected component (if applicable):


How reproducible:

Via adding the 'extractor' dependency, and attempting to use it.

Steps to Reproduce:
1. add 'extractor' to django app dependencies
2. deploy django app
3. Run sample script found here, which uses the extractor library https://www.openshift.com/forums/openshift/missing-shared-object-file-from-python-module#comment-34365

Actual results:
OSError raised by the python interpreter when it fails to load the shared object file corresponding to the missing C libraries.

Expected results:

OpenShift should install relevant C libraries, as 'extractor' is a set of python bindings for libextractor.  When running the sample script, it should not fail with an error, but rather print out a list of metadata associated with input files.

Additional info:

For more details, see this forum posting which includes a discussion of this problem.  In this discussion, one of the support techs (Nam Duong) solicited this bug report.

https://www.openshift.com/forums/openshift/missing-shared-object-file-from-python-module

Comment 1 Rob Millner 2013-09-26 18:45:00 UTC
Reviewed the Extractor python egg.  It expects libextractor to be installed in the OS and neither provides it or has a listed dependency on it.  

Fedora has an RPM for libextractor.  RHEL 6 does not, even via EPEL.

I'll see what we can do with it.

Comment 2 Rob Millner 2013-09-26 20:06:09 UTC
I've been able to backport libextractor-0.6.3 from Fedora 18 to RHEL 6 (required backporting zzuf).  It seems to produce a usable build with just the RHEL, Optional and EPEL repositories as dependencies.

The version of Extractor in PyPi (0.5) is very old and wants version 1 of the library.  There's a version of python's Extractor in the libextractor site that's compatible with 0.6.3 and is likely the source used for the Ubuntu package.  We should be able to package up the newer version of Extracter and ship it as an RPM as well that will supersede the PyPi version.

Comment 3 Rob Millner 2013-09-26 23:47:56 UTC
Packaging work is under way to include these in OpenShift Online.

Comment 4 Rob Millner 2013-09-27 20:55:46 UTC
Packages are complete.  Waiting on them to matriculate through the system.

Comment 5 Rob Millner 2013-09-30 19:48:00 UTC
Packages are available in our development environment.  The following pull request brings them in and there's a corresponding entry in the release plan for installing.
https://github.com/openshift/li/pull/1938

Comment 6 openshift-github-bot 2013-09-30 21:59:01 UTC
Commit pushed to master at https://github.com/openshift/li

https://github.com/openshift/li/commit/07015944e5ea419716984ec381fa07edbc84ff51
Bug 1012590 - Add python-extractor to the build.

Comment 7 Meng Bo 2013-10-04 11:01:28 UTC
Checked on devenv_3864, issue has been fixed.

1.Add django and extractor to the python app setup.py
2.Git push

remote: Searching for Extractor==0.6
remote: Best match: Extractor 0.6
remote: Adding Extractor 0.6 to easy-install.pth file

3.SSH login to the app,

Use the python script from this article https://www.openshift.com/forums/openshift/missing-shared-object-file-from-python-module

4. [py1-bmengdev.dev.rhcloud.com data]\> python test.py Z8TM.jpg 
Keywords from Z8TM.jpg:
mimetype - image/jpeg
image resolution - 1x1 dots per inch?
comment - CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), quality = 90

image dimensions - 600x399
image dimensions - 600x399
mimetype - image/jpeg
image dimensions - 600x399


Extractor works well.


Note You need to log in before you can comment on or make changes to this bug.