Bug 1028960 - Perl modules Image::Magick not building correctly. The openshift ImageMagick-perl version seem is not the latest CPAN version. When deploying,it will auto install,but failed.
Perl modules Image::Magick not building correctly. The openshift ImageMagick-...
Status: CLOSED NEXTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: Image (Show other bugs)
2.x
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Michal Fojtik
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-11 05:55 EST by rexdf
Modified: 2015-05-14 20:34 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-11-12 08:25:24 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
the build.log (606.27 KB, text/plain)
2013-11-11 07:52 EST, rexdf
no flags Details

  None (edit)
Description rexdf 2013-11-11 05:55:24 EST
Description of problem:
Perl modules Image::Magick not building correctly. The openshift ImageMagick-perl version seem is not the latest CPAN version. When deploying,it will auto install,but failed.

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


How reproducible:


Steps to Reproduce:
1.$rhc app create perl perl-10.0
2.$rhc git-clone perl
3.$vim perl/perl/index.pl
   And change it to following:
#!/usr/bin/perl
 
use Image::Magick;
 
print "Hello, world!";

4.$git push

Then we will see the error. And I didn't even leave blank in deplist.txt .



Actual results:

$ git push
Counting objects: 7, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 356 bytes, done.
Total 4 (delta 3), reused 0 (delta 0)
remote: Stopping Perl cartridge
remote: Waiting for stop to finish
remote: Building git ref 'master', commit 0da0981
remote: Building Perl cartridge
remote: --> Working on Image::Magick
remote: Fetching http://mirror1.ops.rhcloud.com/mirror/perl/CPAN/authors/id/J/JC/JCRISTY/PerlMagick-6.86.tar.gz ... OK
remote: Configuring PerlMagick-6.86 ... OK
remote: Building Image-Magick-6.86 ... FAIL
remote: ! Installing Image::Magick failed. See /var/lib/openshift/528093994382ecda4700021d/.cpanm/build.log for details.
remote: An error occurred executing 'gear postreceive' (exit code: 1)
remote: Error message: Failed to execute: 'control build' for /var/lib/openshift/528093994382ecda4700021d/perl
remote:
remote: For more details about the problem, try running the command again with the '--trace' option.
To ssh://528093994382ecda4700021d@perl-maoweiy.rhcloud.com/~/git/perl.git/
   c6d960f..0da0981  master -> master

Expected results:

It should use perllibs, but not try to download CPAN any thing!! I just want it to work.


Additional info:
$rhc ssh perl
[text-maoweiy.rhcloud.com 527fc7175973cadbb70005ac]\> perl -e "use Image::Magick; print Image::Magick->QuantumDepth"
16[text-maoweiy.rhcloud.com 527fc7175973cadbb70005ac]\>

So there is a ImageMagick-perl installed.
Comment 1 rexdf 2013-11-11 07:52:05 EST
Created attachment 822390 [details]
the build.log
Comment 2 Michal Fojtik 2013-11-11 12:13:03 EST
Hi,

I have pull request that fixes this problem:

https://github.com/openshift/origin-server/pull/4155
Comment 3 rexdf 2013-11-11 15:42:30 EST
(In reply to Michal Fojtik from comment #2)
> Hi,
> 
> I have pull request that fixes this problem:
> 
> https://github.com/openshift/origin-server/pull/4155

When will it update? The problem still exists.
Comment 4 rexdf 2013-11-11 16:01:07 EST
(In reply to Michal Fojtik from comment #2)
> Hi,
> 
> I have pull request that fixes this problem:
> 
> https://github.com/openshift/origin-server/pull/4155

I'm glad to see the patch

    if perl -e "use $f;" 2> /dev/null; then
echo "*** Skipping module $f install from CPAN (found in system)."
      echo "*** Please add $f to deplist.txt to install it from CPAN."
      continue;
    fi

if perl -e "use $f;" 2> /dev/null; then

the condition is opposite.

If there is a module installed 
then         perl -e "use $f;" 2> /dev/null;              is false.
And it will not exec continue
Comment 5 openshift-github-bot 2013-11-11 17:11:14 EST
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/036e54c0cac5a70bf81f0c9a13a5de242bd297f4
Bug 1028960 - Prefer perl modules installed on system over CPAN install
Comment 6 Michal Fojtik 2013-11-11 17:27:40 EST
The update will go live once the new version of OpenShift is released to production.

You can use --from-code if you want to use updated perl cartrige right now.
Comment 7 rexdf 2013-11-12 00:30:42 EST
(In reply to Michal Fojtik from comment #6)
> The update will go live once the new version of OpenShift is released to
> production.
> 
> You can use --from-code if you want to use updated perl cartrige right now.

The bug still exists. The reproducible process works.

But maybe I temporary find a solution to this bug.

1.remove the deplist.txt
2. ssh to openshift
3. cpanm to install the dependency manually.
Comment 8 Yan Du 2013-11-12 05:37:48 EST
Test on devenv_4022, issue has been fixed.


[root@localhost perl]# git add .; git commit -m"1";git push
[master c43d6b3] 1
 1 file changed, 6 insertions(+), 160 deletions(-)
 rewrite perl/index.pl (99%)
Counting objects: 7, done.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 363 bytes, done.
Total 4 (delta 2), reused 0 (delta 0)
remote: Stopping Perl cartridge
remote: [Tue Nov 12 05:33:18 2013] [warn] PassEnv variable SHELL was undefined
remote: [Tue Nov 12 05:33:18 2013] [warn] PassEnv variable USER was undefined
remote: [Tue Nov 12 05:33:18 2013] [warn] PassEnv variable LOGNAME was undefined
remote: Waiting for stop to finish
remote: Building git ref 'master', commit c43d6b3
remote: Building Perl cartridge
remote: ***   Skipping module Image::Magick install from CPAN (found in system).
remote: ***   Please add Image::Magick to deplist.txt to install it from CPAN.
remote: Preparing build for deployment
remote: Deployment id is 3f63806d
remote: Activating deployment
remote: Starting Perl cartridge
remote: Result: success
remote: Activation status: success
remote: Deployment completed with status: success
To ssh://5282038ec465ee861b0000d3@perl-dyy.dev.rhcloud.com/~/git/perl.git/
   e78975d..c43d6b3  master -> master
Comment 9 rexdf 2013-11-12 08:25:24 EST
I'm sorry that I don't know how to use --from-code.
So it should work until next update.

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