Bug 1485865

Summary: /etc/virt-who.conf gets overwritten by an update of the virt-who package
Product: Red Hat Enterprise Linux 7 Reporter: Kenny Tordeurs <ktordeur>
Component: virt-whoAssignee: candlepin-bugs
Status: CLOSED ERRATA QA Contact: Eko <hsun>
Severity: high Docs Contact: Jiri Herrmann <jherrman>
Priority: high    
Version: 7.4CC: csnyder, jherrman, omankame, rjerrido, yuefliu
Target Milestone: rcKeywords: Triaged, ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: Release Note
Doc Text:
*virt-who* configuration no longer resets on upgrade or reinstall Previously, upgrading or reinstalling *virt-who* reset the configuration of the `/etc/virt-who.conf` file to default values. This update changes the packaging of *virt-who* to prevent overwriting configuration files, which ensures the described problem no longer occurs.
Story Points: ---
Clone Of:
: 1530132 (view as bug list) Environment:
Last Closed: 2018-04-10 16:21:32 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:
Bug Depends On:    
Bug Blocks: 1530132    

Description Kenny Tordeurs 2017-08-28 10:12:09 UTC
Description of problem:
/etc/virt-who.conf gets overwritten with defaults after update/reinstall of the virt-who package

Version-Release number of selected component (if applicable):
---> Package virt-who.noarch 0:0.19-5.el7 will be updated
---> Package virt-who.noarch 0:0.19-6.el7_4 will be an update

How reproducible:

Steps to Reproduce:
1. [root@provisioning etc]# rpm -qa virt-who
2. # grep -v "#" /etc/virt-who.conf | grep -v "^$"
interval=43200          ; interval is set to 12 hours
log_per_config=True     ; separate log file per config file
3. # yum update virt-who -y && rpm -qa virt-who
Loaded plugins: product-id, search-disabled-repos, subscription-manager
Resolving Dependencies
--> Running transaction check
---> Package virt-who.noarch 0:0.19-5.el7 will be updated
---> Package virt-who.noarch 0:0.19-6.el7_4 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

 Package                                         Arch                                          Version                                             Repository                                                 Size
 virt-who                                        noarch                                        0.19-6.el7_4                                        rhel-7-server-rpms                                        187 k

Transaction Summary
Upgrade  1 Package

Total download size: 187 k
Is this ok [y/d/N]: y
Downloading packages:
No Presto metadata available for rhel-7-server-rpms
virt-who-0.19-6.el7_4.noarch.rpm                                                                                                                                                            | 187 kB  00:00:01     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Updating   : virt-who-0.19-6.el7_4.noarch                                                                                                                                                                    1/2 
  Cleanup    : virt-who-0.19-5.el7.noarch                                                                                                                                                                      2/2 
  Verifying  : virt-who-0.19-6.el7_4.noarch                                                                                                                                                                    1/2 
  Verifying  : virt-who-0.19-5.el7.noarch                                                                                                                                                                      2/2 

  virt-who.noarch 0:0.19-6.el7_4                                                                                                                                                                                   

4. # grep -v "#" /etc/virt-who.conf | grep -v "^$" | echo $?

Actual results: 
The content that we placed inside virt-who.conf is gone after an update or reinstall of the virt-who package

Expected results:
The content to be there or at least propose to keep/remove the current content

Additional info:

Comment 2 Chris Snyder 2017-08-28 15:30:12 UTC
A fix has been posted but not merged to upstream master yet. Moving this bug to POST.

Comment 3 Chris Snyder 2017-08-29 15:29:40 UTC
Moving to MODIFIED as the fix has been merged to upstream master and will be included in the first build for 7.5.

Comment 5 yuefliu 2017-11-03 03:19:39 UTC
Verified the bug with virt-who-0.21.0-1.el7.noarch, 

1. Install virt-who-0.19-5.el7_4.noarch.rpm and configure /etc/virt-who.conf value.

2. Update virt-who to virt-who-0.21.0-1.el7.noarch.rpm by "#rpm -Uvh"

3. Check /etc/virt-who.conf, the configuration still exists.

Comment 11 errata-xmlrpc 2018-04-10 16:21:32 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.