Bug 1368115 - vdsm config files from /etc/vdsm.conf.d don't override settings in /etc/vdsm.conf
Summary: vdsm config files from /etc/vdsm.conf.d don't override settings in /etc/vdsm....
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: vdsm
Classification: oVirt
Component: Core
Version: 4.18.11
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ovirt-4.0.4
: 4.18.13
Assignee: Irit Goihman
QA Contact: Lucie Leistnerova
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-18 13:01 UTC by Lucie Leistnerova
Modified: 2016-09-26 12:32 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-09-26 12:32:14 UTC
oVirt Team: Infra
Embargoed:
rule-engine: ovirt-4.0.z+
rule-engine: ovirt-4.1+
ykaul: planning_ack+
mperina: devel_ack+
ykaul: testing_ack+


Attachments (Terms of Use)
vdsm.log (42.68 KB, text/plain)
2016-08-24 08:59 UTC, Lucie Leistnerova
no flags Details
messages.log (11.33 KB, text/plain)
2016-08-24 09:00 UTC, Lucie Leistnerova
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 62885 0 master MERGED certificates: remove config.read call 2020-07-20 13:45:21 UTC
oVirt gerrit 62941 0 ovirt-4.0 MERGED certificates: remove config.read call 2020-07-20 13:45:21 UTC

Description Lucie Leistnerova 2016-08-18 13:01:44 UTC
Description of problem:
local configuration files in /etc/vdsm.conf.d are not overriding settings from main configuration file /etc/vdsm.conf

Version-Release number of selected component (if applicable): vdsm-4.18.11-1.el7ev.x86_64


How reproducible: always


Steps to Reproduce:
1. save file /etc/vdsm/vdsm.conf.d/test.conf 

[vars]
ssl = false

2. run vdsm-tool validate-config
3. ssl is set to true

Actual results: 
command prints 

SUCCESS: ssl configured to true. No conflicts


Expected results: 
command should print 

FAILED: conflicting vdsm and libvirt-qemu tls configuration.
vdsm.conf with ssl=False requires the following changes:
libvirtd.conf: listen_tcp=1, auth_tcp="none", listen_tls=0
 qemu.conf: spice_tls=0.
Modules libvirt contains invalid configuration
Error:  Config is not valid. Check conf files 


Additional info:
if I comment in /etc/vdsm.conf
#ssl = true 
ssl is then set to false from test.conf

Comment 1 Irit Goihman 2016-08-23 15:35:44 UTC
I tried to reproduce the bug with vdsm-4.18.11-1.el7.centos.x86_64 and this is the output I got:

[root@lochte ~]# vdsm-tool configure --force
/usr/lib/python2.7/site-packages/vdsm/tool/dump_volume_chains.py:28: DeprecationWarning: vdscli uses xmlrpc. since ovirt 3.6 xmlrpc is deprecated, please use vdsm.jsonrpcvdscli
  from vdsm import vdscli

Checking configuration status...

multipath requires configuration
libvirt is not configured for vdsm yet
FAILED: conflicting vdsm and libvirt-qemu tls configuration.
vdsm.conf with ssl=True requires the following changes:
libvirtd.conf: listen_tcp=0, auth_tcp="sasl", listen_tls=1
qemu.conf: spice_tls=1.

Running configure...
Reconfiguration of certificates is done.
Reconfiguration of sebool is done.
Reconfiguration of multipath is done.
Reconfiguration of passwd is done.
Reconfiguration of sanlock is done.
Reconfiguration of libvirt is done.

Done configuring modules to VDSM.
----

here I changed the configuration to ssl = false:

[root@lochte ~]# vim /etc/vdsm/vdsm.conf.d/test.conf 

---
[root@lochte ~]# vdsm-tool validate-config
/usr/lib/python2.7/site-packages/vdsm/tool/dump_volume_chains.py:28: DeprecationWarning: vdscli uses xmlrpc. since ovirt 3.6 xmlrpc is deprecated, please use vdsm.jsonrpcvdscli
  from vdsm import vdscli
FAILED: conflicting vdsm and libvirt-qemu tls configuration.
vdsm.conf with ssl=False requires the following changes:
libvirtd.conf: listen_tcp=1, auth_tcp="none", listen_tls=0
 qemu.conf: spice_tls=0.
Modules libvirt contains invalid configuration
Error:  Config is not valid. Check conf files 

It looks alright to me. Can you try it again and if it reproduces, please attach /var/log/vdsm.log and /var/log/messages?

Comment 2 Moran Goldboim 2016-08-24 08:36:21 UTC
Tomas, does the migration policies are using this feature for custom vdsm parameters.

Comment 3 Tomas Jelinek 2016-08-24 08:51:49 UTC
@Moran: the migration policies are an another layer above this overriding both the /etc/vdsm.conf.d/ and the /etc/vdsm.conf, but only for couple of parameters (not the ssl for example), so they are not related to this BZ. But if the migration policy does not send anything (e.g. the fallback policy is used) than the standard vdsm mechanism is used to get the property, so should work as expected. Honestly, never tried it, but if it does not work, than no property will work, not just the migration ones.

Comment 4 Lucie Leistnerova 2016-08-24 08:59:40 UTC
Created attachment 1193547 [details]
vdsm.log

Comment 5 Lucie Leistnerova 2016-08-24 09:00:02 UTC
Created attachment 1193548 [details]
messages.log

Comment 6 Lucie Leistnerova 2016-08-24 09:01:17 UTC
I have the main installation without any changes in config files

# cat vdsm.conf
[vars]
ssl = true

[addresses]
management_port = 54321


and ssl = false in test.conf

# vdsm-tool configure --force
/usr/lib/python2.7/site-packages/vdsm/tool/dump_volume_chains.py:28: DeprecationWarning: vdscli uses xmlrpc. since ovirt 3.6 xmlrpc is deprecated, please use vdsm.jsonrpcvdscli
  from vdsm import vdscli

Checking configuration status...

Current revision of multipath.conf detected, preserving
libvirt is already configured for vdsm
FAILED: conflicting vdsm and libvirt-qemu tls configuration.
vdsm.conf with ssl=True requires the following changes:
libvirtd.conf: listen_tcp=0, auth_tcp="sasl", listen_tls=1
qemu.conf: spice_tls=1.

Running configure...
Reconfiguration of libvirt is done.

Done configuring modules to VDSM.

logs attached

Comment 8 Lucie Leistnerova 2016-09-13 07:37:30 UTC
verified in vdsm-4.18.13-1.el7ev.x86_64


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