Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 236034 - Config files that use custom info macro includes add "^M" to deployed files
Summary: Config files that use custom info macro includes add "^M" to deployed files
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Server
Version: 420
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Jan Pazdziora
QA Contact: Preethi Thomas
Depends On:
TreeView+ depends on / blocked
Reported: 2007-04-11 16:35 UTC by K. Reid Wightman
Modified: 2018-10-19 23:32 UTC (History)
1 user (show)

Fixed In Version: sat510
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2008-04-03 00:22:50 UTC
Target Upstream Version:

Attachments (Terms of Use)

Description K. Reid Wightman 2007-04-11 16:35:13 UTC
Description of problem:
Multi-line custom info keys, if included in a configuration file, deploy with
"^M" character at the end of each line

Version-Release number of selected component (if applicable):
4.21 (I have been seeing this problem for a long time, though, at least as far
back as 4.10)

How reproducible:

Steps to Reproduce:
1) Create a configuration channel
2) Add a file to the channel (like "/etc/ctrlmtestfile")
3) Add the contents to the file:
:file start:
# This is the /etc/ctrlmtestfile
{@ rhn.system.custom_info(ctrlmtestkey) @}
:file end:
4) Select a test system, and add a ctrlmtestkey to the system.  Make the
contents of the key:
:key start:
testkey line 1
testkey line 2
testkey line 3
:key end:
5) subscribe the system to the ctrlmtest channel
6) deploy the file on the client (test system) with rhncfg-client get
Actual results:
open the file in vi, and note that it looks like this:
:file start:
# This is the /etc/ctrlmtestfile
testkey line 1^M
testkey line 2^M
testkey line 3
:file end:

Expected results:
:file start:
# This is the /etc/ctrlmtestfile
testkey line 1
testkey line 2
testkey line 3
:file end:

Additional info:
This is similar to the bug in # 198670 ( ), but is still
happening today.  Probably has existed in satellite for a while?  May exist in
other places (assuming code in different places is using different procedures to
get data out of the RHN DB).

Comment 3 K. Reid Wightman 2007-06-26 18:56:57 UTC
I heard a rumor that this would be fixed in release 5.0.  Has it?

Comment 4 Jan Pazdziora 2007-10-24 14:48:42 UTC
Reassigning to myself.

Comment 5 Jan Pazdziora 2007-10-24 14:56:18 UTC
(In reply to comment #3)
> I heard a rumor that this would be fixed in release 5.0.  Has it?

No, it was not. But we now have commitment of the product management to have
this fixed for the 5.1 release.

However, the way I plan to tackle this is to strip the CR (^M) on input on
server side, not on the client. Otherwise we might be messing up the content of
binary files, for example, or files when the user wants the CR for some reason.

Comment 7 Jan Pazdziora 2007-10-30 09:48:10 UTC
Let's see what QA thinks about:

QA Push for Vega Complete!

Satellite 5.1.0-21 and Proxy 5.1.0-14 Content now available on webqa

Satellite 5.1.0-21 ISOs are now available as
rhn-satellite-5.1.0-21-redhat-linux-as-* @:

Comment 8 Preethi Thomas 2007-11-05 18:25:27 UTC
Could you please put in a testplan for this. I don't totally understand the
steps. Specially step #4.

Comment 9 Jan Pazdziora 2007-11-06 13:49:37 UTC
Click Systems -> Custom System Info. Click create new key. Put in Key Label
ctrlmtestkey, put in Description. Hit the Create Key.

Select your test system, click Details CustomInfo, click create new value, click
 ctrlmtestkey, put in Value with multiline content. Make sure you use a browser
which is known to add that CR to multiline textarea values. Hit Update Key.

Comment 12 Jan Pazdziora 2007-11-10 10:39:18 UTC
Moving ON_QA, prompted by:

Satellite 5.1.0-24 and Proxy 5.1.0-15 Content now available on webqa

Satellite 5.1.0-24 ISOs are now available as
rhn-satellite-5.1.0-24-redhat-linux-as-* @:

Comment 13 Preethi Thomas 2007-12-05 15:08:55 UTC

Comment 14 Brandon Perkins 2008-04-03 00:22:50 UTC
5.1 Sat GA so Closed for Current Release.

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