Bug 1118281

Summary: The vdsm version in libvirt/qemu config file is not updated after vdsm-4.14 is installed and configured
Product: Red Hat Enterprise Virtualization Manager Reporter: Yang Yang <yanyang>
Component: vdsmAssignee: Mooli Tayer <mtayer>
Status: CLOSED NOTABUG QA Contact: Pavel Stehlik <pstehlik>
Severity: low Docs Contact:
Priority: low    
Version: 3.4.0CC: bazulay, gklein, iheim, lpeer, oourfali, shyu, xuzhang, ybronhei, yeylon
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: infra
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-07-13 11:23:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Yang Yang 2014-07-10 11:16:37 UTC
Description:
The vdsm version in libvirt/qemu config file is not updated  after vdsm-4.14 is installed and configured.

How producible:
Always

Product Version:
rhevm-3.4.1-0.23.el6ev.noarch
vdsm-4.14.7-5.el6ev.x86_64

steps:
1. install vdsm-4.14.* version package on host, such as the following:
# rpm -qa|grep vdsm
vdsm-python-4.14.7-5.el6ev.x86_64
vdsm-xmlrpc-4.14.7-5.el6ev.noarch
vdsm-python-zombiereaper-4.14.7-5.el6ev.noarch
vdsm-cli-4.14.7-5.el6ev.noarch
vdsm-4.14.7-5.el6ev.x86_64

2. force configure all the modules
# vdsm-tool configure --force

3. then check the libvirt related files
/etc/libvirt/libvirtd.conf
/etc/libvirt/qemu.conf
/etc/sysconfig/libvirtd

Expected Results:

## beginning of configuration section by vdsm-4.14.0
................

## end of configuration section by vdsm-4.14.0

Actual Results:
## beginning of configuration section by vdsm-4.13.0
................
## end of configuration section by vdsm-4.13.0

additional info:
this issue can be reproduced with rhel7 version: vdsm-4.14.7-1.5.el7ev.x86_64.rpm

Comment 1 Yaniv Bronhaim 2014-07-13 06:33:21 UTC
Its about updating the following part:

    def _removeSection(self, path):                                             
        """                                                                     
        remove entire 'configuration section by vdsm' section.                  
        section is removed regardless of it's version.                          
        """                                                                     
        if os.path.exists(path):                                                
            with self._openConfig(path) as conff:                               
                conff.removeConf()                                              
                                                                                
    # version != PACKAGE_VERSION since we do not want to update configuration   
    # on every update. see 'configuration versioning:' at Configfile.py for     
    # details.                                                                  
    CONF_VERSION = '4.16.0'       <---                                               
                                                                                
    PKI_DIR = os.path.join(SYSCONF_PATH, 'pki/vdsm')                            
    CA_FILE = os.path.join(PKI_DIR, 'certs/cacert.pem')                         
    CERT_FILE = os.path.join(PKI_DIR, 'certs/vdsmcert.pem')    

you should use here @PACKAGE_VERSION@ as in dsaversion.py.in

Comment 2 Yaniv Bronhaim 2014-07-13 11:23:19 UTC
oh so sorry, my mistake.
its NOTABUG, the CONF_VERSION should not be same as vdsm version.
the CONF_VESION is bumped up ONLY when the default configuration that vdsm put for its related services is changed. since 4.13.0 vdsm didn't manage any changes in defaults. That's the reason for it appears with older version in the conf files.
its even written in the comment bellow and i missed that :)