Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1615372

Summary: host parameters no longer show up in hook_object
Product: Red Hat Satellite Reporter: Anand Agrawal <aagrawal>
Component: Hooks and WebhooksAssignee: Lukas Zapletal <lzap>
Status: CLOSED ERRATA QA Contact: Stephen Wadeley <swadeley>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.3.2CC: aagrawal, egolov, lzap, mhulan, pcreech, spetrosi, sshtein, swadeley, zhunting
Target Milestone: 6.4.0Keywords: Regression, Triaged
Target Release: Unused   
Hardware: All   
OS: All   
Whiteboard:
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 19:23:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Anand Agrawal 2018-08-13 13:02:02 UTC
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 07:23:38 UTC
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 14:42:16 UTC
snap 23, not 63

Comment 20 Bryan Kearney 2018-10-16 19:23:31 UTC
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