Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1342713 - yum: duplicate empty file created without .repo extension
yum: duplicate empty file created without .repo extension
Status: CLOSED ERRATA
Product: Red Hat Gluster Storage
Classification: Red Hat
Component: gdeploy (Show other bugs)
3.1
Unspecified Unspecified
unspecified Severity medium
: ---
: RHGS 3.1.3 Async
Assigned To: Sachidananda Urs
Manisha Saini
: ZStream
Depends On:
Blocks: 1351522
  Show dependency treegraph
 
Reported: 2016-06-03 20:44 EDT by Jonathan Holloway
Modified: 2017-03-07 12:42 EST (History)
4 users (show)

See Also:
Fixed In Version: gdeploy-2.0.1-1
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-02-07 06:33:30 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker 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 11:32:47 EST

  None (edit)
Description Jonathan Holloway 2016-06-03 20:44:49 EDT
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-03 21:16:05 EDT
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 01:50:09 EDT
(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 10:18:07 EDT
(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 06:00:19 EDT
Patch merged upstream: https://github.com/gluster/gdeploy/pull/95
Comment 6 SATHEESARAN 2016-07-21 05:31:11 EDT
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 07:49:14 EST
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 06:33:30 EST
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.