Bug 861550

Summary: Force_clean_build failed for php cartridge
Product: OKD Reporter: Jianwei Hou <jhou>
Component: ContainersAssignee: Dan Mace <dmace>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.xCC: cgole, dmace
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: devenv_2257+ Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-11-06 18:49:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
force_clean_build.log none

Description Jianwei Hou 2012-09-29 06:25:53 UTC
Created attachment 618863 [details]
force_clean_build.log

Description of problem:
Create a php app, add force_clean_build marker and git push, caught error: "remote: no write access to /var/lib/stickshift/1dfbcad1b4cc4908a9a9237c997f5c6f/.pearrc!"

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

How reproducible:
Always

Steps to Reproduce:
1. Create a php application
2. In app's local repo, add force_clean_build marker
touch .openshift/markers/force_clean_build
3. make some change in repo and git push
  
Actual results:
remote: Running .openshift/action_hooks/pre_build
remote: .openshift/markers/force_clean_build found!  Recreating pear libs
remote: 
remote: Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EDT/-4.0/DST' instead in Registry.php on line 1012
remote: PHP Warning:  date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EDT/-4.0/DST' instead in /usr/share/pear/PEAR/Registry.php on line 1012
............
remote: no write access to /var/lib/stickshift/1dfbcad1b4cc4908a9a9237c997f5c6f/.pearrc!

Expected results:
force_clean_build should be successful.

Additional info:
Added output as attachement.

Comment 1 Dan Mace 2012-10-01 14:58:37 UTC
This issue exists in master as well as the fork under test, and could be a long standing issue.  The ~/.pearrc file is not writable by the gear user.  When force_clean_build is enabled, the build attempts to re-write the pearrc file; however, the build is executed in the context in the context of the gear user, causing the write to fail.

Comment 2 Dan Mace 2012-10-01 15:16:29 UTC
Resolved by: https://github.com/openshift/crankcase/pull/551

Comment 3 Dan Mace 2012-10-01 16:56:50 UTC
Fixed in devenv_2257+.

Comment 4 Chandrika Gole 2012-10-01 23:36:13 UTC
verified on devenv_2259