Bug 236034 - Config files that use custom info macro includes add "^M" to deployed files
Config files that use custom info macro includes add "^M" to deployed files
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Server (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jan Pazdziora
Preethi Thomas
Depends On:
Blocks: 248627
  Show dependency treegraph
Reported: 2007-04-11 12:35 EDT by K. Reid Wightman
Modified: 2010-10-22 10:19 EDT (History)
1 user (show)

See Also:
Fixed In Version: sat510
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-04-02 20:22:50 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description K. Reid Wightman 2007-04-11 12:35:13 EDT
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 (
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=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 14:56:57 EDT
I heard a rumor that this would be fixed in release 5.0.  Has it?
Comment 4 Jan Pazdziora 2007-10-24 10:48:42 EDT
Reassigning to myself.
Comment 5 Jan Pazdziora 2007-10-24 10:56:18 EDT
(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 05:48:10 EDT
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 13:25:27 EST
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 08:49:37 EST
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 05:39:18 EST
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 10:08:55 EST
Comment 14 Brandon Perkins 2008-04-02 20:22:50 EDT
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.