Bug 962661 - Python-2.7 v2 migration is referring to python-3.3 executable
Python-2.7 v2 migration is referring to python-3.3 executable
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Containers (Show other bugs)
2.x
Unspecified Unspecified
low Severity low
: ---
: ---
Assigned To: Mrunal Patel
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-14 03:51 EDT by Jianwei Hou
Modified: 2015-05-14 19:11 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-06-10 23:57:18 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)
migration log (126.86 KB, text/x-log)
2013-05-14 03:51 EDT, Jianwei Hou
no flags Details

  None (edit)
Description Jianwei Hou 2013-05-14 03:51:48 EDT
Created attachment 747544 [details]
migration log

Description of problem:
While migrating python-2.7 cartridge from v1 to v2 format, the migrator was referring to python-3.3 directory, libs and executables. not sure if this is intended, so opening a bug to keep track.

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

How reproducible:
Always

Steps to Reproduce:
1. Launch a devenv-stage_351 ami
2. python-2.7 applications
3. scp -r ~/devenv-local and /etc/yum.repos.d/local.repo from devenv_3223 instance to same location on devenv-stage_351 instance
4. yum -y update --enablerepo devenv-local (the instance will be default to v2 format after upgrade)
6. rhc-v2-migrate --version 2.0.28
  
Actual results:
After step 6, the migrator was referring to python-3.3 executable. You may notice that this application's web framework is python-2.7 cartridge, and gear dir is "/var/lib/openshift/8baeb244bc3d11e29a6b22000a880b50/". but it later referred to python-3.3 executable under same dir.

<------------------------>
Migrating app 'qpython27' gear 'qpython27' with uuid '8baeb244bc3d11e29a6b22000a880b50' on node 'ip-10-136-11-80' for user: qgong@redhat.com
Migrating gear on node with: /usr/bin/rhc-v2-migrate --login 'qgong@redhat.com' --migrate-gear '8baeb244bc3d11e29a6b22000a880b50' --app-name 'qpython27' --version '2.0.28'
Migrating on node...

.............

Carts to migrate: ["python-2.7", "10gen-mms-agent-0.1", "rockmongo-1.1", "mongodb-2.2"]

.............

Pre-migration state: started
Post-migration response code: 200
Leaving migration metadata in place due to problem detected with gear status
Status: CLIENT_RESULT: Running
Application is either stopped or inaccessible
++ cartridge_type=python-3.3
++ distribute_setup_uri=http://python-distribute.org/distribute_setup.py
++ python33_dir=/var/lib/openshift/8baeb244bc3d11e29a6b22000a880b50/python/
++ python33_binary=/var/lib/openshift/8baeb244bc3d11e29a6b22000a880b50/python//opt/bin/python3.3
++ pyvenv33_script=/var/lib/openshift/8baeb244bc3d11e29a6b22000a880b50/python//opt/bin/pyvenv-3.3
++ venv_dir=/var/lib/openshift/8baeb244bc3d11e29a6b22000a880b50/python//virtenv/venv
++ export LD_LIBRARY_PATH=/var/lib/openshift/8baeb244bc3d11e29a6b22000a880b50/python//opt/lib:
++ LD_LIBRARY_PATH=/var/lib/openshift/8baeb244bc3d11e29a6b22000a880b50/python//opt/lib:
+ case "$1" in
+ status
++ wget -q http://127.0.254.129:8080/
+ output=
+ echo 'Application is either stopped or inaccessible'
CLIENT_RESULT: MongoDB is running
CLIENT_RESULT: Rockmongo is running
<------------------------>


Expected results:
Should not refer to python-3.3 executable since it's a python-2.7 application.

Additional info:
Added migration log, the app names are 'qpython27' and 'qspython27'
Comment 1 Jianwei Hou 2013-05-16 06:40:26 EDT
Tested when migrating on devenv_3232, the python-2.7 cartridge can not be migrated successfully, this has been reproduced twice. Here is the log

Migrating gear on node with: /usr/bin/rhc-admin-migrate --login 'jhou@redhat.com' --migrate-gear '5194a99fef5cf00787000001' --app-name 'python27' --version '2.0.28'
Migrating on node...
***time_migrate_on_node_measured_from_broker=1444***
Migrate on node output:
 Beginning V1 -> V2 migration
V1 stop lock not detected
Marking step migrate_stop_lock complete
Carts to migrate: ["python-2.7"]
Migrating cartridge python
Caught an exception during internal migration steps: Failed to execute: 'control status' for /var/lib/openshift/5194a99fef5cf00787000001/python
/opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-node-1.9.1/lib/openshift-origin-node/model/v2_cart_model.rb:977:in `block in do_control_with_directory'
/opt/rh/ruby193/root/usr/libexec/mcollective/mcollective/lib/migrate.rb:56:in `process_cartridges'
/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 `do_control_with_directory'
/opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-node-1.9.1/lib/openshift-origin-node/model/v2_cart_model.rb:812:in `do_control'
/opt/rh/ruby193/root/usr/libexec/mcollective/mcollective/lib/migrate.rb:72:in `block in gear_status'
/opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-node-1.9.1/lib/openshift-origin-node/model/v2_cart_model.rb:78:in `block in each_cartridge'
/opt/rh/ruby193/root/usr/libexec/mcollective/mcollective/lib/migrate.rb:63:in `block in process_cartridges'
/opt/rh/ruby193/root/usr/libexec/mcollective/mcollective/lib/migrate.rb:60:in `each'
/opt/rh/ruby193/root/usr/libexec/mcollective/mcollective/lib/migrate.rb:60:in `process_cartridges'
/opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-node-1.9.1/lib/openshift-origin-node/model/v2_cart_model.rb:76:in `each_cartridge'
/opt/rh/ruby193/root/usr/libexec/mcollective/mcollective/lib/migrate.rb:71:in `gear_status'
/opt/rh/ruby193/root/usr/libexec/mcollective/mcollective/lib/migrate.rb:515:in `validate_gear'
/opt/rh/ruby193/root/usr/libexec/mcollective/mcollective/lib/migrate.rb:173:in `migrate'
/opt/rh/ruby193/root/usr/libexec/mcollective/mcollective/agent/libra.rb:66:in `migrate_action'
/opt/rh/ruby193/root/usr/share/ruby/mcollective/rpc/agent.rb:86:in `handlemsg'
/opt/rh/ruby193/root/usr/share/ruby/mcollective/agents.rb:126:in `block (2 levels) in dispatch'
/opt/rh/ruby193/root/usr/share/ruby/timeout.rb:68:in `timeout'
/opt/rh/ruby193/root/usr/share/ruby/mcollective/agents.rb:125:in `block in dispatch'
Migrate on node exit code: 1
Comment 3 Jianwei Hou 2013-05-17 02:50:05 EDT
This is verified after migrated to devenv_3235 and migrate. The python-2.7 can be migrated successfully.

Migrating app 'py27' gear 'py27' with uuid '941eff1ebeb411e2936322000aa63b64' on node 'ip-10-166-59-100' for user: jhou@redhat.com
Migrating gear on node with: /usr/bin/rhc-admin-migrate --login 'jhou@redhat.com' --migrate-gear '941eff1ebeb411e2936322000aa63b64' --app-name 'py27' --version '2.0.28'
Migrating on node...
***time_migrate_on_node_measured_from_broker=42784***
Migrate on node output:
 Beginning V1 -> V2 migration
Marking step inspect_gear_state complete
V1 stop lock not detected
Marking step migrate_stop_lock complete
Marking step stop_gear complete
Marking step typeless_translated_vars complete
Marking step gear_env_cleanup complete
Migrating TMP to raw value
Migrating HOME to raw value
Migrating OPENSHIFT_REPO_DIR to raw value
Migrating OPENSHIFT_INTERNAL_PORT to raw value
Migrating OPENSHIFT_APP_DNS to raw value
Migrating OPENSHIFT_GEAR_DNS to raw value
Migrating OPENSHIFT_HOMEDIR to raw value
Migrating TMPDIR to raw value
Migrating OPENSHIFT_APP_UUID to raw value
Migrating OPENSHIFT_PYTHON_PORT to raw value
Migrating OPENSHIFT_SYNC_GEARS_DIRS to raw value
Migrating HISTFILE to raw value
Migrating TMP_DIR to raw value
Migrating OPENSHIFT_PYTHON_LOG_DIR to raw value
Migrating OPENSHIFT_TMP_DIR to raw value
Migrating OPENSHIFT_APP_NAME to raw value
Migrating OPENSHIFT_INTERNAL_IP to raw value
Migrating OPENSHIFT_GEAR_UUID to raw value
Migrating OPENSHIFT_DATA_DIR to raw value
Migrating OPENSHIFT_GEAR_NAME to raw value
Migrating PATH to raw value
Migrating OPENSHIFT_PYTHON_IP to raw value
Marking step env_vars_to_raw complete
Marking step relocate_uservars complete
Marking step reconfigure_git_repo complete
Carts to migrate: ["python-2.7"]
Migrating cartridge python
Marking step python_create_directory complete
Initialized empty Git repository in /var/lib/openshift/941eff1ebeb411e2936322000aa63b64/python/upstream-repo/.git/
Marking step python_setup complete
Marking step python_erb complete
applying python-2.7 migration post-process
Moving contents of python-2.7/logs to python/logs
 Moving /var/lib/openshift/941eff1ebeb411e2936322000aa63b64/python-2.7/logs/appserver.log
Moving contents of python-2.7/virtenv to python/virtenv
 Moving /var/lib/openshift/941eff1ebeb411e2936322000aa63b64/python-2.7/virtenv/lib
 Moving /var/lib/openshift/941eff1ebeb411e2936322000aa63b64/python-2.7/virtenv/include
 Moving /var/lib/openshift/941eff1ebeb411e2936322000aa63b64/python-2.7/virtenv/bin
Marking step python_hook complete
Marking step python_connect_frontend complete
Pre-migration state: started
Post-migration response code: 200
Marking step validate_gear complete
Cleaning up after migration***time_migrate_on_node_measured_from_node=42644***

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