Project

General

Profile

Actions

Bug #4210

closed

Issue when syncing templates with default repository

Added by Grégoire Morpain almost 11 years ago. Updated almost 11 years ago.

Status:
Closed
Priority:
Normal
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Hello,

I am using Foreman 1.3.2 and foreman_templates plugin and this is what I get when I try to sync :

\> foreman-rake --trace templates:sync verbose=true
** Invoke templates:sync (first_time)
** Invoke environment (first_time)
** Execute environment
[deprecated] I18n.enforce_available_locales will default to true in the future. If you really want to skip validation of your locale you can set I18n.enforce_available_locales = false to avoid this message.
** Execute templates:sync
remote: Reusing existing pack: 507, done.
remote: Counting objects: 3, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 510 (delta 0), reused 3 (delta 0)
Receiving objects: 100% (510/510), 88.05 KiB, done.
Resolving deltas: 100% (205/205), done.
Cloning into '/tmp/d20140128-21614-1tad5v7'...
Parsing: /scripts/grubby.erb
  No change to Template :Community Grubby Default

Parsing: /preseed/finish.erb
  No change to Template :Community Preseed Finish

Parsing: /preseed/userdata.erb
  Error: Unknown template type 'user_data'
Parsing: /preseed/PXELinux.erb
  No change to Template :Community Preseed PXE

Parsing: /preseed/disklayout.erb
  No change to Ptable :Community Preseed Disklayout

Parsing: /preseed/provision.erb
  No change to Template :Community Preseed

Parsing: /preseed/disklayout_lvm.erb
  No change to Ptable :Community Preseed Custom LVM Disklayout

Parsing: /preseed/iPXE.erb
  Error: Unknown template type 'iPXE'
rake aborted!
(<unknown>): did not find expected key while parsing a block mapping at line 2 column 1
/usr/lib/ruby/1.9.1/psych.rb:203:in `parse'
/usr/lib/ruby/1.9.1/psych.rb:203:in `parse_stream'
/usr/lib/ruby/1.9.1/psych.rb:151:in `parse'
/usr/lib/ruby/1.9.1/psych.rb:127:in `load'
/usr/share/foreman/vendor/ruby/1.9.1/bundler/gems/foreman_templates-9d3bf37327c1/lib/templates.rake:14:in `metadata'
/usr/share/foreman/vendor/ruby/1.9.1/bundler/gems/foreman_templates-9d3bf37327c1/lib/templates.rake:137:in `block (3 levels) in <top (required)>'
/usr/share/foreman/vendor/ruby/1.9.1/bundler/gems/foreman_templates-9d3bf37327c1/lib/templates.rake:135:in `each'
/usr/share/foreman/vendor/ruby/1.9.1/bundler/gems/foreman_templates-9d3bf37327c1/lib/templates.rake:135:in `block (2 levels) in <top (required)>'
/usr/share/foreman/vendor/ruby/1.9.1/gems/rake-10.1.1/lib/rake/task.rb:236:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/rake-10.1.1/lib/rake/task.rb:236:in `block in execute'
/usr/share/foreman/vendor/ruby/1.9.1/gems/rake-10.1.1/lib/rake/task.rb:231:in `each'
/usr/share/foreman/vendor/ruby/1.9.1/gems/rake-10.1.1/lib/rake/task.rb:231:in `execute'
/usr/share/foreman/vendor/ruby/1.9.1/gems/rake-10.1.1/lib/rake/task.rb:175:in `block in invoke_with_call_chain'
/usr/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/usr/share/foreman/vendor/ruby/1.9.1/gems/rake-10.1.1/lib/rake/task.rb:168:in `invoke_with_call_chain'
/usr/share/foreman/vendor/ruby/1.9.1/gems/rake-10.1.1/lib/rake/task.rb:161:in `invoke'
/usr/share/foreman/vendor/ruby/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:149:in `invoke_task'
/usr/share/foreman/vendor/ruby/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/usr/share/foreman/vendor/ruby/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:106:in `each'
/usr/share/foreman/vendor/ruby/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:106:in `block in top_level'
/usr/share/foreman/vendor/ruby/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:115:in `run_with_threads'
/usr/share/foreman/vendor/ruby/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:100:in `top_level'
/usr/share/foreman/vendor/ruby/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:78:in `block in run'
/usr/share/foreman/vendor/ruby/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:165:in `standard_exception_handling'
/usr/share/foreman/vendor/ruby/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:75:in `run'
/usr/bin/rake:27:in `<main>'
Tasks: TOP => templates:sync

First, It seems to be a problem with unknown "kind" of templates but that's not the major issue here since it just skips the entry; I think the real problem comes from here but I don't know if this is related.

rake aborted!
(<unknown>): did not find expected key while parsing a block mapping at line 2 column 1

Thank you for looking into this and thank you for your work ;)

Actions #1

Updated by Greg Sutcliffe almost 11 years ago

  • Status changed from New to Closed

This was actually caused by an issue in the new ZTP template, and was fixed by Frank Wall in https://github.com/theforeman/foreman_templates/pull/6.

However, due to the logging setup, it's not obvious where the error is, so I've just committed https://github.com/theforeman/foreman_templates/commit/229b48f73748e0816294a0e84ad4baa8a1c96dd0 which should print the name of the template (when verbose=true) as early as possible, to ensure we know which template is causing the problem.

Thanks for reporting! :)

Actions

Also available in: Atom PDF