1. Proposed title of this feature request Allow override of tftpd.map file location and/or contents 3. What is the nature and description of the request? When the installer is run for upgrades, it overwrites the contents of tftpd.map. This request would allow either a custom tftpd.map to be provided as an override or for the contents to be overridden. 4. Why does the customer need this? (List the business requirements here) Customer creates a custom tftpd.map file for the tftpd server. Currently it has to be replaced after each upgrade. 5. How would the customer like to achieve this? (List the functional requirements here) Allow for an override of the parameter in the puppet class during the installation. 6. For each functional requirement listed in question 5, specify how Red Hat and the customer can test to confirm the requirement is successfully implemented. Observe custom tftpd.map settings still in place after an upgrade 7. Is there already an existing RFE upstream or in Red Hat bugzilla? No 8. Does the customer have any specific timeline dependencies? No 9. Is the sales team involved in this request and do they have any additional input? No 10. List any affected packages or components. Installer 11. Would the customer be able to assist in testing this functionality if implemented? Yes
The installer code (puppet module) is here: /usr/share/foreman-installer/modules/tftp/ The main class code does not allow for server_args or map file contents to be passed as a parameter: manifests/init.pp class tftp ( $root = $tftp::params::root, $package = $tftp::params::package, $syslinux_package = $tftp::params::syslinux_package, ) inherits tftp::params { The config class contains the resource that sets up the xinetd service. The map file location is hard coded manifests/config.pp xinetd::service { 'tftp': port => '69', server => '/usr/sbin/in.tftpd', server_args => "-v -s ${::tftp::root} -m /etc/tftpd.map", socket_type => 'dgram', protocol => 'udp', cps => '100 2', flags => 'IPv4', per_source => '11', } The config class also contains the resource that populates the contents of the map file manifests/config.pp file {'/etc/tftpd.map': content => template('tftp/tftpd.map'), mode => '0644', notify => Class['xinetd'], } And the template defines the contents (also hard-coded) templates/tftpd.map # Convert backslashes to slashes re ^bootmgr\.exe boot/bootmgr.exe re ^\\Boot\\ boot/ rg \\ /
Here are possible three implementations (that are not mutually exclusive options): 1) A parameter to choose the source file. These are puppet source files so can be puppet:///modules/... to refer to another module, http(s)://... to download or /path/to/file to refer to a location on disk. 2) A parameter to set the content. 3) A parameter to disable changing the contents of the file. I'm leaning to option one but would be interested to know what the customer prefers.
Since the customer agreed with option one, I went ahead and implemented it. It's in review at https://github.com/theforeman/puppet-tftp/pull/82 now.
Upstream bug assigned to ekohlvan
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/25190 has been resolved.
This is considered an advanced feature and can only be used via custom-hiera.yaml: tftp: map_source: SOURCE Here SOURCE can be any source specification that Puppet understands. The most obvious one is an absolute path to some (local) file, but it can also be any http(s) URL.
NOTE : ewoulds example in c10 has a typo. The correct way to set it is: Verified fix in Sat 6.5 snap 11. tftp::map_source: SOURCE 1. Created custom tftp.map file using the example from the attached customer case. 2. Added the following to /etc/foreman-installer/custom-hiera.yaml: tftp::map_source: /tmp/custom-tftp.map 3. Ran satellite-installer -v Checked /etc/tftp.map and confirmed it was the same as custom-tftp.map
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-2019:1222