gotime/cassandra_object — Issue #8: Migrations Fail
Author: ddkothari
Created: 2012-01-09 23:44:44+00:00
State: open

Test the migrations tasks (create, migrate, rollback, drop)

ks.rake
schema/migrator.rb
schema/migration.rb

Replicate Issue

ec2 "role:place_directory_web AND chef_environment:qa"
1) rake ks:drop
2) rake ks:create
3) rake ks:migrate

ddkothari@ip-10-194-43-217:/srv/place_directory/current$ sudo -u nobody RAILS_ENV=qa bin/rake ks:migrate --trace
** Invoke ks:migrate (first_time)
** Invoke ks:configure (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute ks:configure
** Execute ks:migrate
== CreatePlaces: migrating ===================================================
-- create_column_family Places
-> 0.0327s
-- create_column_family PlaceRelationships
rake aborted!
No live servers in [10.34.35.114:9160, 10.117.55.158:9160, 10.98.169.137:9160] since nil.
/srv/place_directory/releases/34eb3ce80f16961c24b04e495ec2e93589b659d8/vendor/bundle/ruby/1.9.1/gems/thrift_client-0.7.1/lib/thrift_client/abstract_thrift_client.rb:138:in `next_live_server'
/srv/place_directory/releases/34eb3ce80f16961c24b04e495ec2e93589b659d8/vendor/bundle/ruby/1.9.1/gems/thrift_client-0.7.1/lib/thrift_client/abstract_thrift_client.rb:103:in `connect!'
/srv/place_directory/releases/34eb3ce80f16961c24b04e495ec2e93589b659d8/vendor/bundle/ruby/1.9.1/gems/thrift_client-0.7.1/lib/thrift_client/abstract_thrift_client.rb:144:in `handled_proxy'
/srv/place_directory/releases/34eb3ce80f16961c24b04e495ec2e93589b659d8/vendor/bundle/ruby/1.9.1/gems/thrift_client-0.7.1/lib/thrift_client/abstract_thrift_client.rb:60:in `system_add_column_family'
/srv/place_directory/releases/34eb3ce80f16961c24b04e495ec2e93589b659d8/vendor/bundle/ruby/1.9.1/bundler/gems/cassandra-9cbd4416db75/lib/cassandra/cassandra.rb:270:in `add_column_family'
/srv/place_directory/releases/34eb3ce80f16961c24b04e495ec2e93589b659d8/vendor/bundle/ruby/1.9.1/gems/gotime-cassandra_object-2.9.1/lib/cassandra_object/tasks/column_family.rb:34:in `create'
/srv/place_directory/releases/34eb3ce80f16961c24b04e495ec2e93589b659d8/vendor/bundle/ruby/1.9.1/gems/gotime-cassandra_object-2.9.1/lib/cassandra_object/schema/migration.rb:48:in `block in create_column_family'
/srv/place_directory/releases/34eb3ce80f16961c24b04e495ec2e93589b659d8/vendor/bundle/ruby/1.9.1/gems/gotime-cassandra_object-2.9.1/lib/cassandra_object/schema/migration.rb:85:in `block in say_with_time'
/usr/lib/ruby/1.9.1/benchmark.rb:294:in `measure'
/srv/place_directory/releases/34eb3ce80f16961c24b04e495ec2e93589b659d8/vendor/bundle/ruby/1.9.1/gems/gotime-cassandra_object-2.9.1/lib/cassandra_object/schema/migration.rb:85:in `say_with_time'
/srv/place_directory/releases/34eb3ce80f16961c24b04e495ec2e93589b659d8/vendor/bundle/ruby/1.9.1/gems/gotime-cassandra_object-2.9.1/lib/cassandra_object/schema/migration.rb:47:in `create_column_family'
/srv/place_directory/releases/34eb3ce80f16961c24b04e495ec2e93589b659d8/ks/migrate/20110114020617_create_places.rb:8:in `up'
/srv/place_directory/releases/34eb3ce80f16961c24b04e495ec2e93589b659d8/vendor/bundle/ruby/1.9.1/gems/gotime-cassandra_object-2.9.1/lib/cassandra_object/schema/migration.rb:23:in `block in migrate'
/usr/lib/ruby/1.9.1/benchmark.rb:294:in `measure'
/srv/place_directory/releases/34eb3ce80f16961c24b04e495ec2e93589b659d8/vendor/bundle/ruby/1.9.1/gems/gotime-cassandra_object-2.9.1/lib/cassandra_object/schema/migration.rb:23:in `migrate'
/srv/place_directory/releases/34eb3ce80f16961c24b04e495ec2e93589b659d8/vendor/bundle/ruby/1.9.1/gems/gotime-cassandra_object-2.9.1/lib/cassandra_object/schema/migration_proxy.rb:10:in `migrate'
/srv/place_directory/releases/34eb3ce80f16961c24b04e495ec2e93589b659d8/vendor/bundle/ruby/1.9.1/gems/gotime-cassandra_object-2.9.1/lib/cassandra_object/schema/migrator.rb:136:in `block in migrate'
/srv/place_directory/releases/34eb3ce80f16961c24b04e495ec2e93589b659d8/vendor/bundle/ruby/1.9.1/gems/gotime-cassandra_object-2.9.1/lib/cassandra_object/schema/migrator.rb:124:in `each'
/srv/place_directory/releases/34eb3ce80f16961c24b04e495ec2e93589b659d8/vendor/bundle/ruby/1.9.1/gems/gotime-cassandra_object-2.9.1/lib/cassandra_object/schema/migrator.rb:124:in `migrate'
/srv/place_directory/releases/34eb3ce80f16961c24b04e495ec2e93589b659d8/vendor/bundle/ruby/1.9.1/gems/gotime-cassandra_object-2.9.1/lib/cassandra_object/schema/migrator.rb:27:in `up'
/srv/place_directory/releases/34eb3ce80f16961c24b04e495ec2e93589b659d8/vendor/bundle/ruby/1.9.1/gems/gotime-cassandra_object-2.9.1/lib/cassandra_object/schema/migrator.rb:9:in `migrate'
/srv/place_directory/releases/34eb3ce80f16961c24b04e495ec2e93589b659d8/vendor/bundle/ruby/1.9.1/gems/gotime-cassandra_object-2.9.1/lib/cassandra_object/tasks/ks.rake:50:in `block (2 levels) in '
/srv/place_directory/releases/34eb3ce80f16961c24b04e495ec2e93589b659d8/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/srv/place_directory/releases/34eb3ce80f16961c24b04e495ec2e93589b659d8/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/srv/place_directory/releases/34eb3ce80f16961c24b04e495ec2e93589b659d8/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/srv/place_directory/releases/34eb3ce80f16961c24b04e495ec2e93589b659d8/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/srv/place_directory/releases/34eb3ce80f16961c24b04e495ec2e93589b659d8/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/usr/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/srv/place_directory/releases/34eb3ce80f16961c24b04e495ec2e93589b659d8/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/srv/place_directory/releases/34eb3ce80f16961c24b04e495ec2e93589b659d8/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/srv/place_directory/releases/34eb3ce80f16961c24b04e495ec2e93589b659d8/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/srv/place_directory/releases/34eb3ce80f16961c24b04e495ec2e93589b659d8/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
/srv/place_directory/releases/34eb3ce80f16961c24b04e495ec2e93589b659d8/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/srv/place_directory/releases/34eb3ce80f16961c24b04e495ec2e93589b659d8/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
/srv/place_directory/releases/34eb3ce80f16961c24b04e495ec2e93589b659d8/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/srv/place_directory/releases/34eb3ce80f16961c24b04e495ec2e93589b659d8/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/srv/place_directory/releases/34eb3ce80f16961c24b04e495ec2e93589b659d8/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
/srv/place_directory/releases/34eb3ce80f16961c24b04e495ec2e93589b659d8/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/srv/place_directory/releases/34eb3ce80f16961c24b04e495ec2e93589b659d8/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/srv/place_directory/releases/34eb3ce80f16961c24b04e495ec2e93589b659d8/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/bin/rake:33:in `'
bin/rake:16:in `load'
bin/rake:16:in `

'
Tasks: TOP => ks:migrate