Bug 1317257 - Unable to extend the Satellite Discovery Image with custom facts
Unable to extend the Satellite Discovery Image with custom facts
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Discovery Image (Show other bugs)
6.1.7
All Linux
unspecified Severity high (vote)
: Beta
: --
Assigned To: Lukas Zapletal
Sachin Ghai
http://projects.theforeman.org/issues...
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-03-13 08:49 EDT by jalviso
Modified: 2016-07-27 07:43 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-07-27 07:43:21 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)
discovered host that uses fdi_zips=sghai_ext.zip and zip includes 'discovery_extenaion' fact with value 'installed' (23.67 KB, image/png)
2016-04-15 03:55 EDT, Sachin Ghai
no flags Details
discovery_extension facts displayed with value 'installed' (26.74 KB, image/png)
2016-04-15 03:56 EDT, Sachin Ghai
no flags Details

  None (edit)
Comment 3 Lukas Zapletal 2016-03-15 05:43:33 EDT
Reproduced, image for Satellite 6.2 affected as well.

I will provide you new image build soon. Thanks for investigation.
Comment 4 Lukas Zapletal 2016-03-15 05:54:23 EDT
Patch provided in https://github.com/theforeman/foreman-discovery-image/pull/68/files
Comment 5 Bryan Kearney 2016-03-15 06:01:46 EDT
Upstream bug component is Discovery Plugin
Comment 7 Bryan Kearney 2016-03-15 12:01:34 EDT
Moving to POST since upstream bug http://projects.theforeman.org/issues/14201 has been closed
-------------
Anonymous
Applied in changeset commit:foreman-discovery-image|2f741bf25041febd91703d51f7c50f327addefbb.
Comment 12 Sachin Ghai 2016-04-15 03:53:11 EDT
Verified with sat6.2 GA snap8.1


I can extend the discovery image with custom facts using fdi.zips.  I used example_zip an built a zip sghai_ext.zip that includes 'discovery_extension' facts with value 'installed' and discovered a host successfully. I can see "discovered_extension=installed" under facts console screen.

And in UI under Fact's software section

Please see attached screenshot.
Comment 13 Sachin Ghai 2016-04-15 03:55 EDT
Created attachment 1147486 [details]
discovered host that uses fdi_zips=sghai_ext.zip and zip includes 'discovery_extenaion' fact with value 'installed'
Comment 14 Sachin Ghai 2016-04-15 03:56 EDT
Created attachment 1147487 [details]
discovery_extension facts displayed with value 'installed'
Comment 15 Sachin Ghai 2016-04-15 04:27:22 EDT
As per comment2, now correct permissions 755 are set.


[root@fdi ~]# ll /etc/NetworkManager/dispatcher.d/15-get-zip-server
-rwxr-xr-x 1 root root 1200 Apr 13 08:41 /etc/NetworkManager/dispatcher.d/15-get-zip-server
Comment 16 Sachin Ghai 2016-04-15 04:29:58 EDT
discovery-fetch-extensions successfully downloads the zip extension as below:


Apr 15 08:20:00 fdi discovery-fetch-extensions[1194]: Archive:  /tmp/tmp.kZ79t4vev4
Apr 15 08:20:00 fdi discovery-fetch-extensions[1194]: creating: /opt/extension/autostart.d/
Apr 15 08:20:00 fdi discovery-fetch-extensions[1194]: inflating: /opt/extension/autostart.d/01_zip.sh
Apr 15 08:20:00 fdi discovery-fetch-extensions[1194]: inflating: /opt/extension/bin/ntpdate
Apr 15 08:20:00 fdi discovery-fetch-extensions[1194]: inflating: /opt/extension/facts/discovery_extension.rb
Apr 15 08:20:00 fdi discovery-fetch-extensions[1194]: inflating: /opt/extension/lib/ruby/discovery_extension.rb
Apr 15 08:20:00 fdi discovery-fetch-extensions[1194]: extracting: /opt/extension/lib/ruby/your-rubylibs-go-here
Apr 15 08:20:00 fdi discovery-fetch-extensions[1194]: extracting: /opt/extension/lib/your-libs-go-here
Apr 15 08:20:00 fdi systemd[1]: Started Download zip extensions to this image.
Comment 19 Bryan Kearney 2016-07-27 07:43:21 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/RHBA-2016:1501

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