Bug 1571889
Summary: | [RFE] Allow override of tftpd.map file location and/or contents during installer upgrades | ||
---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Dylan Gross <dgross> |
Component: | Installation | Assignee: | Ewoud Kohl van Wijngaarden <ekohlvan> |
Status: | CLOSED ERRATA | QA Contact: | Perry Gagne <pgagne> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | 6.3.1 | CC: | dgross, ehelms, ekohlvan, pgagne, rjerrido |
Target Milestone: | 6.5.0 | Keywords: | FutureFeature, Triaged |
Target Release: | Unused | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2019-05-14 12:37:13 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
Dylan Gross
2018-04-25 15:29:03 UTC
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 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 |