Bug 963634 - [runtime_card#303]Failed to git push after executing V2 migration for ruby-1.9 application
[runtime_card#303]Failed to git push after executing V2 migration for ruby-1....
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Containers (Show other bugs)
2.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Jhon Honce
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-16 05:54 EDT by Wei Sun
Modified: 2015-05-14 19:11 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-06-10 23:58:40 EDT
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)

  None (edit)
Description Wei Sun 2013-05-16 05:54:39 EDT
Description of problem:
After executing v2 migration,failed to git push for ruby-1.9 application with some error :
remote: An error occured executing the 'postreceive' command. For more details about the problem, try running the command again with the '--trace' option

Version-Release number of selected component (if applicable):
Upgrading devenv-stage_353 to devenv_3232 and migrate

How reproducible:
Always

Steps to Reproduce:
1. Launch devenv-stage_353
2. Create a ruby-1.9 app
3. Add V1 marker to node
touch /var/lib/openshift/.settings/v1_cartridge_format
4. scp -r ~/devenv-local and /etc/yum.repos.d/* from devenv_3232 instance to same location on devenv-stage_353 instance
5. yum update -y --enablerepo devenv-local
6. Run oo-admin-clear-pending-ops
7. Remove the v1 marker from the node
rm -f /var/lib/openshift/.settings/v1_cartridge_format
8. Clear the broker cache
rake tmp:clear
9. Restart the rhc-broker and mcollective
10. Run migrate-mongo-2.0.28 
11. Run rhc-admin-migrate --version 2.0.28
12.Git clone the app
13.Change something and git push

Actual results:
[sunwei@dhcp-8-229 r9]$ gitpush 
[master 0ec105b] test
 1 file changed, 1 insertion(+), 1 deletion(-)
Counting objects: 5, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 282 bytes, done.
Total 3 (delta 2), reused 0 (delta 0)
remote: Stopping Ruby cart
remote: httpd (no pid file) not running
remote: Stopping Ruby cart
remote: httpd (no pid file) not running
remote: /var/lib/openshift/5194410307b36a073b000003/ruby//lib/util: line 22: /var/lib/openshift/5194410307b36a073b000003/ruby//env/OPENSHIFT_RUBY_PATH_ELEMENT: Permission denied
remote: An error occured executing the 'postreceive' command. For more details about the problem, try running the command again with the '--trace' option.
To ssh://5194410307b36a073b000003@r9-wsun3231mi.dev.rhcloud.com/~/git/r9.git/
   24f9e94..0ec105b  master -> master


Expected results:
Can git push successfully

Additional info:
Comment 1 Jhon Honce 2013-05-16 15:17:19 EDT
Fixed in https://github.com/openshift/origin-server/pull/2516
Comment 2 openshift-github-bot 2013-05-16 16:44:33 EDT
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/5d80e8c7feca8e1ea743b765795cb3fb6ecd0ced
Bug 963634 - Need to create all 1.9.3 env vars in setup

* OPENSHIFT_RUBY_PATH_ELEMENT was not created in setup and env directory was locked.
  This prevented update-configuration from making the change.
Comment 3 chunchen 2013-05-17 03:01:23 EDT
It's fixed, verified on upgrading devenv-stage_353 to devenv_3235, please refer to the following results:

[root test]# rhc git-clone cruby19
Cloning into 'cruby19'...
Warning: Permanently added 'cruby19-cdmm.dev.rhcloud.com' (RSA) to the list of known hosts.
Your application code is now in 'cruby19'

[root test]# cd cruby19

[root cruby19]# echo oio3>l.txt

[root cruby19]# git add .; git commit -amp ; git push
[master 0e8cf8f] p
 1 file changed, 1 insertion(+)
 create mode 100644 l.txt
Counting objects: 4, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 263 bytes, done.
Total 3 (delta 1), reused 0 (delta 0)
remote: Stopping Ruby cart
remote: Waiting for stop to finish
remote: Waiting for stop to finish
remote: Waiting for stop to finish
remote: Waiting for stop to finish
remote: Stopping Ruby cart
remote: httpd (no pid file) not running
remote: Running build on Ruby cart
remote: Starting Ruby cart
remote: Starting Ruby cart
remote: httpd (pid 23683) already running
To ssh://49d209f4beb111e2936322000aa63b64@cruby19-cdmm.dev.rhcloud.com/~/git/cruby19.git/
   c6687a2..0e8cf8f  master -> master

[root cruby19]# rhc ssh
Connecting to 49d209f4beb111e2936322000aa63b64@cruby19-cdmm.dev.rhcloud.com ...

    *********************************************************************

    You are accessing a service that is for use only by authorized users.  
    If you do not have authorization, discontinue use at once. 
    Any use of the services is subject to the applicable terms of the 
    agreement which can be found at: 
    https://www.openshift.com/legal

    *********************************************************************

    Welcome to OpenShift shell

    This shell will assist you in managing OpenShift applications.

    !!! IMPORTANT !!! IMPORTANT !!! IMPORTANT !!!
    Shell access is quite powerful and it is possible for you to
    accidentally damage your application.  Proceed with care!
    If worse comes to worst, destroy your application with 'rhc app delete'
    and recreate it
    !!! IMPORTANT !!! IMPORTANT !!! IMPORTANT !!!

    Type "help" for more info.

    Note: Your application supports version 2 cartridges.

[cruby19-cdmm.dev.rhcloud.com 49d209f4beb111e2936322000aa63b64]\> ls -l app-root/runtime/repo/l.txt 
-rw-r--r--. 1 49d209f4beb111e2936322000aa63b64 49d209f4beb111e2936322000aa63b64 5 May 17 02:54 app-root/runtime/repo/l.txt

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