Bug 650273

Summary: After upgrade from sat530 to sat540, ks files are crippled
Product: Red Hat Satellite 5 Reporter: Miroslav Suchý <msuchy>
Component: UpgradesAssignee: Milan Zázrivec <mzazrivec>
Status: CLOSED ERRATA QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: urgent Docs Contact:
Priority: high    
Version: 540CC: cperry, jsherril, psklenar, slukasik
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rhn-upgrade-5.4.0.12-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-12-13 14:31:18 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: 646488    

Description Miroslav Suchý 2010-11-05 16:24:26 UTC
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">
    <title>Error</title>
    <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" />
    <![endif]-->
  <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 16:25:15 UTC
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 16:44:57 UTC
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 17:20:05 UTC
Hey Mirek,

That command during upgrade:

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


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.

-Justin

Comment 4 Milan Zázrivec 2010-12-01 12:52:30 UTC
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 08:59:01 UTC
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.
--
passed

Comment 7 errata-xmlrpc 2010-12-13 14:31:18 UTC
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.

http://rhn.redhat.com/errata/RHBA-2010-0973.html