Bug 1342713 - yum: duplicate empty file created without .repo extension
Summary: yum: duplicate empty file created without .repo extension
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat
Component: gdeploy
Version: rhgs-3.1
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: RHGS 3.1.3 Async
Assignee: Sachidananda Urs
QA Contact: Manisha Saini
URL:
Whiteboard:
Depends On:
Blocks: 1351522
TreeView+ depends on / blocked
 
Reported: 2016-06-04 00:44 UTC by Jonathan Holloway
Modified: 2017-03-07 17:42 UTC (History)
4 users (show)

Fixed In Version: gdeploy-2.0.1-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-02-07 11:33:30 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:0260 normal SHIPPED_LIVE Important: ansible and gdeploy security and bug fix update 2017-02-07 16:32:47 UTC

Description Jonathan Holloway 2016-06-04 00:44:49 UTC
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

Comment 2 Jonathan Holloway 2016-06-04 01:16:05 UTC
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

Comment 3 Sachidananda Urs 2016-06-06 05:50:09 UTC
(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

Comment 4 Jonathan Holloway 2016-06-06 14:18:07 UTC
(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

Comment 5 Sachidananda Urs 2016-06-09 10:00:19 UTC
Patch merged upstream: https://github.com/gluster/gdeploy/pull/95

Comment 6 SATHEESARAN 2016-07-21 09:31:11 UTC
This also affects the HCI project where there are empty files created under /etc/yum.repos.d/ while creating a repo using gdeploy

Comment 9 Manisha Saini 2016-11-15 12:49:14 UTC
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

Comment 11 errata-xmlrpc 2017-02-07 11:33:30 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://rhn.redhat.com/errata/RHSA-2017-0260.html


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