Hide Forgot
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.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.
Created attachment 822390 [details] the build.log
Hi, I have pull request that fixes this problem: https://github.com/openshift/origin-server/pull/4155
(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.
(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
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
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.
(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.
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.rhcloud.com/~/git/perl.git/ e78975d..c43d6b3 master -> master
I'm sorry that I don't know how to use --from-code. So it should work until next update.