Project

General

Profile

Actions

Bug #29513

open

Can't create default pxe templates via hammer due to api permission issue

Added by Daniel Williams about 4 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
API
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

When running the command "*hammer template build-pxe-default*" the following error is returned:
ERF42-5531 [Foreman::Exception]: unknown permission for api/v2/config_templates#build_pxe_default

However this works if using the UI - - Host > Provisioning Templates > Click "Build Default PXE"

Relevant section from the foreman production.log
2020-04-09T15:38:31 [I|app|18bdcd9c] Started POST "/api/config_templates/build_pxe_default" for 10.0.2.10 at 2020-04-09 15:38:31 +0100
2020-04-09T15:38:31 [I|app|18bdcd9c] Processing by Api::V2::ConfigTemplatesController#build_pxe_default as JSON
2020-04-09T15:38:31 [I|app|18bdcd9c] Parameters: {"organization_id"=>1, "apiv"=>"v2", "config_template"=>{"organization_id"=>1}}
2020-04-09T15:38:31 [D|app|18bdcd9c] Authenticated user admin against INTERNAL authentication source
2020-04-09T15:38:31 [I|app|18bdcd9c] Authorized user admin(Admin User)
2020-04-09T15:38:31 [D|tax|18bdcd9c] Current location set to none
2020-04-09T15:38:31 [D|tax|18bdcd9c] Current organization set to Default Organization
2020-04-09T15:38:31 [D|tax|18bdcd9c] Current location set to none
2020-04-09T15:38:31 [D|tax|18bdcd9c] Current organization set to Default Organization
2020-04-09T15:38:31 [W|app|18bdcd9c] Action failed
2020-04-09T15:38:31 [D|app|18bdcd9c] Backtrace for 'Action failed' error (Foreman::Exception): ERF42-5531 [Foreman::Exception]: unknown permission for api/v2/config_templates#b
uild_pxe_default
/usr/share/foreman/app/controllers/api/base_controller.rb:379:in `action_permission'
/usr/share/foreman/app/controllers/api/v2/config_templates_controller.rb:148:in `action_permission'
/usr/share/foreman/app/controllers/api/base_controller.rb:410:in `parent_resource_details'
/usr/share/foreman/app/controllers/api/base_controller.rb:319:in `find_nested_object'
/usr/share/foreman/app/controllers/api/base_controller.rb:313:in `find_optional_nested_object'

No data to display

Actions

Also available in: Atom PDF