0xdevalias / huginn-chef

Huginn Chef Deployment [WIP]
MIT License
0 stars 1 forks source link

Issues in this repo currently #6

Open nogweii opened 10 years ago

nogweii commented 10 years ago

Just a braindump, it's 1AM my time.

== 20120728210244 DeviseCreateUsers: migrating ================================
-- create_table(:users)
   -> 0.0024s
-- add_index(:users, :email, {:unique=>true})
rake aborted!
StandardError: An error has occurred, all later migrations canceled:

Mysql2::Error: Specified key was too long; max key length is 767 bytes: CREATE UNIQUE INDEX `index_users_on_email`  ON `users` (`email`) /home/huginn/releases/03892d7341280093e9c3d88570368e38f516108e/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:303:in `query'
/home/huginn/releases/03892d7341280093e9c3d88570368e38f516108e/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:303:in `block in execute'
/home/huginn/releases/03892d7341280093e9c3d88570368e38f516108e/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract_adapter.rb:373:in `block in log'
/home/huginn/releases/03892d7341280093e9c3d88570368e38f516108e/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.5/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/huginn/releases/03892d7341280093e9c3d88570368e38f516108e/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract_adapter.rb:367:in `log'
/home/huginn/releases/03892d7341280093e9c3d88570368e38f516108e/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:303:in `execute'
/home/huginn/releases/03892d7341280093e9c3d88570368e38f516108e/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.5/lib/active_record/connection_adapters/mysql2_adapter.rb:228:in `execute'
/home/huginn/releases/03892d7341280093e9c3d88570368e38f516108e/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:525:in `add_index'
/home/huginn/releases/03892d7341280093e9c3d88570368e38f516108e/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.5/lib/active_record/migration.rb:649:in `block in method_missing'
/home/huginn/releases/03892d7341280093e9c3d88570368e38f516108e/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.5/lib/active_record/migration.rb:621:in `block in say_with_time'
/home/huginn/releases/03892d7341280093e9c3d88570368e38f516108e/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.5/lib/active_record/migration.rb:621:in `say_with_time'
/home/huginn/releases/03892d7341280093e9c3d88570368e38f516108e/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.5/lib/active_record/migration.rb:641:in `method_missing'
/home/huginn/releases/03892d7341280093e9c3d88570368e38f516108e/db/migrate/20120728210244_devise_create_users.rb:40:in `change'
/home/huginn/releases/03892d7341280093e9c3d88570368e38f516108e/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.5/lib/active_record/migration.rb:595:in `exec_migration'
/home/huginn/releases/03892d7341280093e9c3d88570368e38f516108e/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.5/lib/active_record/migration.rb:579:in `block (2 levels) in migrate'
/home/huginn/releases/03892d7341280093e9c3d88570368e38f516108e/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.5/lib/active_record/migration.rb:578:in `block in migrate'
/home/huginn/releases/03892d7341280093e9c3d88570368e38f516108e/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:294:in `with_connection'
/home/huginn/releases/03892d7341280093e9c3d88570368e38f516108e/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.5/lib/active_record/migration.rb:577:in `migrate'
/home/huginn/releases/03892d7341280093e9c3d88570368e38f516108e/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.5/lib/active_record/migration.rb:752:in `migrate'
/home/huginn/releases/03892d7341280093e9c3d88570368e38f516108e/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.5/lib/active_record/migration.rb:992:in `block in execute_migration_in_transaction'
/home/huginn/releases/03892d7341280093e9c3d88570368e38f516108e/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.5/lib/active_record/migration.rb:1040:in `ddl_transaction'
/home/huginn/releases/03892d7341280093e9c3d88570368e38f516108e/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.5/lib/active_record/migration.rb:991:in `execute_migration_in_transaction'
/home/huginn/releases/03892d7341280093e9c3d88570368e38f516108e/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.5/lib/active_record/migration.rb:953:in `block in migrate'
/home/huginn/releases/03892d7341280093e9c3d88570368e38f516108e/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.5/lib/active_record/migration.rb:949:in `each'
/home/huginn/releases/03892d7341280093e9c3d88570368e38f516108e/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.5/lib/active_record/migration.rb:949:in `migrate'
/home/huginn/releases/03892d7341280093e9c3d88570368e38f516108e/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.5/lib/active_record/migration.rb:807:in `up'
/home/huginn/releases/03892d7341280093e9c3d88570368e38f516108e/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.5/lib/active_record/migration.rb:785:in `migrate'
/home/huginn/releases/03892d7341280093e9c3d88570368e38f516108e/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.5/lib/active_record/railties/databases.rake:34:in `block (2 levels) in <top (required)>'
Tasks: TOP => db:migrate
start on starting huginn-web
stop on stopping huginn-web
respawn

exec su - huginn -c 'cd /home/huginn/releases/03892d7341280093e9c3d88570368e38f516108e; export PORT=5000; export APP_SECRET_TOKEN=Your\ Gemfile\ lists\ the\ gem\ unicorn\ \(\>\=\ 0\)\ more\ than\ once.'
'You\ should\ probably\ keep\ only\ one\ of\ them.'
'While\ it\'s\ not\ a\ problem\ now,\ it\ could\ cause\ errors\ if\ you\ change\ the\ version\ of\ just\ one\ of\ them\ later.'
'371aa019a320e294052ee480d2ce15efde1e83102db567d841565afd1c5f1b089efafbcfb844358d38545926ce573668227326dcebc13b4539c44f3f2e394305;  export DOMAIN=localhost:3000;  export DATABASE_ADAPTER=mysql2;  export DATABASE_ENCODING=utf8mb4;  export DATABASE_RECONNECT=true;  export DATABASE_NAME=huginn;  export DATABASE_POOL=5;  export DATABASE_USERNAME=root;  export DATABASE_PASSWORD=Ch4ng3M3\!;  export FORCE_SSL=false;  export INVITATION_CODE=try-huginn;  export SMTP_DOMAIN=your-domain-here.com;  export SMTP_USER_NAME=you@gmail.com;  export SMTP_PASSWORD=somepassword;  export SMTP_SERVER=smtp.gmail.com;  export SMTP_PORT=587;  export SMTP_AUTHENTICATION=plain;  export SMTP_ENABLE_STARTTLS_AUTO=true;  export EMAIL_FROM_ADDRESS=from_address@gmail.com;  export AGENT_LOG_LENGTH=200;  export TWITTER_OAUTH_KEY='';  export TWITTER_OAUTH_SECRET='';  export THIRTY_SEVEN_SIGNALS_OAUTH_KEY='';  export THIRTY_SEVEN_SIGNALS_OAUTH_SECRET='';  export GITHUB_OAUTH_KEY='';  export GITHUB_OAUTH_SECRET='';  export TUMBLR_OAUTH_KEY='';  export TUMBLR_OAUTH_SECRET='';  export AWS_ACCESS_KEY_ID=your\ aws\ access\ key\ id;  export AWS_ACCESS_KEY=your\ aws\ access\ key;  export AWS_SANDBOX=false;  export FARADAY_HTTP_BACKEND=typhoeus;  export DEFAULT_HTTP_USER_AGENT=Huginn\ -\ https://github.com/cantino/huginn;  export ALLOW_JSONPATH_EVAL=false;  export ENABLE_INSECURE_AGENTS=false;  export ENABLE_SECOND_PRECISION_SCHEDULE=false;  export TIMEZONE=Pacific\ Time\ \(US\ \&\ Canada\);  export FAILED_JOBS_TO_KEEP=100;  export DATABASE_HOST=localhost;  export DATABASE_PORT=3306;  export RBENV_VERSION=2.0.0-p481;  export RAILS_ENV=production;  bundle exec unicorn -c config/unicorn/production.rb >> log/web-1.log 2>&1'

Specifically, upstart complains about an unknown stanza. The embedded new lines from the bundler output break things.

nogweii commented 10 years ago

The second item. apt cache, is solved with https://github.com/evaryont/huginn-chef/commit/666cd3d137c06b19359653ce7f5476ded8c91ac1

nogweii commented 10 years ago

The db:migrate error is really a fault with huginn, not with chef. I'll open an issue there.

0xdevalias commented 10 years ago

Using apt directly locks us into OS's that use it (eg. CentOS uses yum) I'm pretty sure there's a cookbook way that handles both, and I was pretty certain it does the update as well. Does the old code not do that for you..?


APP_SECRET_TOKEN=Your\ Gemfile\ lists\ the\ gem\ unicorn\ (>\=\ 0)\ more\ than\ once.' 'You\ should\ probably\ keep\ only\ one\ of\ them.' 'While\ it\'s\ not\ a\ problem\ now,\ it\ could\ cause\ errors\ if\ you\ change\ the\ version\ of\ just\ one\ of\ them\ later.' '371aa019a320e294052ee480d2ce15efde1e83102db567d841565afd1c5f1b089efafbcfb844358d38545926ce573668227326dcebc13b4539c44f3f2e394305; 

Looks to be the issue in that prior code.

— Sent from Mailbox

On Sat, Oct 11, 2014 at 8:54 AM, No GUI notifications@github.com wrote:

The db:migrate error is really a fault with huginn, not with chef. I'll open an issue there.

Reply to this email directly or view it on GitHub: https://github.com/alias1/huginn-chef/issues/6#issuecomment-58721273

0xdevalias commented 10 years ago

How'd you go with fixing up those issues @evaryont ?