Bug 1528816 - vdsm-tool remove-config does not revert changes
Summary: vdsm-tool remove-config does not revert changes
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: vdsm
Classification: oVirt
Component: Tools
Version: 4.20.9
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ovirt-4.2.1
: 4.20.11
Assignee: Yaniv Bronhaim
QA Contact: Petr Matyáš
URL:
Whiteboard:
Depends On:
Blocks: 1528813 1530630
TreeView+ depends on / blocked
 
Reported: 2017-12-24 11:48 UTC by Yedidyah Bar David
Modified: 2018-02-12 11:57 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1530630 (view as bug list)
Environment:
Last Closed: 2018-02-12 11:57:02 UTC
oVirt Team: Infra
Embargoed:
rule-engine: ovirt-4.2+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 85719 0 master MERGED configurator: adding removeConf to libvirt and abrt 2020-05-21 11:30:53 UTC
oVirt gerrit 85767 0 ovirt-4.2.0 ABANDONED configurator: adding removeConf to libvirt and abrt 2020-05-21 11:30:53 UTC

Description Yedidyah Bar David 2017-12-24 11:48:56 UTC
Description of problem:

See bug 1528813.

ovirt-hosted-engine-cleanup calls 'vdsm-tool remove-config', but this leaves at least some files changed by vdsm with the changes.

First one I noticed is that libvirtd fails to start with:

Dec 24 13:21:57 lvc7host1.home.local libvirtd[16297]: 2017-12-24 11:21:57.641+0000: 16297: error : virNetTLSContextCheckCertFile:120 : Cannot read CA certificate '/etc/pki/vdsm/certs/cacert.pem': No such file or directory

Because /etc/libvirt/libvirtd.conf has:

## beginning of configuration section by vdsm-4.20.0
auth_unix_rw="sasl"
ca_file="/etc/pki/vdsm/certs/cacert.pem"
cert_file="/etc/pki/vdsm/certs/vdsmcert.pem"
host_uuid="88f843a0-fdda-4eb2-bdb4-b6edacd7ad6e"
keepalive_interval=-1
key_file="/etc/pki/vdsm/keys/vdsmkey.pem"
unix_sock_group="qemu"
unix_sock_rw_perms="0770"
## end of configuration section by vdsm-4.20.0

which is not removed, while the cleanup script later does remove vdsmcert.pem , so libvirtd fails to read it.

Version-Release number of selected component (if applicable):

Current master

How reproducible:

Not sure, I think always

Steps to Reproduce:
1. deploy hosted-engine. It's probably enough to 'vdsm-tool configure --force'.
2. vdsm-tool remove-config
3.

Actual results:

All configuration files changed by (1.) are reverted to their original state.

Expected results:

At least some are not.

Additional info:

Comment 2 Petr Matyáš 2018-01-08 15:08:00 UTC
Testing on vdsm-4.20.9.3-1.el7.centos.x86_64

Still fails to run libvirtd with Jan  8 16:03:43 localhost libvirtd: 2018-01-08 15:03:43.760+0000: 5187: error : virNetTLSContextCheckCertFile:120 : Cannot read CA certificate '/etc/pki/vdsm/certs/cacert.pem': No such file or directory

[root@$hostname ~]# tail -10 /etc/libvirt/libvirtd.conf
## beginning of configuration section by vdsm-4.20.0
auth_unix_rw="sasl"
ca_file="/etc/pki/vdsm/certs/cacert.pem"
cert_file="/etc/pki/vdsm/certs/vdsmcert.pem"
host_uuid="$uuid"
keepalive_interval=-1
key_file="/etc/pki/vdsm/keys/vdsmkey.pem"
unix_sock_group="qemu"
unix_sock_rw_perms="0770"
## end of configuration section by vdsm-4.20.0

Comment 3 Yaniv Bronhaim 2018-01-09 06:44:43 UTC
vdsm-4.20.9.3 does not include the fix. please verify with http://gerrit.ovirt.org/85719 - the section is removed after running remove-config

Comment 4 Yaniv Bronhaim 2018-01-09 06:48:00 UTC
my verification is the following, correct me if your scenario is different:

~ tail -10 /etc/libvirt/libvirtd.conf
## beginning of configuration section by vdsm-4.20.0
auth_unix_rw="sasl"
ca_file="/etc/pki/vdsm/certs/cacert.pem"
cert_file="/etc/pki/vdsm/certs/vdsmcert.pem"
host_uuid="09528c43-d5f5-4012-9244-239ab8d0f35a"
keepalive_interval=-1
key_file="/etc/pki/vdsm/keys/vdsmkey.pem"
unix_sock_group="qemu"
unix_sock_rw_perms="0770"
## end of configuration section by vdsm-4.20.0

~ vdsm-tool remove-config
~ tail -10 /etc/libvirt/libvirtd.conf
#admin_keepalive_count = 5

###################################################################
# Open vSwitch:
# This allows to specify a timeout for openvswitch calls made by
# libvirt. The ovs-vsctl utility is used for the configuration and
# its timeout option is set by default to 5 seconds to avoid
# potential infinite waits blocking libvirt.
#
#ovs_timeout = 5

Comment 5 Petr Matyáš 2018-01-09 09:13:52 UTC
I tried running 'vdsm-tool remove-config' and also 'ovirt-hosted-engine-cleanup'

I will reverify when new package with this change is built and included

Comment 6 Martin Perina 2018-01-09 09:55:54 UTC
The fix is part 4.2.1-1 build

Comment 7 Petr Matyáš 2018-01-12 11:24:49 UTC
Verified on vdsm-4.20.13-1.el7.centos.x86_64

Comment 8 Sandro Bonazzola 2018-02-12 11:57:02 UTC
This bugzilla is included in oVirt 4.2.1 release, published on Feb 12th 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.1 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.


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