The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

Bug #7033

Failed to run rake reports:schematize

Added by James Turnbull over 3 years ago. Updated almost 3 years ago.

Status:Needs More InformationStart date:04/09/2011
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-
Keywords:rake reports:schematize Affected URL:
Branch: Affected Dashboard version:1.1.0

Description

$ sudo RAILS_ENV=production rake reports:schematize --trace
(in /usr/share/puppet-dashboard)
** Invoke reports:schematize (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute reports:schematize

Beginning to migrate 4155 reports
Type Ctrl+c at any time to interrupt the migration
Restarting the migration will resume where you left off

rake aborted!    0% |                                                                                                                            | ETA:  --:--:--
can't convert Symbol into String
/usr/share/puppet-dashboard/vendor/rails/activerecord/lib/active_record/attribute_methods.rb:211:in `transfer'
/usr/lib/ruby/1.8/yaml.rb:133:in `each'
/usr/lib/ruby/1.8/yaml.rb:133:in `transfer'
/usr/lib/ruby/1.8/yaml.rb:133:in `node_import'
/usr/lib/ruby/1.8/yaml.rb:133:in `load'
/usr/lib/ruby/1.8/yaml.rb:133:in `load'
/usr/share/puppet-dashboard/app/models/report.rb:75:in `create_from_yaml'
/usr/share/puppet-dashboard/lib/tasks/schematize_reports.rake:23
/usr/share/puppet-dashboard/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:136:in `transaction'
/usr/share/puppet-dashboard/vendor/rails/activerecord/lib/active_record/transactions.rb:182:in `transaction'
/usr/share/puppet-dashboard/lib/tasks/schematize_reports.rake:22
/usr/share/puppet-dashboard/lib/tasks/schematize_reports.rake:21:in `each'
/usr/share/puppet-dashboard/lib/tasks/schematize_reports.rake:21
/var/lib/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/var/lib/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute'
/var/lib/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/var/lib/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
/var/lib/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/var/lib/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/var/lib/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
/var/lib/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'
/var/lib/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/var/lib/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
/var/lib/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/var/lib/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/var/lib/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
/var/lib/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
/var/lib/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/var/lib/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/var/lib/gems/1.8/gems/rake-0.8.7/bin/rake:31
/usr/bin/rake:19:in `load'
/usr/bin/rake:19

History

#1 Updated by Nigel Kersten over 3 years ago

  • Status changed from Unreviewed to Needs More Information

what version were you upgrading from and to James?

#2 Updated by James Turnbull over 3 years ago

The only one you can use this Rake task on – 1.0.4 to 1.1.0

#3 Updated by Nigel Kersten over 3 years ago

  • Status changed from Needs More Information to Accepted
  • Assignee deleted (Nigel Kersten)
  • Priority changed from Normal to High

Just checking you hadn’t been on intermediate non-versioned releases as we had one user like that with this issue.

#4 Updated by James Turnbull over 3 years ago

Was there a corresponding ticket?

#5 Updated by Nigel Kersten over 3 years ago

  • Affected Dashboard version changed from 1.1.0 to 1.1.1rc1

#6 Updated by Nigel Kersten over 3 years ago

  • Affected Dashboard version changed from 1.1.1rc1 to 1.1.0

This should be fixed before 1.1.1 release. Strictly speaking it’s not RC-introduced, but I’m making the call that we need to resolve this major migration step for users from 1.0.4.

#7 Updated by Jesse Wolfe over 3 years ago

James, do you have access to a database dump that exhibits this failure? (My intuition is that it only fails on reports from certain versions of Puppet)

#8 Updated by Jesse Wolfe over 3 years ago

I’ve discovered a way to make a malformed YAML document that fails in this way. I’ve got an experimental branch with a workaround at http://github.com/jes5199/puppet-dashboard/tree/experiment/next/7033 – can someone who can produce this error try running the rake task using this branch?

#9 Updated by Nigel Kersten about 3 years ago

It might be difficult to get reproduction time out of people away in Amsterdam at the moment.

James, had you gotten more reports of this from users?

#10 Updated by Nigel Kersten about 3 years ago

  • Status changed from Accepted to Needs More Information
  • Assignee set to James Turnbull

#11 Updated by James Turnbull about 3 years ago

  • Status changed from Needs More Information to Code Insufficient
  • Assignee changed from James Turnbull to Nigel Kersten

I get:

undefined method `load_from_yaml_more_safely' for #
/usr/share/puppet-dashboard/vendor/rails/activerecord/lib/active_record/base.rb:1959:in `method_missing_without_paginate'
/usr/share/puppet-dashboard/vendor/gems/will_paginate-2.3.11/lib/will_paginate/finder.rb:170:in `method_missing'
/usr/share/puppet-dashboard/app/models/report.rb:104:in `create_from_yaml'
/usr/share/puppet-dashboard/lib/tasks/schematize_reports.rake:23
/usr/share/puppet-dashboard/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:136:in `transaction'
/usr/share/puppet-dashboard/vendor/rails/activerecord/lib/active_record/transactions.rb:182:in `transaction'
/usr/share/puppet-dashboard/lib/tasks/schematize_reports.rake:22
/usr/share/puppet-dashboard/lib/tasks/schematize_reports.rake:21:in `each'
/usr/share/puppet-dashboard/lib/tasks/schematize_reports.rake:21
/var/lib/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/var/lib/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute'
/var/lib/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/var/lib/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
/var/lib/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/var/lib/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/var/lib/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
/var/lib/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'
/var/lib/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/var/lib/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
/var/lib/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/var/lib/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/var/lib/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
/var/lib/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
/var/lib/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/var/lib/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/var/lib/gems/1.8/gems/rake-0.8.7/bin/rake:31
/usr/bin/rake:19:in `load'
/usr/bin/rake:19

When I run rake with this applied.

#12 Updated by Nigel Kersten about 3 years ago

  • Assignee changed from Nigel Kersten to James Turnbull

James, how can we make this easier for the devs to diagnose?

We shouldn’t have to have the long feedback cycle we’ve got now, particularly with you out of the office. Can R&D get access to the box you were doing this on?

#13 Updated by Nigel Kersten about 3 years ago

ping.

#14 Updated by James Turnbull about 3 years ago

  • Status changed from Code Insufficient to Needs More Information
  • Assignee changed from James Turnbull to Nigel Kersten

Tell me what Dev needs access and I’ll arrange it. It’s a prod box I’d prefer they didn’t have access unless it’s actually on the box then and there.

#15 Updated by Nigel Kersten about 3 years ago

  • Status changed from Needs More Information to Rejected

In the absence of any other reports of this and given that it’s possible this node had an unusual upgrade path due to running out of HEAD, and given that it was reported by James “Crocodile Dundee” Turnbull, I’m rejecting this issue.

:)

(will be re-poened if it turns out to be a real issue)

#16 Updated by Lukas Koranda about 3 years ago

  • Status changed from Rejected to Re-opened

I dont think it was unusual upgrade path. I had exactly same issue upgrading from 1.0.4 to 1.1.0. I wasn’t able to find the root cause and because I needed urgent fix I used as workaround db clean.

Just letting you know. Unfortunately I cannot provide you more details like db dump.

#17 Updated by Nigel Kersten about 3 years ago

  • Status changed from Re-opened to Accepted
  • Assignee deleted (Nigel Kersten)

Excellent! Thank you for the feedback Lukas, that’s immensely useful.

Was your error exactly the same as above?

#18 Updated by Mate Gabri about 3 years ago

I’m also trying to upgrade from 1.0.4 to 1.1.0. The db:migrate was successful, the schematize process halted at 93% though. After rerunning I’ve encountered the following error.

puppet-dashboard # RAILS_ENV=production rake reports:schematize --trace
(in /var/www/puppet-dashboard)
** Invoke reports:schematize (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute reports:schematize
Beginning to migrate 6776 reports
Type Ctrl+c at any time to interrupt the migration
Restarting the migration will resume where you left off
rake aborted!    0% |                                                                                                                                                               | ETA:  --:--:--
can't convert Symbol into String
/var/www/puppet-dashboard/vendor/rails/activerecord/lib/active_record/attribute_methods.rb:211:in `transfer'
/usr/lib/ruby/1.8/yaml.rb:133:in `each'
/usr/lib/ruby/1.8/yaml.rb:133:in `transfer'
/usr/lib/ruby/1.8/yaml.rb:133:in `node_import'
/usr/lib/ruby/1.8/yaml.rb:133:in `load'
/usr/lib/ruby/1.8/yaml.rb:133:in `load'
/var/www/puppet-dashboard/app/models/report.rb:75:in `create_from_yaml'
/var/www/puppet-dashboard/lib/tasks/schematize_reports.rake:23
/var/www/puppet-dashboard/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:136:in `transaction'
/var/www/puppet-dashboard/vendor/rails/activerecord/lib/active_record/transactions.rb:182:in `transaction'
/var/www/puppet-dashboard/lib/tasks/schematize_reports.rake:22
/var/www/puppet-dashboard/lib/tasks/schematize_reports.rake:21:in `each'
/var/www/puppet-dashboard/lib/tasks/schematize_reports.rake:21
/usr/lib/ruby/1.8/rake.rb:636:in `call'
/usr/lib/ruby/1.8/rake.rb:636:in `execute'
/usr/lib/ruby/1.8/rake.rb:631:in `each'
/usr/lib/ruby/1.8/rake.rb:631:in `execute'
/usr/lib/ruby/1.8/rake.rb:597:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib/ruby/1.8/rake.rb:590:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/rake.rb:583:in `invoke'
/usr/lib/ruby/1.8/rake.rb:2051:in `invoke_task'
/usr/lib/ruby/1.8/rake.rb:2029:in `top_level'
/usr/lib/ruby/1.8/rake.rb:2029:in `each'
/usr/lib/ruby/1.8/rake.rb:2029:in `top_level'
/usr/lib/ruby/1.8/rake.rb:2068:in `standard_exception_handling'
/usr/lib/ruby/1.8/rake.rb:2023:in `top_level'
/usr/lib/ruby/1.8/rake.rb:2001:in `run'
/usr/lib/ruby/1.8/rake.rb:2068:in `standard_exception_handling'
/usr/lib/ruby/1.8/rake.rb:1998:in `run'
/usr/bin/rake:28

#19 Updated by Nigel Kersten almost 3 years ago

  • Status changed from Accepted to Needs More Information
  • Priority changed from High to Normal

At this stage it looks like we need an example report that provokes this problem before we can move forward.

Also available in: Atom PDF