Project

General

Profile

Actions

Bug #2527

closed

Windows newlines not stripped from disk templates with hostgroup template rendering

Added by Chris Barbour over 11 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Unattended installations
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

When using hostgroup based template rendering, Windows style newlines are not correctly stripped out of partition table layouts. This issue does not appear to affect standard host based rendering, with or without spoofing.

Foreman version: 1.1
Foreman Host OS: SL6.2

Steps to reproduce:
- Create a test dynamic partitioning layout using the foreman WebUI
- Create a test provisioning template, using the above dynamic layout
- Assign the template and disk layout to a test hostgroup.
- Download the layout using hostgroup based template rendering. E.g.

http://foreman.example.com/unattended/template/AAA_test/test

Result: Windows newlines mixed into output. See attached example of good and bad output.

The results seem most obvious editing the file with vi. A simple cat will not show the extra control characters.

Discussing this with Ohad:

[05:04] <ohadlevy> cbarbour: code say that we always strip \r from the disk layout string
[05:04] <ohadlevy> cbarbour: how are you calling your disk layout in kickstart?
[05:04] <ohadlevy> cbarbour: @host.diskLayout
[05:04] <ohadlevy> cbarbour: i'm guessing you are simply doing @host.disk ?
[05:04] <ohadlevy> cbarbour: we strip it out when we fetch the data, not on insert afair
[05:04] <cbarbour> That's how I'm calling it.
[05:05] <cbarbour> The only weird thing I'm doing is using hostgroup based rendering.
[05:26] <cbarbour> To be clear... I'm calling the layout with @host.diskLayout.
[05:27] <cbarbour> Problem only appears when using hostgroup template rendering. Everything looks normal otherwise.


Files

host-spoof_dynamic_ptable.txt host-spoof_dynamic_ptable.txt 441 Bytes Output of host assigned template demonstrating normal result, same config. Chris Barbour, 05/21/2013 08:34 AM
hostgroup_ptable.patch hostgroup_ptable.patch 254 Bytes Fix for issue 2527 Chris Barbour, 05/21/2013 07:32 PM

Related issues 1 (0 open1 closed)

Related to Foreman - Bug #2538: Hostgroup provisioning should fall back to root_pass settingClosedJoseph Magen05/21/2013Actions
Actions #1

Updated by Chris Barbour over 11 years ago

Attached is a patch for the issue. The problem was very simple.

Actions #2

Updated by Ohad Levy over 11 years ago

  • Category set to Unattended installations
  • Status changed from New to Closed
  • Assignee set to Joseph Magen

sadly we missed this patch, and was fixed as part of d56112f

thanks Chris

Actions

Also available in: Atom PDF