Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1615372 - host parameters no longer show up in hook_object
host parameters no longer show up in hook_object
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Hooks Plugin (Show other bugs)
6.3.2
All All
unspecified Severity high (vote)
: GA
: Unused
Assigned To: Lukas Zapletal
Stephen Wadeley
: Regression, Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2018-08-13 09:02 EDT by Anand Agrawal
Modified: 2018-10-16 15:23 EDT (History)
9 users (show)

See Also:
Fixed In Version: tfm-rubygem-foreman_hooks-0.3.14.1-1
Doc Type: Release Note
Doc Text:
Starting from Satellite 6.4, new `postcreate` and `postupdate` hook events are added to Satellite. In previous versions of Satellite, some host and hostgroup parameters were not passed to the hook object file by the `create` and `update` hook events. If you want all the host parameters fields in the hook object file, rename hooks directories from `create` to `postcreate` and from `update` to `postupdate`. No changes are required in the hook scripts
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-10-16 15:23:31 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Github theforeman/foreman_hooks/pull/57 None None None 2018-08-23 09:52 EDT

  None (edit)
Description Anand Agrawal 2018-08-13 09:02:02 EDT
Description of problem:

When creating a VM in Satellite, host parameters seem to no longer get passed to the hook_object with after_create. This worked perfectly in Satellite 6.2.

While checking the API output of the host, we can see both the nodes host_parameter and global_parameter are present but in the hook_object host_parameter is always blank array[] and global_parameter are present.

Customer parse host parameters to use them with hooks. This is a show stopper for them in Migration of Satellite 6.2 to 6.3.

Version-Release number of selected component (if applicable):
Red Hat Satellite 6.3

How reproducible:
Always

Steps to Reproduce:
1. Set the hook to your Satellite
2. Create a VM from GUI
3. Check the hook log file, the host_parameter is missing.

Actual results:
parameter node is always an empty array

Expected results:
parameter and global_parameter must be present as in Satellite 6.2

Additional info:
Comment 1 Lukas Zapletal 2018-08-14 03:23:38 EDT
Hello,

this is likely a missing permission (https://projects.theforeman.org/issues/13164) please ask for the following:

1) using the same user account please use hammer to view the host which has missing parameters:

# hammer -u username -p usedpreviously host info --name tonya-bisconer.nat.lan
Id:                  1
Name:                tonya-bisconer.nat.lan
Organization:        MyOrg
Location:            MyLoc
...
Parameters:          
    host_param => one
All parameters:      
    host_param => one
    global_parameter => two

I expect the same parameters to be missing.

2) Show the roles of the user:

# hammer user info --login regular
Id:                    5
Login:                 regular
...
Roles:                 
    Viewer
    View hosts

3) Show permissions of all roles above:

# hammer role filters --name Viewer
...
111 | Parameter                    | none   | yes        | no        | Viewer | view_params
...

We are looking for view_params permission.
Comment 10 Patrick Creech 2018-09-24 10:42:16 EDT
snap 23, not 63
Comment 20 Bryan Kearney 2018-10-16 15:23:31 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2018:2927

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