Project

General

Profile

Bug #35488

'snapshots:generate' doesn't work

Added by Leos Stejskal 3 months ago. Updated 1 day ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Rake tasks
Target version:
-
Difficulty:
Triaged:
Yes
Bugzilla link:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Description

Running `RAILS_ENV=test bundle exec rake snapshots:generate` fails on following errors:

For 'CoreOS provision' template:

TypeError: no implicit conversion of false into String
foreman/lib/foreman/command_runner.rb:15:in `initialize'
foreman/lib/foreman/command_runner.rb:15:in `new'
foreman/lib/foreman/command_runner.rb:15:in `initialize'
foreman/app/services/foreman/renderer/scope/macros/transpilers.rb:18:in `new'
foreman/app/services/foreman/renderer/scope/macros/transpilers.rb:18:in `transpile_coreos_linux_config'
CoreOS provision:73:in `bind'
foreman/app/services/foreman/renderer/safe_mode_renderer.rb:7:in `render'
foreman/app/services/foreman/renderer/base_renderer.rb:18:in `render'
foreman/app/services/foreman/renderer.rb:46:in `render'
foreman/app/services/foreman/template_snapshot_service.rb:45:in `render_template'
foreman/lib/tasks/snapshots.rake:40:in `block (6 levels) in <top (required)>'
foreman/lib/tasks/snapshots.rake:35:in `each'
foreman/lib/tasks/snapshots.rake:35:in `block (5 levels) in <top (required)>'
foreman/lib/tasks/snapshots.rake:34:in `each'
foreman/lib/tasks/snapshots.rake:34:in `block (4 levels) in <top (required)>'
foreman/app/models/concerns/foreman/thread_session.rb:108:in `as'
foreman/lib/tasks/snapshots.rake:33:in `block (3 levels) in <top (required)>'
foreman/lib/tasks/snapshots.rake:25:in `block (2 levels) in <top (required)>'

For 'Kickstart default PXEGrub2' template

Caused by:
Resolv::ResolvError: cannot interpret as address: localhost
foreman/app/services/foreman/renderer/scope/macros/base.rb:159:in `dns_lookup'
Kickstart default PXEGrub2:87:in `bind'
foreman/app/services/foreman/renderer/safe_mode_renderer.rb:7:in `render'
foreman/app/services/foreman/renderer/base_renderer.rb:18:in `render'
foreman/app/services/foreman/renderer.rb:46:in `render'
foreman/app/services/foreman/template_snapshot_service.rb:45:in `render_template'
foreman/lib/tasks/snapshots.rake:43:in `block (6 levels) in <top (required)>'
foreman/lib/tasks/snapshots.rake:35:in `each'
foreman/lib/tasks/snapshots.rake:35:in `block (5 levels) in <top (required)>'
foreman/lib/tasks/snapshots.rake:34:in `each'
foreman/lib/tasks/snapshots.rake:34:in `block (4 levels) in <top (required)>'
foreman/app/models/concerns/foreman/thread_session.rb:108:in `as'
foreman/lib/tasks/snapshots.rake:33:in `block (3 levels) in <top (required)>'
foreman/lib/tasks/snapshots.rake:25:in `block (2 levels) in <top (required)>'

Associated revisions

Revision 340801f8 (diff)
Added by Leos Stejskal 3 months ago

Fixes #35488 - Fix snapshots:generate task

Fixed issues:
  • Generating snapshot for provision/coreos_provision.erb
  • Generating snapshot for PXEGrub2/kickstart_default_pxegrub2.erb
  • Error "undefined method 'include?' for nil:NilClass" when rendering
    'Kickstart default PXEGrub2' on host with empty 'pxe_loader'

History

#1 Updated by The Foreman Bot 3 months ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/9407 added

#2 Updated by The Foreman Bot 3 months ago

  • Fixed in Releases 3.5.0 added

#3 Updated by Leos Stejskal 3 months ago

  • Status changed from Ready For Testing to Closed

#4 Updated by Ewoud Kohl van Wijngaarden 1 day ago

  • Triaged changed from No to Yes
  • Assignee set to Leos Stejskal
  • Category changed from Templates to Rake tasks

Also available in: Atom PDF