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
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.
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