Project

General

Profile

Actions

Bug #24208

closed

Error with 6.0.2 and Foreman 1.18 RC3

Added by Trey Dockendorf almost 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

This is from https://github.com/theforeman/foreman_templates/issues/101

I just upgraded a test system to 1.18 RC3 and foreman_templates 6.0.2 and am getting an error running the rake task for import:

[root@foreman-test ~]# foreman-rake templates:import
/usr/share/foreman/lib/core_extensions.rb:182: warning: already initialized constant ActiveSupport::MessageEncryptor::DEFAULT_CIPHER
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.6/lib/active_support/message_encryptor.rb:22: warning: previous definition of DEFAULT_CIPHER was here
rake aborted!
ArgumentError: wrong number of arguments (given 1, expected 0)
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_templates-6.0.2/lib/tasks/foreman_templates_tasks.rake:34:in `to_h'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_templates-6.0.2/lib/tasks/foreman_templates_tasks.rake:34:in `block (3 levels) in <top (required)>'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_templates-6.0.2/lib/tasks/foreman_templates_tasks.rake:34:in `each'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_templates-6.0.2/lib/tasks/foreman_templates_tasks.rake:34:in `map'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_templates-6.0.2/lib/tasks/foreman_templates_tasks.rake:34:in `block (2 levels) in <top (required)>'
/opt/rh/rh-ruby24/root/usr/share/gems/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
Tasks: TOP => templates:import
(See full trace by running task with --trace)
Actions #1

Updated by Marek Hulán almost 6 years ago

Thanks for the report, could you check whether importing works if triggered through API? Rake tasks have been deprecated.

Actions #2

Updated by Trey Dockendorf almost 6 years ago

I am fairly confident import via API works because I'm able to use hammer CLI to perform imports though that process is not working the way I'd expect: https://github.com/theforeman/hammer-cli-foreman-templates/issues/4. Be happy to open an issue for CLI in Redmine if there's an appropriate project to use for the issue.

The big benefit I found to the rake task was the settings in web UI allowed the rake task to be run with no arguments. The use of no arguments with Hammer CLI is not working, I have to duplicate all settings at command line or the import doesn't work. That's covered in the Github issue above.

Actions #3

Updated by The Foreman Bot almost 6 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Ondřej Pražák
  • Pull request https://github.com/theforeman/foreman_templates/pull/102 added
Actions #4

Updated by Marek Hulán almost 6 years ago

  • Target version set to foreman_templates 6.0.3
Actions #5

Updated by Anonymous almost 6 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #6

Updated by Marek Hulán almost 6 years ago

  • Bugzilla link set to 1600101
Actions

Also available in: Atom PDF