Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 709956

Summary: tmp file not clear after registered to rhevm
Product: Red Hat Enterprise Linux 6 Reporter: Mohua Li <moli>
Component: sedAssignee: Vojtech Vitek <vvitek>
Status: CLOSED ERRATA QA Contact: qe-baseos-tools-bugs
Severity: low Docs Contact:
Priority: low    
Version: 6.1CC: abaron, bazulay, danken, gouyang, hripps, iheim, leiwang, mburns, moli, ovasik, ovirt-maint, pbonzini, pmuller, qwan, syeghiay, ycui
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 836611 (view as bug list) Environment:
Last Closed: 2012-06-20 14:47:47 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 836611    

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