Bug 1012590 - Installing python dependency for django app fails to install relevant C library dependencies
Installing python dependency for django app fails to install relevant C libra...
Product: OpenShift Online
Classification: Red Hat
Component: Containers (Show other bugs)
All Unspecified
high Severity low
: ---
: ---
Assigned To: Rob Millner
libra bugs
Depends On:
  Show dependency treegraph
Reported: 2013-09-26 13:01 EDT by moxious
Modified: 2015-05-14 19:29 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-10-17 09:32:01 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description moxious 2013-09-26 13:01:41 EDT
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.

Comment 1 Rob Millner 2013-09-26 14:45:00 EDT
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 16:06:09 EDT
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 19:47:56 EDT
Packaging work is under way to include these in OpenShift Online.
Comment 4 Rob Millner 2013-09-27 16:55:46 EDT
Packages are complete.  Waiting on them to matriculate through the system.
Comment 5 Rob Millner 2013-09-30 15:48:00 EDT
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.
Comment 6 openshift-github-bot 2013-09-30 17:59:01 EDT
Commit pushed to master at https://github.com/openshift/li

Bug 1012590 - Add python-extractor to the build.
Comment 7 Meng Bo 2013-10-04 07:01:28 EDT
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.