Bug 1144322 - Build default PXE menu different behaviour between GUI and API
Summary: Build default PXE menu different behaviour between GUI and API
Keywords:
Status: CLOSED DUPLICATE of bug 1124386
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: WebUI
Version: 6.0.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: Unspecified
Assignee: Ohad Levy
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks: 1122832
TreeView+ depends on / blocked
 
Reported: 2014-09-19 08:50 UTC by Peter Vreman
Modified: 2017-02-23 20:56 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-09-19 15:50:41 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Peter Vreman 2014-09-19 08:50:46 UTC
Description of problem:
The code to generate the default PXE menu (at least the unattended URL) from config_templates is inconsistent between the WebUI controller and the API controller.
This can cause different results in the generated PXE if called from the API or from the WebUI.

See below that there are 3 methods to generate the URL:

# grep -r default_template_url *
api/v1/config_templates_controller.rb:      def default_template_url template, hostgroup
api/v2/config_templates_controller.rb:      def default_template_url template, hostgroup
config_templates_controller.rb:  def default_template_url template, hostgroup

Please refactor the code so there is only one method that generates the default PXE menu. E.g. by calling the API from the WebUI.



Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Generate a PXE template from WebUI
2. Generate a PXE template using API accessed by localhost
(curl -K /opt/hoici/etc/curl-hoici.conf -H 'Content-Type: application/json' -XGET https://localhost/api/v2/config_templates/build_pxe_default)
3.

Actual results:
Different URLs generated

Expected results:
Consistent template


Additional info:

Comment 1 Peter Vreman 2014-09-19 08:54:34 UTC
Additionaly the Build PXE from the WebUI is affected by if there is a Location set. If a location is set then the Build PXE from the WebUI fails with cannot find a TFTP proxy.

On the other hand the API call does not this location check.

In both cases the same user account was used that has both a default org and location set.

Comment 2 RHEL Program Management 2014-09-19 09:03:13 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 4 Dominic Cleal 2014-09-19 15:50:41 UTC
re comment #1, sounds like the proxy needs associating to both the org/location that you use on a day to day basis, then it should find it when under that context.  (The API incidentally can specify a context, but it's generally unused.)

*** This bug has been marked as a duplicate of bug 1124386 ***

Comment 5 Peter Vreman 2014-09-19 16:26:16 UTC
WebUI lists the capsule as being already part of the Location.
But on the Manage Location page the association is not there, when i try to add the association i get the error "Validation failed: Taxonomy has already been taken"

It looks like there is some implicit adding of locations based on hosts that are attached to the capsule.

The capsule doing tftp, puppet, puppetca


Note You need to log in before you can comment on or make changes to this bug.