Bug 1397011

Summary: Hammer admin logging does not create a working tftp configuration
Product: Red Hat Satellite Reporter: Rich Jerrido <rjerrido>
Component: HammerAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Katello QA List <katello-qa-list>
Severity: low Docs Contact:
Priority: low    
Version: 6.2.4CC: bbuckingham, dhlavacd, ehelms, inecas, jcallaha, lzap, mbacovsk, mhulan, tstrachota
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: https://github.com/theforeman/hammer-cli-foreman-admin/pull/4
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-21 16:49:54 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:

Description Rich Jerrido 2016-11-21 12:08:58 UTC
Description of problem:

When using the hammer admin command to increase/decrease logging of various components, it does not create a working /etc/xinetd.d/tftp configuration.


Version-Release number of selected component (if applicable):
tfm-rubygem-hammer_cli-0.5.1.11-4.el7sat.noarch
tfm-rubygem-hammer_cli_csv-2.1.0-1.el7sat.noarch
tfm-rubygem-hammer_cli_foreman-0.5.1.9-1.el7sat.noarch
tfm-rubygem-hammer_cli_foreman_admin-0.0.5-1.el7sat.noarch
tfm-rubygem-hammer_cli_foreman_bootdisk-0.1.3.3-1.el7sat.noarch
tfm-rubygem-hammer_cli_foreman_discovery-0.0.2.3-1.el7sat.noarch
tfm-rubygem-hammer_cli_foreman_docker-0.0.6-1.el7sat.noarch
tfm-rubygem-hammer_cli_foreman_remote_execution-0.0.5.3-1.el7sat.noarch
tfm-rubygem-hammer_cli_foreman_tasks-0.0.10.3-1.el7sat.noarch
tfm-rubygem-hammer_cli_import-0.11.2-1.el7sat.noarch
tfm-rubygem-hammer_cli_katello-0.0.22.26-1.el7sat.noarch


How reproducible:
100%


Steps to Reproduce:
* run either of the below commands to configure logging

  hammer admin logging -a --level-production

  OR

  hammer admin logging -a --level-debug

* then view /etc/xinetd.d/tftp

  cat /etc/xinetd.d/tftp

Actual results:

/etc/xinetd.d/tftp is created as such

service tftp
{
        port            = 69
        disable         = no
        socket_type     = dgram
        protocol        = udp
        wait            = yes
        user            = root
        group           = root
        groups          = yes
        server          = /usr/sbin/in.tftpd
        server_args=-v -s /var/lib/tftpboot -m /etc/tftpd.map
        per_source      = 11
        cps             = 100 2
        flags           = IPv4
}

and the following error is logged to syslog when xinetd is restarted, restarting in the tftp service being non operational. 

"Nov 21 06:52:27 satellite xinetd[19663]: Attribute server_args needs a space before operator [file=/etc/xinetd.d/tftp] [line=15]"



Additional info:

placing a space after 'server_args' in the configuration fixes this.

Comment 3 Lukas Zapletal 2016-11-25 12:35:33 UTC
Thanks, I will associate it later on (github issue)

Comment 4 Tomas Strachota 2016-11-28 08:59:02 UTC
Thanks, Lukas! Please set devel_triage+ once you associate the gh issue.

Comment 5 Lukas Zapletal 2016-12-02 14:50:35 UTC
Reproduced, fixed.

https://github.com/theforeman/hammer-cli-foreman-admin/pull/4

This will be fixed in tfm-rubygem-hammer_cli-0.6.0 let's rebase in 6.3.

REL-ENG: There will be two commits in 0.6.0 version, please rebase the dependency in 6.3.

https://github.com/theforeman/hammer-cli-foreman-admin/commits/master

Comment 6 Martin Bacovsky 2017-08-02 12:07:22 UTC
Verified.
Version Tested: Satellite-6.3 Snap 8

The tftp config file is valid and the service is operational after logging level setup using the hammer admin command.

# hammer admin logging -a --level-production

# cat /etc/xinetd.d/tftp 
# default: off
# description: The tftp server serves files using the trivial file transfer \
#       protocol.  The tftp protocol is often used to boot diskless \
#       workstations, download configuration files to network-aware printers, \
#       and to start the installation process for some operating systems.
service tftp
{
        socket_type             = dgram
        protocol                = udp
        wait                    = yes
        user                    = root
        server                  = /usr/sbin/in.tftpd
        server_args = -v -s /var/lib/tftpboot -m /etc/tftpd.map
        disable                 = yes
        per_source              = 11
        cps                     = 100 2
        flags                   = IPv4
}

# systemctl restart tftp.service

# systemctl status tftp.service
● tftp.service - Tftp Server
   Loaded: loaded (/usr/lib/systemd/system/tftp.service; indirect; vendor preset: disabled)
   Active: active (running) since Wed 2017-08-02 07:59:31 EDT; 4min 42s ago
     Docs: man:in.tftpd
 Main PID: 104565 (in.tftpd)
   CGroup: /system.slice/tftp.service
           └─104565 /usr/sbin/in.tftpd -s /var/lib/tftpboot

Aug 02 07:59:31 intel-lizardhead-02.lab.bos.redhat.com systemd[1]: Started Tftp Server.
Aug 02 07:59:31 intel-lizardhead-02.lab.bos.redhat.com systemd[1]: Starting Tftp Server...

# rpm -qa|grep -e ^satellite-[0-9] -e hammer_cli_foreman_admin
tfm-rubygem-hammer_cli_foreman_admin-0.0.6-1.el7sat.noarch
satellite-6.3.0-16.0.beta.el7sat.noarch

Comment 7 Satellite Program 2018-02-21 16:49:54 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/RHSA-2018:0336