Bug 1259007 - Fail to unpersist file if not using full path
Summary: Fail to unpersist file if not using full path
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-node
Version: 3.5.4
Hardware: x86_64
OS: Linux
high
high
Target Milestone: ovirt-3.6.0-rc3
: 3.6.0
Assignee: Fabian Deutsch
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 1263215
TreeView+ depends on / blocked
 
Reported: 2015-09-01 18:01 UTC by Meni Yakove
Modified: 2016-03-09 14:36 UTC (History)
6 users (show)

Fixed In Version: ovirt-node-3.3.0-0.10.20150928gite7ee3f1
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1263215 (view as bug list)
Environment:
Last Closed: 2016-03-09 14:36:21 UTC
oVirt Team: Node
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:0378 0 normal SHIPPED_LIVE ovirt-node bug fix and enhancement update for RHEV 3.6 2016-03-09 19:06:36 UTC
oVirt gerrit 45795 0 master MERGED fs: Use the abspath to check persistence Never
oVirt gerrit 46161 0 ovirt-3.6 MERGED fs: Use the abspath to check persistence Never
oVirt gerrit 46179 0 ovirt-3.5 MERGED fs: Use the abspath to check persistence Never

Description Meni Yakove 2015-09-01 18:01:05 UTC
Description of problem:
unpersist file fails if not using full file path


[root@puma26 tmp]# cd /etc/sysconfig/network-scripts/
[root@puma26 network-scripts]# touch test
[root@puma26 network-scripts]# persist test
Successfully persisted: test
[root@puma26 network-scripts]# unpersist test
File not explicitly persisted: test
[root@puma26 network-scripts]# unpersist /etc/sysconfig/network-scripts/test 
/etc/sysconfig/network-scripts/test successully unpersisted


Version-Release number of selected component (if applicable):
Red Hat Enterprise Virtualization Hypervisor release 7.1
Red Hat Enterprise Virtualization Hypervisor release 6.7 (20150828.0.el6ev)

How reproducible:
100%

Steps to Reproduce:
1. cd /etc/sysconfig/network-scripts/
2. touch test 
3. persist test
4. unpersist test



Additional info:
in /usr/sbin/unpersist
if not conf.exists(path) probeblly returs False when not using full path

from ovirt.node.utils import fs
conf = fs.Config()
conf.exists('/etc/sysconfig/network-scripts/test')
True
>>> conf.exists('network-scripts/test')
False

os.system('pwd')
/etc/sysconfig

os.path.isfile('network-scripts/test')
True

Comment 3 Huijuan Zhao 2015-10-10 05:25:50 UTC
Test version:
rhev-hypervisor7-7.2-20150928.0.iso
ovirt-node-3.3.0-0.10.20150928gite7ee3f1.el7ev.noarch

Test steps:
1. Clean install rhev-hypervisor7-7.2-20150928.0.iso
2. Press "F2" enter to shell
3. cd /etc/sysconfig/network-scripts/
4. touch test 
5. persist test
6. unpersist test
7. persist test
8. unpersist /etc/sysconfig/network-scripts/test

Test result:
After step5, Successfully persisted: test
After step6, test successully unpersisted
After step7, Successfully persisted: test
After step8, /etc/sysconfig/network-scripts/test successully unpersisted

This bug has been fixed, change the status to VERIFIED.

Comment 5 errata-xmlrpc 2016-03-09 14:36:21 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-0378.html


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