Bug 1109569 - Bogus warning when running vdsm-tool conifgure
Summary: Bogus warning when running vdsm-tool conifgure
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: oVirt
Classification: Retired
Component: vdsm
Version: 3.5
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: 3.5.0
Assignee: Mooli Tayer
QA Contact: Gil Klein
URL:
Whiteboard: infra
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-06-15 13:32 UTC by Nir Soffer
Modified: 2016-02-10 19:30 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-13 07:21:32 UTC
oVirt Team: Infra
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 28782 0 master MERGED configurator.py: fix _removeFile to do as described in it's doc string. Never
oVirt gerrit 31778 0 ovirt-3.5 MERGED configurator.py: fix _removeFile to do as described in it's doc string. Never

Description Nir Soffer 2014-06-15 13:32:24 UTC
Description of problem:

vdsm-tool warn about already removed file:

  # vdsm-tool configure --force

  Checking configuration status...


  Running configure...
  WARNING:root:File: /etc/libvirt/qemu/networks/autostart/default.xml already removed
  Reconfiguration of libvirt is done.
  Reconfiguration of sanlock is done.

  Done configuring modules to VDSM.

When we want to remove a file, and the file was already removed, there is nothing to warn about.

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

How reproducible:
Always.

Steps to Reproduce:
1. Remove vdsm
2. Install vdsm
3. Run vdsm-tool configure --force

Actual results:
Configuration succeeds with bogus warnings

Expected results:
Configuration succeeds without warnings

Comment 1 Nir Soffer 2014-06-15 13:34:38 UTC
Should be trivial fix.

Comment 2 Nir Soffer 2014-06-15 15:30:08 UTC
Issue does not exists in ovirt-3.4. Seems to be a regression introduced in http://gerrit.ovirt.org/#/c/27298/31/lib/vdsm/tool/configurator.py:

    """
    delete a file if it exists.
    """
    utils.rmFile(content['path'])

The code above does not do that docstring promise, but treat a missing file as a warning.

This was broken implemented correctly in version 20, and broken by version 21 of the patch:
http://gerrit.ovirt.org/#/c/27298/20..21/lib/vdsm/tool/configurator.py

Generally calling utils.rmFile(path) is a bug, unless the file *must* exists before the call.

Comment 3 Gil Klein 2014-08-13 07:21:32 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


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