Bug 1317257 - Unable to extend the Satellite Discovery Image with custom facts
Summary: Unable to extend the Satellite Discovery Image with custom facts
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Discovery Image
Version: 6.1.7
Hardware: All
OS: Linux
unspecified
high
Target Milestone: Unspecified
Assignee: Lukas Zapletal
QA Contact: Sachin Ghai
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-13 12:49 UTC by jalviso
Modified: 2019-10-10 11:31 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-27 11:43:21 UTC
Target Upstream Version:
Embargoed:


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 07:55 UTC, Sachin Ghai
no flags Details
discovery_extension facts displayed with value 'installed' (26.74 KB, image/png)
2016-04-15 07:56 UTC, Sachin Ghai
no flags Details

Comment 3 Lukas Zapletal 2016-03-15 09:43:33 UTC
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 09:54:23 UTC
Patch provided in https://github.com/theforeman/foreman-discovery-image/pull/68/files

Comment 5 Bryan Kearney 2016-03-15 10:01:46 UTC
Upstream bug component is Discovery Plugin

Comment 7 Bryan Kearney 2016-03-15 16:01:34 UTC
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 07:53:11 UTC
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 07:55:22 UTC
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 07:56:24 UTC
Created attachment 1147487 [details]
discovery_extension facts displayed with value 'installed'

Comment 15 Sachin Ghai 2016-04-15 08:27:22 UTC
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 08:29:58 UTC
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 11:43:21 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/RHBA-2016:1501


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