RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 866300 - [python code] Persist function "ovirt_store_config" persisted the list files failed.
Summary: [python code] Persist function "ovirt_store_config" persisted the list files ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: ovirt-node
Version: 6.3
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Fabian Deutsch
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-15 04:30 UTC by haiyang,dong
Modified: 2013-02-28 16:40 UTC (History)
12 users (show)

Fixed In Version: ovirt-node-2.5.0-6.el6
Doc Type: Bug Fix
Doc Text:
Previously an indent level was missing for the ovirt_store_config function, so only the last filename was persisted. The logic for the ovirt_store_config function has been updated, and the indent level has been corrected so all required files are persisted.
Clone Of:
Environment:
Last Closed: 2013-02-28 16:40:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:0556 0 normal SHIPPED_LIVE ovirt-node bug fix and enhancement update 2013-02-28 21:29:06 UTC

Description haiyang,dong 2012-10-15 04:30:46 UTC
Description of problem:
Persist function "ovirt_store_config" persisted the list files failed.

Version-Release number of selected component (if applicable):
rhev-hypervisor6-6.3-20121012.0.el6_3

How reproducible:
100%

Steps to Reproduce:
[root@localhost data]# touch a
[root@localhost data]# touch b
[root@localhost data]# python
Python 2.6.6 (r266:84292, Aug 28 2012, 10:55:56)
[GCC 4.4.6 20120305 (Red Hat 4.4.6-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from ovirtnode.ovirtfunctions import *
>>> persisted_files_list = (["/data/a","/data/b"])
>>> print persisted_files_list
['/data/a', '/data/b']
>>> ovirt_store_config(persisted_files_list)
True
>>> exit()

tail -f ovirt.log
----------------
2012-10-15 02:58:15,719 - INFO - ovirtfunctions - Hardware virtualization detected
2012-10-15 03:00:04,163 - DEBUG - ovirtfunctions - mkdir -p /config//data
2012-10-15 03:00:04,163 - DEBUG - ovirtfunctions -
2012-10-15 03:00:04,179 - DEBUG - ovirtfunctions - cp -a /data/a /config/data/a
2012-10-15 03:00:04,179 - DEBUG - ovirtfunctions -
2012-10-15 03:00:04,200 - DEBUG - ovirtfunctions - mount -n --bind /config/data/a /data/a
2012-10-15 03:00:04,200 - DEBUG - ovirtfunctions -
2012-10-15 03:00:04,200 - INFO - ovirtfunctions - File: /data/a persisted
2012-10-15 03:00:04,205 - INFO - ovirtfunctions - Successfully persisted: /data/a

[root@localhost data]# cat /config/files |tail -5
/etc/sysconfig/network-scripts/ifcfg-breth0
/etc/ntp.conf
/etc/udev/rules.d/71-persistent-node-net.rules
/etc/ssh/sshd_config
/data/a

so that the "ovirt_store_config" didn't persist the file "/data/b"
it only persisted /data/a
Persist function "ovirt_store_config" persisted the list files failed.

Expected results:
Persist function "ovirt_store_config" persisted the list files successfully.

Additional info:
----------

Comment 4 Fabian Deutsch 2012-10-15 20:11:21 UTC
Tested as follows:
>>> from ovirtnode.ovirtfunctions import *
>>> ovirt_store_config("/tmp/a")   # /tmp/a does exist
True

True is okay,and message about successfully persisted


>>> ovirt_store_config(["/tmp/a", "/tmp/b"])   # /tmp/[a,b} do exist
True

True is okay,and messages about successfully persisted


>>> ovirt_store_config("/tmp/ab")   # /tmp/ab doesn't exist
True

True is returned (same behavior as before) and "Skipping, file ... does not exist" in /var/log/ovirt.log

http://gerrit.ovirt.org/#/c/8585/
http://gerrit.ovirt.org/#/c/8586/
http://gerrit.ovirt.org/#/c/8587/

Comment 6 haiyang,dong 2012-10-29 02:18:31 UTC
Test version:
rhev-hypervisor6-6.4-20121015.1.el6
ovirt-node-2.5.0-7.el6_4.noarch

Tried:
[root@localhost data]# touch a
[root@localhost data]# touch b
[root@localhost data]# python
Python 2.6.6 (r266:84292, Oct 12 2012, 14:23:48) 
[GCC 4.4.6 20120305 (Red Hat 4.4.6-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from ovirtnode.ovirtfunctions import *
>>> persisted_files_list = (["/data/a","/data/b"])
>>> print persisted_files_list
['/data/a', '/data/b']
>>> ovirt_store_config(persisted_files_list)
True
>>> exit()
[root@localhost data]# cat /config/files |tail -5
/etc/rhsm/rhsm.conf
/var/lib/rhsm/cache/installed_products.json
/var/lib/rhsm/facts/facts.json
/data/a
/data/b

tail -f ovirt.log
------------------------
2012-10-29 02:13:44,102 - DEBUG - ovirtfunctions - mkdir -p /config//data
2012-10-29 02:13:44,102 - DEBUG - ovirtfunctions - 
2012-10-29 02:13:44,108 - DEBUG - ovirtfunctions - cp -a /data/a /config/data/a
2012-10-29 02:13:44,109 - DEBUG - ovirtfunctions - 
2012-10-29 02:13:44,120 - DEBUG - ovirtfunctions - mount -n --bind /config/data/a /data/a
2012-10-29 02:13:44,121 - DEBUG - ovirtfunctions - 
2012-10-29 02:13:44,121 - INFO - ovirtfunctions - File: /data/a persisted
2012-10-29 02:13:44,129 - INFO - ovirtfunctions - Successfully persisted: /data/a
2012-10-29 02:13:44,136 - DEBUG - ovirtfunctions - mkdir -p /config//data
2012-10-29 02:13:44,136 - DEBUG - ovirtfunctions - 
2012-10-29 02:13:44,140 - DEBUG - ovirtfunctions - cp -a /data/b /config/data/b
2012-10-29 02:13:44,140 - DEBUG - ovirtfunctions - 
2012-10-29 02:13:44,143 - DEBUG - ovirtfunctions - mount -n --bind /config/data/b /data/b
2012-10-29 02:13:44,144 - DEBUG - ovirtfunctions - 
2012-10-29 02:13:44,144 - INFO - ovirtfunctions - File: /data/b persisted
2012-10-29 02:13:44,150 - INFO - ovirtfunctions - Successfully persisted: /data/b

Persist function "ovirt_store_config" can persist the list files successfully.

so this bug has been fixed

Comment 7 haiyang,dong 2012-12-26 08:49:11 UTC
so follow steps of comment 6 to re-test on version
rhev-hypervisor6-6.4-20121212.1.el6 , bug was fixed on it.

Comment 9 errata-xmlrpc 2013-02-28 16:40:26 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.

http://rhn.redhat.com/errata/RHBA-2013-0556.html


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