Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1255114

Summary: vdsm leaving leftovers on host after removal
Product: Red Hat Enterprise Virtualization Manager Reporter: Pavol Brilla <pbrilla>
Component: vdsmAssignee: Oved Ourfali <oourfali>
Status: CLOSED CURRENTRELEASE QA Contact: Pavol Brilla <pbrilla>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.6.0CC: amarchuk, bazulay, danken, gklein, lpeer, lsurette, masayag, mgoldboi, oourfali, pbrilla, phoracek, pstehlik, ybronhei, ycui, yeylon, ykaul
Target Milestone: ovirt-3.6.2Keywords: Reopened
Target Release: 3.6.2   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-17 07:31:48 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 Pavol Brilla 2015-08-19 16:51:09 UTC
Description of problem:
After adding new host to 3.6 engine, and removing I did "yum erase vsdm*", but there are still lot of leftovers after vdsm on host, see below:

[root@slot-6c ~]# find / -name "*vdsm*"
/run/libvirt/network/vdsm-ovirtmgmt.xml
/etc/pki/vdsm
/etc/pki/vdsm/certs/vdsmcert.pem
/etc/pki/vdsm/keys/vdsmkey.pem
/etc/vdsm
/etc/vdsm/vdsm.id
/etc/vdsm/vdsm.conf.rpmsave
/etc/libvirt/nwfilter/vdsm-no-mac-spoofing.xml
/etc/libvirt/qemu/networks/autostart/vdsm-ovirtmgmt.xml
/etc/libvirt/qemu/networks/vdsm-ovirtmgmt.xml
/var/lib/vdsm
/var/log/vdsm
/var/log/vdsm/supervdsm.log
/var/log/vdsm/vdsm.log
/usr/lib/python2.7/site-packages/vdsm
/usr/lib/python2.7/site-packages/mom/HypervisorInterfaces/vdsmInterface.py
/usr/lib/python2.7/site-packages/mom/HypervisorInterfaces/vdsmxmlrpcInterface.py
/usr/lib/python2.7/site-packages/mom/HypervisorInterfaces/vdsmInterface.pyc
/usr/lib/python2.7/site-packages/mom/HypervisorInterfaces/vdsmInterface.pyo
/usr/lib/python2.7/site-packages/mom/HypervisorInterfaces/vdsmxmlrpcInterface.pyc
/usr/lib/python2.7/site-packages/mom/HypervisorInterfaces/vdsmxmlrpcInterface.pyo
/usr/lib/firewalld/services/vdsm.xml
/usr/share/vdsm


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

How reproducible:
100%

Steps to Reproduce:
1. Install new host and add to engine
2. Remove host from engine
3. Erase vdsm from host
4. see left overs

Actual results:
lot of files kept on host

Expected results:
cleaner host

Additional info:
yes there is also mom files, but most part belongs to vdsm

Comment 1 Dan Kenigsberg 2015-10-22 06:34:41 UTC
What is the basis of this request? Is it a Fedora/EL packaging standard?

In my opinion, logs must NOT be dropped when a package is removed.
Modified conf files should be kept, too. As well as the ovirtmgmt network that was created per Engine's request.

The only thing that might be relevant, is to remove the vdsm-created /etc/libvirt/nwfilter/vdsm-no-mac-spoofing.xml when Vdsm is unconfigured. This, too, may hurt the use case of removing Vdsm while VMs are running.

Comment 2 Oved Ourfali 2015-10-25 11:08:37 UTC
Yeela - consult the list of things that should be removed with Dan and Yaniv, and implement accordingly.

Comment 3 Pavol Brilla 2015-10-29 15:39:13 UTC
It was standard RHEL7 installation

OK after your explanation, logs and configuration files are relevant to keep

Bug can be closed

Comment 4 Pavel Stehlik 2015-11-11 12:33:55 UTC
Hi, sorry I disagree here. These leftovers causes issues. I can agree on logs, changed configs (and these should be handled by RPM themselves - .rpmnew .rpmold). 
But there are some more files left, which shouldn't. Especially weird vdsm DB for network interfaces. VDSM itself apparently don't solve this case.
Please reconsider, and better fix this bug.

Comment 5 Oved Ourfali 2015-11-11 13:04:04 UTC
(In reply to Pavel Stehlik from comment #4)
> Hi, sorry I disagree here. These leftovers causes issues. I can agree on
> logs, changed configs (and these should be handled by RPM themselves -
> .rpmnew .rpmold). 
> But there are some more files left, which shouldn't. Especially weird vdsm
> DB for network interfaces. VDSM itself apparently don't solve this case.
> Please reconsider, and better fix this bug.

Please specify a list of things you've identified that remain and you want to be deleted.

Comment 6 Pavel Stehlik 2015-11-11 14:21:41 UTC
/run/libvirt/network/vdsm-ovirtmgmt.xml
/etc/pki/vdsm
/var/lib/vdsm
/usr/share/vdsm
/usr/lib/firewalld/services/vdsm.xml

and based on c#1 also all unchanged (default) config files vdsm package created.

Comment 7 Yaniv Kaul 2015-11-16 15:05:49 UTC
(In reply to Pavel Stehlik from comment #6)
> /run/libvirt/network/vdsm-ovirtmgmt.xml
> /etc/pki/vdsm
> /var/lib/vdsm
> /usr/share/vdsm
> /usr/lib/firewalld/services/vdsm.xml
> 
> and based on c#1 also all unchanged (default) config files vdsm package
> created.

I'm surprised TPS or Errata tests are not complaining about these.

Comment 8 Yeela Kaplan 2015-11-17 14:03:41 UTC
I agree that all leftovers undre /usr/share/vdsm and I am taking care of it.

/run/libvirt/network/vdsm-ovirtmgmt.xml should not be removed, when taking into consideration comment#1.

Dan,
What do you think about the rest in comment#6?

Comment 9 Yeela Kaplan 2015-11-19 13:01:37 UTC
Pavel,
Do you have any fedora guidelines to work by,
so we can be sure to determine the correct files to be removed.

vdsm data directory and vdsm python lib are removed by:   
oVirt gerrit 48706

Comment 10 Pavel Stehlik 2015-11-23 09:44:19 UTC
(In reply to Yeela Kaplan from comment #9)
> Pavel,
> Do you have any fedora guidelines to work by,
> so we can be sure to determine the correct files to be removed.
> 
> vdsm data directory and vdsm python lib are removed by:   
> oVirt gerrit 48706

No, I don't have any specific Fedora, but this is more standard LSB and RPM guideline.

Comment 11 Dan Kenigsberg 2015-12-10 08:34:02 UTC
I think that 

 /etc/pki/vdsm
 /var/lib/vdsm
 /usr/lib/firewalld/services/vdsm.xml

can all be safely removed. However, users may be a bit surprised that after removing Vdsm and reinstalling it, the host must be re-added to Engine (in order to recreate the keys and firewall rules).

Comment 12 Yeela Kaplan 2015-12-10 10:34:57 UTC
I will refer to all paths mentioned originally as to what should or should not be removed and why.

1. /run/libvirt/network/vdsm-ovirtmgmt.xml
    should not be removed, when taking into consideration comment#1.

2. The following should not be removed as it hurts the user experience when working with engine (take a look at comment#11):
   /etc/pki/vdsm
   /etc/pki/vdsm/certs/vdsmcert.pem
   /etc/pki/vdsm/keys/vdsmkey.pem
   /var/lib/vdsm
   /usr/lib/firewalld/services/vdsm.xml
   /etc/vdsm/vdsm.id

3. logs should not be removed. May be needed even if vdsm is no longer installed:
   /var/log/vdsm 
   /var/log/vdsm/supervdsm.log
   /var/log/vdsm/vdsm.log

4. mom's files which are not under vdsm's directories should not be removed by us:
   /usr/lib/python2.7/site-packages/mom/HypervisorInterfaces/vdsmInterface.py
   /usr/lib/python2.7/site-packages/mom/HypervisorInterfaces
/vdsmxmlrpcInterface.py
   /usr/lib/python2.7/site-packages/mom/HypervisorInterfaces/vdsmInterface.pyc
   /usr/lib/python2.7/site-packages/mom/HypervisorInterfaces/vdsmInterface.pyo

5. The following have been removed by oVirt gerrit 48706:
   /usr/share/vdsm
   /usr/lib/python2.7/site-packages/vdsm

6. libvirt should not be touched as well: 
   /etc/libvirt/nwfilter/vdsm-no-mac-spoofing.xml
   /etc/libvirt/qemu/networks/autostart/vdsm-ovirtmgmt.xml
   /etc/libvirt/qemu/networks/vdsm-ovirtmgmt.xml

7. Regarding /etc/vdsm that contains vdsm configuration,
we should decide if we want to keep it after vdsm removal because the user might have added special configuration (it's the same as in section 2 if the user wants to reinstall vdsm later).
Also we should take into consideration that vdsm.id is under /etc/vdsm and we want to keep it as I mentioned in section 2.
Dan/Oved what do you think about this?

This is a general issue that should be decided: 
Do we want to keep the support for the host configuration if it still in engine?
I think the answer is that we should, otherwise we will hurt the usability of the system.

Comment 13 Oved Ourfali 2015-12-10 12:30:53 UTC
Moti - please give your opinion on the engine-related files.
I think they can be removed, but I might be missing something.

Yeela -
1. Agree
2. I think they can be removed - but let's wait for Moti's feedback
3. Agree
4. Agree
6. Not sure about those. Dan?
7. I think we should keep. Dan?

Comment 14 Moti Asayag 2015-12-10 12:58:17 UTC
(In reply to Oved Ourfali from comment #13)
> Moti - please give your opinion on the engine-related files.
> I think they can be removed, but I might be missing something.

When a host is being added to the engine, the host-deploy is responsible to install and configure it. The engine doesn't expect any files to appear.
Therefore engine-related files shouldn't be kept after vdsm removal.

> 
> Yeela -
> 1. Agree
> 2. I think they can be removed - but let's wait for Moti's feedback
> 3. Agree
> 4. Agree
> 6. Not sure about those. Dan?
> 7. I think we should keep. Dan?

Comment 15 Yeela Kaplan 2015-12-13 15:03:58 UTC
What Moti is saying is correct, host-deploy will take care of adding these files.
But the problem is that currently the user does not have to add the host to engine (which will use host-deploy) every time vdsm is removed.


If we remove these files, the user will have to re-deploy the host on engine side every time, and that's why I think we should not touch these files.

Comment 16 Dan Kenigsberg 2015-12-22 08:18:17 UTC
vdsm.conf and vdsm.id must not be deleted, in case it was modified by the user.

all /etc/libvirt/qemu/networks/{autostart}/vdsm-* network definitions and /etc/libvirt/nwfilter/vdsm-no-mac-spoofing.xml can be deleted

all assuming no VMs are running.

Comment 18 Gil Klein 2016-02-17 07:31:48 UTC
This bug was fixed and is slated to be in the upcoming version. As we
are focusing our testing at this phase on severe bugs, this bug was
closed without going through its verification step. If you think this
bug should be verified by QE, please set its severity to high and move
it back to ON_QA