Bug 709956 - tmp file not clear after registered to rhevm
Summary: tmp file not clear after registered to rhevm
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: sed
Version: 6.1
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Vojtech Vitek
QA Contact: qe-baseos-tools-bugs
URL:
Whiteboard:
Depends On:
Blocks: 836611
TreeView+ depends on / blocked
 
Reported: 2011-06-02 05:41 UTC by Mohua Li
Modified: 2015-03-04 23:57 UTC (History)
16 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 836611 (view as bug list)
Environment:
Last Closed: 2012-06-20 14:47:47 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0955 0 normal SHIPPED_LIVE sed bug fix update 2012-06-19 21:12:20 UTC

Description Mohua Li 2011-06-02 05:41:30 UTC
Description of problem:

after registered to rhevm, we got several sed* file in /etc/vdsm-reg, which is the same as vdsm-reg.conf, 

[root@amd-1216-8-5 vdsm-reg]# ls -lrt

total 22

-rw-r--r--. 1 root root 891 2009-10-21 08:09 logger.conf

-rw-r--r--. 1 root root 741 2011-05-31 07:23 vdsm-reg.conf

-rw-r--r--. 1 root root 741 2011-05-31 07:23 sedesQvOi

-rw-r--r--. 1 root root 741 2011-05-31 07:23 sedhJOyum

-rw-r--r--. 1 root root 741 2011-05-31 07:23 sedbpmp3n

-rw-r--r--. 1 root root 741 2011-05-31 07:23 sed3bkT0m

[root@amd-1216-8-5 vdsm-reg]# cat sedesQvOi

[vars]

# time to wait (in seconds) for the next registration request when registration fails

reg_req_interval = 5

#The location of the vdsm conf file

vdsm_conf_file=/etc/vdsm/vdsm.conf

#The location of the pid file

pidfile=/var/run/vdsm-reg.pid

#The logger conf file

logger_conf=/etc/vdsm-reg/logger.conf

#The hostname of the vdc, should be verified each boot (look for DNS SRV record)

vdc_host_name=10.66.72.87

#The port of the RHEV Manager. Allows http or https connections.

vdc_host_port=443

#The ssh file uri

vdc_authkeys_path=/rhevm.ssh.key.txt

#The registrtion uri

vdc_reg_uri=/RHEVManagerWeb/VdsAutoRegistration.aspx

#Upgrade settings

upgrade_iso_file=/data/updates/ovirt-node-image.iso

upgrade_mount_point=/var/run/vdsm/image-update


[root@amd-1216-8-5 vdsm-reg]# diff vdsm-reg.conf  sedesQvOi 
none 

Version-Release number of selected component (if applicable):
6.1-20110510.1

How reproducible:
always

Steps to Reproduce:
1,registered to rhevm,
2,check /etc/vdsm-reg/

Actual results:


Expected results:
clear such tmp files

Additional info:
as i'm not sure this is generate by ovirt-node or vdsm-reg, so pls feel free to change to vdsm-reg if you could sure it's the right component,

Comment 2 Mike Burns 2011-06-02 14:56:24 UTC
Moving to vdsm component

vdsm in that build was vdsm-4.9-63.el6

Comment 4 Dan Kenigsberg 2011-06-03 07:07:51 UTC
Mike, I can guess that it's a by product of our usage of

sed -i --copy

but do you have a clue why they are not removed?

Comment 5 Yotam Oron 2011-06-15 15:16:34 UTC
I tried to reproduce this bug but couldn't with latest vdsm.
No sed* files in /etc/vdsm-reg/.

Do they persist after reboot ? 
Can you please post the exact reproduction scenario

Comment 7 Yotam Oron 2011-06-20 12:29:01 UTC
This is a sed bug. sed is leaving the temporary files it used for its operations.
sed should either delete those files or provide some API for the caller to do so.

Comment 9 Vojtech Vitek 2011-11-01 16:59:04 UTC
When using `--copy' option, the sed makes copy of the original file to a backup file. The file name is random string, if not specified by -i<SUFFIX>.

The backup file should be probably deleted after the successful operation. I'll discuss the behaviour with upstream.

--

Possible workaround:
$ sed -i.backup --copy ".." FILE && rm FILE.backup

Comment 10 Paolo Bonzini 2011-11-02 09:09:43 UTC
Yes, this is a bug, and the workaround is not working either.

--copy is not upstream, so the fix is RHEL (and Fedora) only.

Comment 17 errata-xmlrpc 2012-06-20 14:47:47 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-2012-0955.html


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