Bug 1337200
| Summary: | Foreman hooks does not contain all the JSON data | ||
|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | Lukas Zapletal <lzap> |
| Component: | Hooks and Webhooks | Assignee: | Lukas Zapletal <lzap> |
| Status: | CLOSED ERRATA | QA Contact: | |
| Severity: | high | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.2.0 | CC: | bbuckingham, bkearney, cwelton, dmoessne, ehelms, ohadlevy, tomckay |
| Target Milestone: | Unspecified | Keywords: | Triaged |
| Target Release: | Unused | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| URL: | https://github.com/theforeman/foreman_hooks/pull/36 | ||
| Whiteboard: | |||
| Fixed In Version: | rubygem-foreman_hooks-0.3.11-1 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-07-27 11:22:01 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
Lukas Zapletal
2016-05-18 13:31:11 UTC
QA notes: Install a test hook: cat config/hooks/host/managed/create/00_test.sh #!/bin/bash echo " *** got hook $* ***" >> /tmp/hook.log cat >> /tmp/hook.log exit 0 Create a new host and verify the log file contains MAC address. Previously, it was missing from the JSON output. Tests together with bug https://bugzilla.redhat.com/show_bug.cgi?id=1334707 - both patches are required to be present. VERIFIED
Version Verified On:
Snap 17
satellite-6.2.0-17.0.el6sat.noarch
Steps to verify
* Install Satellite on RHEL6
* Create hook file in /usr/share/foreman/config/hooks as described above
* Make the file executable
* Restart foreman, see that the file is discovered.
* Create a host
* Check the log file, mac exists (data below)
* Check production.logs, no errors.
[root@sat-test-rhel6 config]# cat /tmp/hook.log
*** got hook create test7.example.com ***
{"host":{"ip":"199.99.99.7","environment_id":null,"environment_name":null,"last_report":null,"mac":"3d:f2:c9:a6:b3:b7","realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":1,"domain_name":"example.com","architecture_id":1,"architecture_name":"x86_64","operatingsystem_id":2,"operatingsystem_name":"RHEL Server 6.8","subnet_id":1,"subnet_name":"test","sp_subnet_id":null,"ptable_id":61,"ptable_name":"Kickstart default","medium_id":1,"medium_name":"CentOS mirror","build":true,"comment":"","disk":"","installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":3,"owner_type":"User","enabled":true,"puppet_ca_proxy_id":null,"managed":true,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","puppet_proxy_id":null,"certname":"test7.example.com","image_id":null,"image_name":null,"created_at":null,"updated_at":null,"last_compile":null,"global_status":0,"global_status_label":"OK","organization_id":1,"organization_name":"Default Organization","location_id":2,"location_name":"Default Location","puppet_status":0,"model_name":null,"build_status":1,"build_status_label":"Pending installation","name":"test7.example.com","id":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"interfaces":[{"id":null,"name":"test7.example.com","ip":"199.99.99.7","mac":"3d:f2:c9:a6:b3:b7","identifier":"","primary":true,"provision":true,"type":"interface"}],"puppetclasses":[],"config_groups":[],"all_parameters":[],"all_puppetclasses":[],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot":true,"puppetrun_hosts":true,"view_discovered_hosts":true,"submit_discovered_hosts":true,"auto_provision_discovered_hosts":true,"provision_discovered_hosts":true,"edit_discovered_hosts":true,"destroy_discovered_hosts":true}}}
*** Bug 1204358 has been marked as a duplicate of this bug. *** 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/RHBA-2016:1501 |