Bug 962627 - Can't git push python-2.7 application successfully after migrate it from v1 to v2
Can't git push python-2.7 application successfully after migrate it from v1 t...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Containers (Show other bugs)
2.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Dan McPherson
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-14 01:32 EDT by Rony Gong
Modified: 2015-05-14 19:11 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-06-10 23:56:56 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 Rony Gong 2013-05-14 01:32:48 EDT
Description of problem:
Can't git push python-2.7 application successfully after migrate it from v1 to v2
This issue happened for non_scalable and scalable application.

After do migration on python-2.7 application from v1 to v2.
then do some small updates, do git push, show error.
remote: /var/lib/openshift/8baeb244bc3d11e29a6b22000a880b50/python//lib/util: line 21: /var/lib/openshift/8baeb244bc3d11e29a6b22000a880b50/python//env/OPENSHIFT_PYTHON_PATH_ELEMENT: Permission denied
remote: Failed to execute: 'control process-version' for /var/lib/openshift/8baeb244bc3d11e29a6b22000a880b50/python: rc(1)
remote: stdout: #<IO:0x000000014112d8>
remote: stderr#<IO:0x00000001411260>



Version-Release number of selected component (if applicable):
migrate from devenv_stage_351 to devenv_3223

How reproducible:
Always

Steps to Reproduce:
1.Create an python-2.7 app in the devenv_stage_351,  v1 env.
2.Then do migration, upgrade to devenv_3223, v2 env.
3.Do small change(update the title of wsgi/application) to this app, and git push
  
Actual results:
[qgong@dhcp-8-119 qpython27]$ gitpush
[master 9922c00] update
The fingerprint for the RSA key sent by the remote host is
66:a8:79:ef:1f:4b:de:5c:03:94:cb:ce:e6:5d:c4:b0.
Please contact your system administrator.
Add correct host key in /home/qgong/.ssh/known_hosts to get rid of this message.
Offending key in /home/qgong/.ssh/known_hosts:11
Password authentication is disabled to avoid man-in-the-middle attacks.
Keyboard-interactive authentication is disabled to avoid man-in-the-middle attacks.
Counting objects: 7, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 362 bytes, done.
Total 4 (delta 2), reused 0 (delta 0)
remote: ++ cartridge_type=python-3.3
remote: ++ distribute_setup_uri=http://python-distribute.org/distribute_setup.py
remote: ++ python33_dir=/var/lib/openshift/8baeb244bc3d11e29a6b22000a880b50/python/
remote: ++ python33_binary=/var/lib/openshift/8baeb244bc3d11e29a6b22000a880b50/python//opt/bin/python3.3
remote: ++ pyvenv33_script=/var/lib/openshift/8baeb244bc3d11e29a6b22000a880b50/python//opt/bin/pyvenv-3.3
remote: ++ venv_dir=/var/lib/openshift/8baeb244bc3d11e29a6b22000a880b50/python//virtenv/venv
remote: ++ export LD_LIBRARY_PATH=/var/lib/openshift/8baeb244bc3d11e29a6b22000a880b50/python//opt/lib:
remote: ++ LD_LIBRARY_PATH=/var/lib/openshift/8baeb244bc3d11e29a6b22000a880b50/python//opt/lib:
remote: + case "$1" in
remote: + _stop_service
remote: + _is_running
remote: + '[' -f /var/lib/openshift/8baeb244bc3d11e29a6b22000a880b50/python//run/appserver.pid ']'
remote: ++ cat /var/lib/openshift/8baeb244bc3d11e29a6b22000a880b50/python//run/appserver.pid
remote: + zpid=3667
remote: ++ id -u
remote: + myid=509
remote: ++ ps -opid,args --pid 3667
remote: ++ grep app.py
remote: + return 0
remote: + '[' -f /var/lib/openshift/8baeb244bc3d11e29a6b22000a880b50/python//run/appserver.pid ']'
remote: ++ cat /var/lib/openshift/8baeb244bc3d11e29a6b22000a880b50/python//run/appserver.pid
remote: + zpid=3667
remote: + '[' -n 3667 ']'
remote: + /bin/kill 3667
remote: + ret=0
remote: + '[' 0 -eq 0 ']'
remote: + TIMEOUT=10
remote: + '[' 10 -gt 0 ']'
remote: + _is_running
remote: + '[' -f /var/lib/openshift/8baeb244bc3d11e29a6b22000a880b50/python//run/appserver.pid ']'
remote: ++ cat /var/lib/openshift/8baeb244bc3d11e29a6b22000a880b50/python//run/appserver.pid
remote: + zpid=3667
remote: ++ id -u
remote: + myid=509
remote: ++ ps -opid,args --pid 3667
remote: ++ grep app.py
remote: + return 1
remote: The 10-gen-mms-agent is already stopped!
remote: ++ cartridge_type=python-3.3
remote: ++ distribute_setup_uri=http://python-distribute.org/distribute_setup.py
remote: ++ python33_dir=/var/lib/openshift/8baeb244bc3d11e29a6b22000a880b50/python/
remote: ++ python33_binary=/var/lib/openshift/8baeb244bc3d11e29a6b22000a880b50/python//opt/bin/python3.3
remote: ++ pyvenv33_script=/var/lib/openshift/8baeb244bc3d11e29a6b22000a880b50/python//opt/bin/pyvenv-3.3
remote: ++ venv_dir=/var/lib/openshift/8baeb244bc3d11e29a6b22000a880b50/python//virtenv/venv
remote: ++ export LD_LIBRARY_PATH=/var/lib/openshift/8baeb244bc3d11e29a6b22000a880b50/python//opt/lib:
remote: ++ LD_LIBRARY_PATH=/var/lib/openshift/8baeb244bc3d11e29a6b22000a880b50/python//opt/lib:
remote: + case "$1" in
remote: + _stop_service
remote: + _is_running
remote: + '[' -f /var/lib/openshift/8baeb244bc3d11e29a6b22000a880b50/python//run/appserver.pid ']'
remote: ++ cat /var/lib/openshift/8baeb244bc3d11e29a6b22000a880b50/python//run/appserver.pid
remote: + zpid=3667
remote: ++ id -u
remote: + myid=509
remote: ++ ps -opid,args --pid 3667
remote: ++ grep app.py
remote: + return 1
remote: + echo 'python-3.3 application is already stopped!'
remote: python-3.3 application is already stopped!
remote: + return 0
remote: [Tue May 14 01:11:25 2013] [warn] module php5_module is already loaded, skipping
remote: CLIENT_RESULT: MongoDB already stopped
remote: ++ cartridge_type=python-3.3
remote: ++ distribute_setup_uri=http://python-distribute.org/distribute_setup.py
remote: ++ python33_dir=/var/lib/openshift/8baeb244bc3d11e29a6b22000a880b50/python/
remote: ++ python33_binary=/var/lib/openshift/8baeb244bc3d11e29a6b22000a880b50/python//opt/bin/python3.3
remote: ++ pyvenv33_script=/var/lib/openshift/8baeb244bc3d11e29a6b22000a880b50/python//opt/bin/pyvenv-3.3
remote: ++ venv_dir=/var/lib/openshift/8baeb244bc3d11e29a6b22000a880b50/python//virtenv/venv
remote: ++ export LD_LIBRARY_PATH=/var/lib/openshift/8baeb244bc3d11e29a6b22000a880b50/python//opt/lib:
remote: ++ LD_LIBRARY_PATH=/var/lib/openshift/8baeb244bc3d11e29a6b22000a880b50/python//opt/lib:
remote: + case "$1" in
remote: /var/lib/openshift/8baeb244bc3d11e29a6b22000a880b50/python//lib/util: line 21: /var/lib/openshift/8baeb244bc3d11e29a6b22000a880b50/python//env/OPENSHIFT_PYTHON_PATH_ELEMENT: Permission denied
remote: Failed to execute: 'control process-version' for /var/lib/openshift/8baeb244bc3d11e29a6b22000a880b50/python: rc(1)
remote: stdout: #<IO:0x000000014112d8>
remote: stderr#<IO:0x00000001411260>
remote: /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-node-1.9.1/lib/openshift-origin-node/model/v2_cart_model.rb:950:in `block in do_control_with_directory'
remote: /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-node-1.9.1/lib/openshift-origin-node/model/v2_cart_model.rb:776:in `process_cartridges'
remote: /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-node-1.9.1/lib/openshift-origin-node/model/v2_cart_model.rb:923:in `do_control_with_directory'
remote: /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-node-1.9.1/lib/openshift-origin-node/model/v2_cart_model.rb:799:in `do_control'
remote: /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-node-1.9.1/lib/openshift-origin-node/model/application_container.rb:488:in `build'
remote: /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-node-1.9.1/lib/openshift-origin-node/model/default_builder.rb:37:in `post_receive'
remote: /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-node-1.9.1/lib/openshift-origin-node/model/application_container.rb:421:in `post_receive'
remote: /usr/bin/gear:133:in `block (3 levels) in <main>'
remote: /usr/bin/gear:80:in `do_command'
remote: /usr/bin/gear:132:in `block (2 levels) in <main>'
remote: /opt/rh/ruby193/root/usr/share/gems/gems/commander-4.0.3/lib/commander/command.rb:180:in `call'
remote: /opt/rh/ruby193/root/usr/share/gems/gems/commander-4.0.3/lib/commander/command.rb:180:in `call'
remote: /opt/rh/ruby193/root/usr/share/gems/gems/commander-4.0.3/lib/commander/command.rb:155:in `run'
remote: /opt/rh/ruby193/root/usr/share/gems/gems/commander-4.0.3/lib/commander/runner.rb:385:in `run_active_command'
remote: /opt/rh/ruby193/root/usr/share/gems/gems/commander-4.0.3/lib/commander/runner.rb:62:in `run!'
remote: /opt/rh/ruby193/root/usr/share/gems/gems/commander-4.0.3/lib/commander/delegates.rb:11:in `run!'
remote: /opt/rh/ruby193/root/usr/share/gems/gems/commander-4.0.3/lib/commander/import.rb:10:in `block in <top (required)>'
To ssh://8baeb244bc3d11e29a6b22000a880b50@qpython27-qgong1.dev.rhcloud.com/~/git/qpython27.git/
   7125979..9922c00  master -> master

and application can't be accessed any more.
Expected results:
Shouldn't show error info when git push, and application could be accessed well after git push

Additional info:
Comment 1 Mrunal Patel 2013-05-15 11:07:42 EDT
Fixed in devenv_3228+
Comment 2 Rony Gong 2013-05-16 06:44:37 EDT
reassigned on migration to devenv_3232

[root@dhcp-8-119 qpython27]# gitpush
[master 5876d9a] update
 Committer: root <root@dhcp-8-119.nay.redhat.com>
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly:

    git config --global user.name "Your Name"
    git config --global user.email you@example.com

If the identity used for this commit is wrong, you can fix it with:

    git commit --amend --author='Your Name <you@example.com>'

 1 files changed, 1 insertions(+), 1 deletions(-)
Counting objects: 7, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 374 bytes, done.
Total 4 (delta 2), reused 0 (delta 0)
remote: /var/lib/openshift/51943db507b36a0a3f000001/10gen-mms-agent/bin/control: line 54: kill: (3008) - No such process
remote: An error occured executing the 'prereceive' command. For more details about the problem, try running the command again with the '--trace' option.
To ssh://51943db507b36a0a3f000001@qpython27-qgong2.dev.rhcloud.com/~/git/qpython27.git/
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'ssh://51943db507b36a0a3f000001@qpython27-qgong2.dev.rhcloud.com/~/git/qpython27.git/'
Comment 3 Rony Gong 2013-05-16 06:47:37 EDT
Commet2 issue is only happened for non_scalable python-2.7 application, scalable application works well for git push after migration.
Comment 4 Mrunal Patel 2013-05-16 11:18:53 EDT
Looks like the failure was in stopping 10gen-mms-agent. Was that embedded into the python app before migration?
Comment 6 Rony Gong 2013-05-16 21:36:25 EDT
(In reply to comment #4)
> Looks like the failure was in stopping 10gen-mms-agent. Was that embedded
> into the python app before migration?

Yes,  10gen-mms-agent was embed into the python app before migration.
Comment 7 chunchen 2013-05-17 03:13:00 EDT
It's fixed, verified on upgrading devenv-stage_353 to devenv_3235, please refer to the following results:

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

[root test]# cd cpython27cronmms

[root cpython27cronmms]# echo testdata>ctest.txt

[root cpython27cronmms]# git add .; git commit -amp ; git push
[master 81778e2] p
 1 file changed, 1 insertion(+)
 create mode 100644 ctest.txt
Counting objects: 4, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 272 bytes, done.
Total 3 (delta 1), reused 0 (delta 0)
remote: CLIENT_RESULT: Stopping CRON cart
remote: [Fri May 17 03:06:15 2013] [warn] module php5_module is already loaded, skipping
remote: Waiting for stop to finish
remote: /var/lib/openshift/5195b81e196c200884000004/10gen-mms-agent/bin/control: line 54: kill: (4352) - No such process
remote: The 10-gen-mms-agent is already stopped!
remote: python-2.7 application is already stopped!
remote: CLIENT_RESULT: Stopping CRON cart
remote: CLIENT_RESULT: cron scheduling service is already disabled
remote: [Fri May 17 03:06:20 2013] [warn] module php5_module is already loaded, skipping
remote: httpd (no pid file) not running
remote: CLIENT_RESULT: MongoDB already stopped
remote: [Fri May 17 03:06:34 2013] [warn] module php5_module is already loaded, skipping
remote: Starting WSGIServer on 127.0.253.129:8080 ... 
remote: python-2.7 application is already running
remote: [Fri May 17 03:06:44 2013] [warn] module php5_module is already loaded, skipping
remote: httpd (pid 31527) already running
remote: CLIENT_RESULT: MongoDB already running
remote: CLIENT_RESULT: Starting CRON cart
remote: CLIENT_RESULT: Starting CRON cart
remote: CLIENT_RESULT: cron scheduling service is already enabled
To ssh://5195b81e196c200884000004@cpython27cronmms-cdmm.dev.rhcloud.com/~/git/cpython27cronmms.git/
   4a6d463..81778e2  master -> master

[root cpython27cronmms]# rhc app ssh
Connecting to 5195b81e196c200884000004@cpython27cronmms-cdmm.dev.rhcloud.com ...
bash: export: `repo"': not a valid identifier
bash: export: `"node_modules"': not a valid identifier
bash: export: `"../.m2"': not a valid identifier
bash: export: `".openshift"': not a valid identifier
bash: export: `"deployments"': not a valid identifier
bash: export: `"perl5lib"': not a valid identifier
bash: export: `"phplib"': not a valid identifier
bash: export: `)': not a valid identifier

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

    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.

[cpython27cronmms-cdmm.dev.rhcloud.com 5195b81e196c200884000004]\> ls -l app-root/runtime/repo/ctest.txt 
-rw-r--r--. 1 5195b81e196c200884000004 5195b81e196c200884000004 9 May 17 03:04 app-root/runtime/repo/ctest.txt

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