In order to get a simple persistent cache for my database update script in my perl-cartridge based openshift app, I decided to use DB_File. As it's part of perl 5, I did not add it to the deplist.txt. However, after a git push, deploying fails. It turns out that the reason for this is that the deploy script detects DB_File as a depencency and adds it to the modules to be cpanm'ed. cpanm realizes that the DB_File of perl5 is not up-to-date (1.820 vs. 1.830) and tries to install it - resulting in: Note (probably harmless): No library found for -ldb ... version.c:30:16: error: db.h: No such file or directory This makes it impossible to use DB_File with openshift. Possible solutions I could think of: * Excluding this module from the update list * More general, adding a blocklist.txt for purposes where I do not want to have a dependency updated * installing db-devel on the openshift nodes so that building DB_File is successful Steps to reproduce: * create an empty perl cartridge * add a script to the repository that contains "use DB_File;" * call git push Expected result: * git push is successful Actual result: * git push fails when trying to update DB_File
I reproduced this issues on devenv, after installing db4-devel I was able to successfully push the perl app with 'use DB_File;'. The DB_File module is compiled without errors. remote: Building Perl cartridge remote: --> Working on DB_File remote: Fetching http://mirror1.ops.rhcloud.com/mirror/perl/CPAN/authors/id/P/PM/PMQS/DB_File-1.830.tar.gz ... OK remote: Configuring DB_File-1.830 ... OK remote: Building DB_File-1.830 ... OK remote: Successfully installed DB_File-1.830 (upgraded from 1.820) remote: 1 distribution installed remote: Preparing build for deployment remote: Deployment id is b450a780 remote: Activating deployment remote: Starting Perl cartridge remote: Result: success remote: Activation status: success remote: Deployment completed with status: success To ssh://527aa2e1f3f3dddb1e0004b2.rhcloud.com/~/git/perl01.git/ 8efe8b2..4bc1948 master -> master
mephinet: I asked Operations guys to push the -devel RPM into OpenShift Online. We will update this bug once it will be ready for consumption. Thanks for reporting this one!
@michal I think you want to add the require to the rpm.
Great, thanks!
Meng Bo: Can you please try again? I think I was too fast setting this bug ON_QA. Sorry.
Checked on devenv_4003, issue has been fixed. remote: Building Perl cartridge remote: --> Working on DB_File remote: Fetching http://mirror1.ops.rhcloud.com/mirror/perl/CPAN/authors/id/P/PM/PMQS/DB_File-1.830.tar.gz ... OK remote: Configuring DB_File-1.830 ... OK remote: Building DB_File-1.830 ... OK remote: Successfully installed DB_File-1.830 (upgraded from 1.820) remote: 1 distribution installed remote: Preparing build for deployment remote: Deployment id is 595a81f1 remote: Activating deployment remote: Starting Perl cartridge remote: Result: success remote: Activation status: success remote: Deployment completed with status: success Move bug to verified.
Test on devenv_4170 create a perl app, add "use DB_File;" to index.pl, and git push remote: Building Perl cartridge remote: *** Skipping module DB_File install from CPAN (found in system). remote: *** Please add DB_File to deplist.txt to install it from CPAN. remote: Preparing build for deployment remote: Deployment id is 50ef05d2 remote: Activating deployment remote: Starting Perl cartridge remote: Result: success remote: Activation status: success remote: Deployment completed with status: success then add DB_File to deplist.txt and push again, still show the above information.
remote: Building Perl cartridge remote: *** Skipping module DB_File install from CPAN (found in system). this means the module was found in system which is what we want :-)
I disagree, it does not work as advertised, as the next line states: remote: *** Please add DB_File to deplist.txt to install it from CPAN. which is what I want to do (because the one found in system is too old for my requirements).
mephinet: Ah I see, so specifying the module in deplist does not work when the module is found in system. I will take a look.
https://github.com/openshift/origin-server/pull/4410 This should fix the problem, with this fix all system/local checks are disabled when the module is listed in deplist.txt.
Your fix looks good (it seems to me as if this rather addresses #1046753 then the DB_File issue, though)
Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/605a838475bab6ab1cf6dcbe1cb26aae5cb83b5a Bug 1026652 - Skip module checks if module exists in perl deplist.txt
Test on devenv_4191, 1. Create a perl app, add "use DB_File;" to index.pl, and git push remote: Stopping Perl cartridge remote: [Mon Jan 06 21:25:17 2014] [warn] PassEnv variable SHELL was undefined remote: [Mon Jan 06 21:25:17 2014] [warn] PassEnv variable USER was undefined remote: [Mon Jan 06 21:25:17 2014] [warn] PassEnv variable LOGNAME was undefined remote: Waiting for stop to finish remote: Building git ref 'master', commit bd58898 remote: Building Perl cartridge remote: *** Skipping module DB_File install from CPAN (found in system). remote: *** Please add DB_File to deplist.txt to install it from CPAN. remote: Preparing build for deployment remote: Deployment id is 6e0e71e5 remote: Activating deployment remote: Starting Perl cartridge remote: Result: success remote: Activation status: success remote: Deployment completed with status: success To ssh://52cb64d70b8a3a3c3a000007.rhcloud.com/~/git/perl.git/ a5231c8..bd58898 master -> master 2. Add DB_File to deplist.txt and push again remote: Stopping Perl cartridge remote: Waiting for stop to finish remote: Building git ref 'master', commit b58ce55 remote: Building Perl cartridge remote: --> Working on DB_File remote: Fetching http://mirror1.ops.rhcloud.com/mirror/perl/CPAN/authors/id/P/PM/PMQS/DB_File-1.831.tar.gz ... OK remote: Configuring DB_File-1.831 ... OK remote: Building DB_File-1.831 ... OK remote: Successfully installed DB_File-1.831 (upgraded from 1.820) remote: 1 distribution installed remote: Preparing build for deployment remote: Deployment id is b7cfa1e3 remote: Activating deployment remote: Starting Perl cartridge remote: Result: success remote: Activation status: success remote: Deployment completed with status: success To ssh://52cb64d70b8a3a3c3a000007.rhcloud.com/~/git/perl.git/ bd58898..b58ce55 master -> master Issue have been fixed. Move to verified. Thanks.