Description of problem: yum repo configuration creates an extra file without the .repo extension in /etc/yum.repos.d/ Version-Release number of selected component (if applicable): gdeploy-2.0-16 How reproducible: Every time. Steps to Reproduce: 1. Run gdeploy -c <filename> command with a configuration similar to example in Additional info section below. 2. 3. Actual results: Two files are created. One empty file without the .repo extension and one .repo file containing the expected repo data. Expected results: One file with the .repo extension and containing the expected repo data. Additional info: Example of configuration used... [yum1] action=install gpgcheck=no repos=http://server1.example.com/brew/glusterfs-3.7-latest-el7rhgs/,http://server2.example.com/rel-eng/RHGS/3.1-u3-RHEL-7/latest/Server-RH-Glust er-3-Server/x86_64/os/ packages=glusterfs-server update=yes
I've submitted a pull request that fixes the issue. Please see: "Fixing extra empty repo file without .repo extension (BZ 1342713) #95" @ https://github.com/gluster/gdeploy/pull/95 Pre-patch result: [root@server0 yum.repos.d]# ls download* rhsqe* server1.example.com_rel-eng_RHGS_3.1-u3-RHEL-7_latest_Server-RH-Gluster-3-Server_x86_64_os server1.example.com_rel-eng_RHGS_3.1-u3-RHEL-7_latest_Server-RH-Gluster-3-Server_x86_64_os.repo server2.example.com_brew_glusterfs-3.7-latest-el7rhgs server2.example.com_brew_glusterfs-3.7-latest-el7rhgs.repo Post-patch result: [root@server0 yum.repos.d]# ls download* rhsqe* server1.example.com_rel-eng_RHGS_3.1-u3-RHEL-7_latest_Server-RH-Gluster-3-Server_x86_64_os.repo server2.exampl.com_brew_glusterfs-3.7-latest-el7rhgs.repo
(In reply to Jonathan Holloway from comment #2) > I've submitted a pull request that fixes the issue. > Please see: "Fixing extra empty repo file without .repo extension (BZ > 1342713) #95" @ https://github.com/gluster/gdeploy/pull/95 > > > Pre-patch result: > [root@server0 yum.repos.d]# ls download* rhsqe* > server1.example.com_rel-eng_RHGS_3.1-u3-RHEL-7_latest_Server-RH-Gluster-3- > Server_x86_64_os > server1.example.com_rel-eng_RHGS_3.1-u3-RHEL-7_latest_Server-RH-Gluster-3- > Server_x86_64_os.repo > server2.example.com_brew_glusterfs-3.7-latest-el7rhgs > server2.example.com_brew_glusterfs-3.7-latest-el7rhgs.repo > > > Post-patch result: > [root@server0 yum.repos.d]# ls download* rhsqe* > server1.example.com_rel-eng_RHGS_3.1-u3-RHEL-7_latest_Server-RH-Gluster-3- > Server_x86_64_os.repo > server2.exampl.com_brew_glusterfs-3.7-latest-el7rhgs.repo Jonathan can you please add the condition: when: repolist is defined and repolist|length > 0
(In reply to Sachidananda Urs from comment #3) > (In reply to Jonathan Holloway from comment #2) > Jonathan can you please add the condition: > > when: repolist is defined and repolist|length > 0 Hey Sac, In the template task, I only modified the name to include "create/". It looks like the "when:" line is just cut-off in the comparison view, but it's still there in the full code. Cheers
Patch merged upstream: https://github.com/gluster/gdeploy/pull/95
This also affects the HCI project where there are empty files created under /etc/yum.repos.d/ while creating a repo using gdeploy
Verified this Bug on [root@dhcp37-206 yum.repos.d]# rpm -qa | grep gdeploy gdeploy-2.0.1-3.el7rhgs.noarch [root@dhcp37-206 yum.repos.d]# rpm -qa | grep ansible ansible-2.2.0-0.50.prerelease.el7.noarch glusterfs-3.8.4-5.el7rhgs.x86_64 Steps: 1.Create repo.conf with the following [hosts] dhcp37-206.lab.eng.blr.redhat.com [yum1] action=install gpgcheck=no repos=http://download-node-02.eng.bos.redhat.com/rel-eng/RHGS/3.2.0-RHEL-7/2016-11-14.1/Server-RH-Gluster-3.2-NFS/x86_64/os/ packages=glusterfs-ganesha update=yes 2.Run gdeploy -c repo.conf Only 1 .repo file is created in /etc/yum.repos.d [root@dhcp37-206 yum.repos.d]# ls download-node-02.eng.bos.redhat.com_rel-eng_RHGS_3.2.0-RHEL-7_2016-11-14.1_Server-RH-Gluster-3.2-NFS_x86_64_os.repo Hence marking this Bug as Verified
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://rhn.redhat.com/errata/RHSA-2017-0260.html