Bug 650273 - After upgrade from sat530 to sat540, ks files are crippled
After upgrade from sat530 to sat540, ks files are crippled
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Upgrades (Show other bugs)
Unspecified Unspecified
high Severity urgent
: ---
: ---
Assigned To: Milan Zázrivec
Red Hat Satellite QA List
Depends On:
Blocks: sat54-errata
  Show dependency treegraph
Reported: 2010-11-05 12:24 EDT by Miroslav Suchý
Modified: 2010-12-13 09:31 EST (History)
4 users (show)

See Also:
Fixed In Version: rhn-upgrade-
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-12-13 09:31:18 EST
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 Miroslav Suchý 2010-11-05 12:24:26 EDT
Description of problem:
I upgraded sat530 to sat540 and when I try to open KS file I see source of HTML with ISE (see bottom).

And yes I did, the step during upgrade:
11. Remove Satellite cache and kickstart files:

Run as root:

    rm -fr /var/cache/rhn/*
    [ -d /var/lib/rhn/kickstarts/wizard ] && rm -f /var/lib/rhn/kickstarts/wizard/*

But there is no commonet before this step to stop satellite. So it may happend that those file was regenerated before I stopped satellite before upgrade.

So reproducer may be:
1. lets have sat530 with at least one ks record
2. after step 11 of preparation.txt, do make some cofee 
3. continue in upgrade

# *** ERROR ***
# There is a templating error preventing this file from rendering correctly. 
# This is most likely not due to a bug in Cobbler and is something you can fix.
# Look at the message below to see what things are causing problems.  
# (1) Does the template file reference a $variable that is not defined?
# (2) is there a formatting error in a Cheetah directive?
# (3) Should dollar signs ($) be escaped that are not being escaped?
# Try fixing the problem and then investigate to see if this message goes
# away or changes.
# ErrorCatcher instance has no attribute 'listErrors'
#   File "/usr/lib/python2.4/site-packages/cobbler/templar.py", line 127, in render
#     self.last_errors = t.errorCatcher().listErrors()
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml" lang="en"><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <link rel="shortcut icon" href="/img/favicon.ico">
    <link rel="stylesheet" href="/css/rhn-base.css" type="text/css">
    <!--[if IE]>
	<link rel="stylesheet" type="text/css" href="/css/rhn-iecompat.css" />
  <script src="/javascript/prototype-1.js"></script>

  </head><body><div class="wrap" id="top-wrap">

<div id="utility">
Comment 1 Miroslav Suchý 2010-11-05 12:25:15 EDT
I verified that this problem has only KS files created before upgrade.
Every KS made after upgrade do not have this problem.
Comment 2 Miroslav Suchý 2010-11-05 12:44:57 EDT
I tried to do delete those ks (i.e. after the upgrade:
rm -f /var/lib/rhn/kickstarts/wizard/*

after some time they have been created again, but now satellite write:
# kickstart is missing or invalid: /var/lib/rhn/kickstarts/wizard/rhel-i386-server-5-u4--1.cfg
Comment 3 Justin Sherrill 2010-11-05 13:20:05 EDT
Hey Mirek,

That command during upgrade:

    rm -fr /var/cache/rhn/*
    [ -d /var/lib/rhn/kickstarts/wizard ] && rm -f

should be run after the satellite is shutdown.  I'm guessing it was regenerated prior to the upgrade as you said.  So maybe we have an upgrade bug here?

As for why it wasn't regenerating that file after deletion, i restarted taskomatic and regenerated it right away. I'm not sure why taskomatic wouldn't do it without a restart, but it seems to be working now.

Comment 4 Milan Zázrivec 2010-12-01 07:52:30 EST
satellite.git SATELLITE-5.4: a9fe96b8303a12c5b12314bd649bef9ec1e9610b

The cache and kickstart deletion instructions were moved to
satellite-upgrade.txt right before the ./install.pl --upgrade step.

There's no need to mention cache & kickstart deletion in
satellite-and-os-upgrade.txt document, since in that scenario
we have no previous cache & kickstart files to start with.
Comment 6 Petr Sklenar 2010-12-08 03:59:01 EST
deleting cache and ks were moved to satellite-upgrade.txt

1. sat530: I had some ks file and tried to provision some machine:

ll /var/lib/rhn/kickstarts/wizard/
total 32
-rw-r--r-- 1 tomcat tomcat 9687 Dec  7 04:54 ks-psklenar--1.cfg
-rw-r--r-- 1 tomcat tomcat 9719 Dec  7 07:19 test-psklenar--1.cfg

2. upgrade sat530 > sat540

3. ks is still in place and it is not crippled and I can use it to provision machine.
Comment 7 errata-xmlrpc 2010-12-13 09:31:18 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


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