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

Bug 1109569

Summary: Bogus warning when running vdsm-tool conifgure
Product: [Retired] oVirt Reporter: Nir Soffer <nsoffer>
Component: vdsmAssignee: Mooli Tayer <mtayer>
Status: CLOSED CURRENTRELEASE QA Contact: Gil Klein <gklein>
Severity: low Docs Contact:
Priority: low    
Version: 3.5CC: acathrow, bazulay, gklein, iheim, mgoldboi, pstehlik, yeylon
Target Milestone: ---Keywords: Regression, Triaged
Target Release: 3.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: infra
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-13 07:21:32 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 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