Bug 1485865 - /etc/virt-who.conf gets overwritten by an update of the virt-who package
Summary: /etc/virt-who.conf gets overwritten by an update of the virt-who package
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: virt-who
Version: 7.4
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: candlepin-bugs
QA Contact: Eko
Jiri Herrmann
URL:
Whiteboard:
Depends On:
Blocks: 1530132
TreeView+ depends on / blocked
 
Reported: 2017-08-28 10:12 UTC by Kenny Tordeurs
Modified: 2021-03-11 15:39 UTC (History)
5 users (show)

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.
Clone Of:
: 1530132 (view as bug list)
Environment:
Last Closed: 2018-04-10 16:21:32 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github virt-who virt-who pull 95 0 None closed 1484265: Do not replace /etc/virt-who.conf on rpm upgrade 2020-07-13 03:24:24 UTC
Red Hat Product Errata RHEA-2018:0895 0 None None None 2018-04-10 16:22:08 UTC

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:
100%

Steps to Reproduce:
1. [root@provisioning etc]# rpm -qa virt-who
~~~
virt-who-0.19-5.el7.noarch
~~~
2. # grep -v "#" /etc/virt-who.conf | grep -v "^$"
~~~
[global]
interval=43200          ; interval is set to 12 hours
log_per_config=True     ; separate log file per config file
[defaults]
hypervisor_id=hostname
env=Library
~~~
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
===================================================================================================================================================================================================================
Updating:
 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 

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

Complete!
virt-who-0.19-6.el7_4.noarch
~~~
4. # grep -v "#" /etc/virt-who.conf | grep -v "^$" | echo $?
~~~
1
~~~

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, 

Steps:
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.

https://access.redhat.com/errata/RHEA-2018:0895


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