Project

General

Profile

Feature #11643

Allow through API methods to render templates without configuring a host in build mode

Added by Bryan Kearney over 4 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
API
Target version:
Difficulty:
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1207044
Description of problem:
If a host isn't in build mode, you cannot check if the kickstart template is rendered properly. Either you enable build mode and use http://sat6host/unattended/provision or you get an authentication cookie and use https://sat6host/unattended/provision?spoof=<hostname>. Both ways are tricky.

How reproducible:
Always

Steps to Reproduce:
1. Access to http://sat6host/unattended/provision from a host which is not in build mode and you won't get the template
2. Access to https://sat6.host/unattended/provision/?spoof=>hostname> and you will be redirected to login pages
3. No more methods to get it rendered

Expected results:
At least [1] should work, no matter the build status. Or it would be even better to have any API method to get it rendered.


Related issues

Related to Foreman - Refactor #12529: Use load_template_vars in TFTP orchestration's PXE menu generationNew2015-11-19
Related to Foreman - Bug #12621: Excessive TemplateKind DB queries when retrieving API docsClosed2015-11-27

Associated revisions

Revision 8a817cb2 (diff)
Added by Shlomi Zadok about 4 years ago

Fixes #11643 - [API] Add preview template to host

History

#1 Updated by Dominic Cleal over 4 years ago

Bryan Kearney wrote:

1. Access to http://sat6host/unattended/provision from a host which is not in build mode and you won't get the template

[..]

At least [1] should work, no matter the build status

No, it really should not, it can change states. It is not part of the user API, it should not be called directly. Ditto the spoof URL, it's part of the UI, not API.

#2 Updated by Bryan Kearney over 4 years ago

Is there a better way for users to get at the rendered ks file?

-- bk

Dominic Cleal wrote:

Bryan Kearney wrote:

1. Access to http://sat6host/unattended/provision from a host which is not in build mode and you won't get the template

[..]

At least [1] should work, no matter the build status

No, it really should not, it can change states. It is not part of the user API, it should not be called directly. Ditto the spoof URL, it's part of the UI, not API.

#3 Updated by The Foreman Bot about 4 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Shlomi Zadok
  • Pull request https://github.com/theforeman/foreman/pull/2889 added

#4 Updated by Dominic Cleal about 4 years ago

  • Legacy Backlogs Release (now unused) set to 71

#5 Updated by Dominic Cleal about 4 years ago

  • Related to Refactor #12529: Use load_template_vars in TFTP orchestration's PXE menu generation added

#6 Updated by Shlomi Zadok about 4 years ago

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

#7 Updated by Dominic Cleal about 4 years ago

  • Related to Bug #12621: Excessive TemplateKind DB queries when retrieving API docs added

Also available in: Atom PDF