Bug 961203 - An error was caught when executing V2 migration for cron cartridge
An error was caught when executing V2 migration for cron cartridge
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Containers (Show other bugs)
2.x
Unspecified Unspecified
high Severity medium
: ---
: ---
Assigned To: Dan McPherson
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-09 02:13 EDT by Jianwei Hou
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:55:24 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 Jianwei Hou 2013-05-09 02:13:08 EDT
Description of problem:
When Migrating cron cartridge from v1 to v2 format, an error was seen during the migration executing: "Unable to find migrator for ..."(see the Actual results below).

Version-Release number of selected component (if applicable):
Upgraded from devenv_345 to devenv_3200

How reproducible:
Always

Steps to Reproduce:
1. Launch a devenv-stage_345 ami
2. Create app with cron cartridge
3. scp -r ~/devenv-local and /etc/yum.repos.d/local.repo from devenv_3200 instance to same location on devenv-stage_345 instance
4. yum -y update --enablerepo devenv-local (This will upgrade devenv-stage_345 to devenv_3200)
5. oo-cart-version -c v2
6. rhc-v2-migrate --version 2.0.28
  
Actual results:
When migrating cron, there was an error, see the log here:

Migrating app 'zqdiy' gear 'zqdiy' with uuid '493694075307928059904000' on node 'ip-10-137-43-82' for user: zzhao@redhat.com
Migrating gear on node with: /usr/bin/rhc-v2-migrate --login 'zzhao@redhat.com' --migrate-gear '493694075307928059904000' --app-name 'zqdiy' --version '2.0.28'
Migrating on node...
***time_migrate_on_node_measured_from_broker=19485***
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_METRICS_PORT 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 HISTFILE to raw value
Migrating TMP_DIR to raw value
Migrating OPENSHIFT_DIY_PORT to raw value
Migrating OPENSHIFT_DIY_IP 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 OPENSHIFT_METRICS_LOG_DIR to raw value
Migrating PATH to raw value
Migrating OPENSHIFT_METRICS_IP to raw value
Migrating OPENSHIFT_DIY_LOG_DIR to raw value
Marking step env_vars_to_raw complete
Marking step cron_create_directory complete
Marking step cron_setup complete
Marking step cron_erb complete
Unable to find migrator for <Cartridge: @manifest: {"Name"=>"cron", "Cartridge-Short-Name"=>"CRON", "Version"=>1.4, "Architecture"=>"noarch", "Display-Name"=>"Cron 1.4", "Description"=>"The Cron cartridge allows you to run command line programs at scheduled times. Use this for background jobs and periodic processing.", "License"=>"ASL 2.0", "License-Url"=>"http://www.apache.org/licenses/LICENSE-2.0.txt", "Website"=>"http://www.openshift.com/", "Cartridge-Version"=>"0.0.1", "Cartridge-Vendor"=>"redhat", "Categories"=>["embedded"], "Help-Topics"=>{"Getting Started Guide"=>"https://www.openshift.com/blogs/getting-started-with-cron-jobs-on-openshift"}, "Provides"=>["cron-1.4", "cron", "scheduler-service", "cron-service"], "Publishes"=>{"get-job-listing"=>{"Type"=>"STRING:jobs"}}, "Subscribes"=>{"add-job"=>{"Type"=>"STRING:job"}, "remove-job"=>{"Type"=>"STRING:job"}}, "Scaling"=>{"Min"=>1, "Max"=>1}, "Install-Build-Required"=>false} @manifest_path: /var/lib/openshift/.cartridge_repository/redhat-cron/0.0.1/metadata/manifest.yml @version: 1.4 @cartridge_vendor: redhat @cartridge_version: 0.0.1 @name: cron @short_name: CRON @categories: ["embedded"] @is_deployable: false @is_web_proxy: false @install_build_required: false @directory: cron @repository_path: /var/lib/openshift/.cartridge_repository/redhat-cron/0.0.1 @endpoints: []  >
Marking step cron_hook complete
Marking step cron_connect_frontend complete
Marking step metrics_create_directory complete
Marking step metrics_setup complete
Marking step metrics_erb complete
applying metrics-0.1 migration post-process
Moving contents of metrics-0.1/logs to metrics/logs
 Moving /var/lib/openshift/493694075307928059904000/metrics-0.1/logs/error_log-20130509-000000-EST
Marking step metrics_hook complete
Marking step metrics_connect_frontend complete
Marking step diy_create_directory complete
Marking step diy_setup complete
Marking step diy_erb complete
applying diy-0.1 migration post-process
Moving contents of diy-0.1/logs to diy/logs
 Moving /var/lib/openshift/493694075307928059904000/diy-0.1/logs/server.log
Marking step diy_hook complete
Marking step diy_connect_frontend complete
Pre-migration state: started
Post-migration response code: 200
Leaving migration metadata in place due to problem detected with gear status
Status: CLIENT_RESULT: cron scheduling service is enabled
CLIENT_RESULT: Metrics is running
CLIENT_RESULT: Application is running

***time_migrate_on_node_measured_from_node=19129***

***time_redeploy_httpd_proxy=0***
***time_restart=0***
***time_total_migrate_gear_measured_from_broker=19510***


Expected results:
The error is not expected 

Additional info:
Giving a low severity since this app is migrated successfully although there is an error.
Comment 1 Dan McPherson 2013-05-09 11:27:52 EDT
Sorry this feature didn't make it in till devenv_3201.  Can you please try again on the latest.
Comment 2 Jianwei Hou 2013-05-13 01:17:20 EDT
This is still seen when upgrade devenv-stage_351 to devenv_3219 and migrate again.

Steps:
1. Launch a devenv-stage_351 ami
2. Create app with cron cartridge(v1 format)
3. scp -r ~/devenv-local and /etc/yum.repos.d/local.repo from devenv_3219 instance to same location on devenv-stage_351 instance
4. yum -y update --enablerepo devenv-local
5. oo-cart-version -c v2
6. rhc-v2-migrate --version 2.0.28

When cron cartridge is being migrated, this message is still seen
Unable to find migrator for <Cartridge: @manifest: {"Name"=>"cron", "Cartridge-Short-Name"=>"CRON", "Version"=>1.4, "Architecture"=>"noarch", "Display-Name"=>"Cron 1.4", "Description"=>"The Cron cartridge allows you to run command line programs at scheduled times. Use this for background jobs and periodic processing.", "License"=>"ASL 2.0", "License-Url"=>"http://www.apache.org/licenses/LICENSE-2.0.txt", "Website"=>"http://www.openshift.com/", "Cartridge-Version"=>"0.0.1", "Cartridge-Vendor"=>"redhat", "Categories"=>["embedded"], "Help-Topics"=>{"Getting Started Guide"=>"https://www.openshift.com/blogs/getting-started-with-cron-jobs-on-openshift"}, "Provides"=>["cron-1.4", "cron", "scheduler-service", "cron-service"], "Publishes"=>{"get-job-listing"=>{"Type"=>"STRING:jobs"}}, "Subscribes"=>{"add-job"=>{"Type"=>"STRING:job"}, "remove-job"=>{"Type"=>"STRING:job"}}, "Scaling"=>{"Min"=>1, "Max"=>1}, "Install-Build-Required"=>false} @manifest_path: /var/lib/openshift/.cartridge_repository/redhat-cron/0.0.1/metadata/manifest.yml @version: 1.4 @cartridge_vendor: redhat @cartridge_version: 0.0.1 @name: cron @short_name: CRON @categories: ["embedded"] @is_deployable: false @is_web_proxy: false @install_build_required: false @directory: cron @repository_path: /var/lib/openshift/.cartridge_repository/redhat-cron/0.0.1 @endpoints: []  >
Comment 3 Dan McPherson 2013-05-13 09:39:00 EDT
Again the fix wasn't in until 3201.  Please try again with the latest.
Comment 4 Dan McPherson 2013-05-13 10:40:28 EDT
Sorry about the last comment.  I misread.
Comment 5 Dan McPherson 2013-05-13 15:09:31 EDT
https://github.com/openshift/li/pull/1361
Comment 7 Jianwei Hou 2013-05-14 01:20:00 EDT
This is verified on devenv_3223
...........
Carts to migrate: ["cron-1.4", "php-5.3"]
Migrating cartridge cron
Marking step cron_create_directory complete
Marking step cron_setup complete
Marking step cron_erb complete
applying cron-1.4 migration post-process
Marking step cron_hook complete
Marking step cron_reconfigure_git_repo complete
Marking step cron_connect_frontend complete
Migrating cartridge php
Marking step php_create_directory complete
Marking step php_setup complete
Marking step php_erb complete
applying php-5.3 migration post-process
Moving contents of php-5.3/logs to php/logs
 Moving /var/lib/openshift/5191a24c33f82844dc000003/php-5.3/logs/error_log-20130514-000000-EST
Moving contents of php-5.3/sessions to php/sessions
Marking step php_hook complete
Marking step php_reconfigure_git_repo complete
Marking step php_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=57412***

***time_redeploy_httpd_proxy=0***
***time_restart=0***
***time_total_migrate_gear_measured_from_broker=57591***

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