Bug 555212 - Satellite 5.3: Custom Kickstart Distros should allow variable substitution for http_server without breaking update of pkgs in %post
Summary: Satellite 5.3: Custom Kickstart Distros should allow variable substitution fo...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Server
Version: 530
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Justin Sherrill
QA Contact: Garik Khachikyan
URL:
Whiteboard:
Depends On:
Blocks: sat540-blockers
TreeView+ depends on / blocked
 
Reported: 2010-01-14 01:01 UTC by Xixi
Modified: 2018-10-27 15:09 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-10-28 14:55:06 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Xixi 2010-01-14 01:01:07 UTC
Description of problem:
In Satellite 5.3, user can still create custom kickstart distributions like in 5.2, however the Tree Path needs to be local to the satellite.  If user has an external kickstart tree location via http they need to set variables indicating server and path in the kickstart distro, and use --url in the kickstart profiles.  User is unable to use the existing http_server and media_path variables since that would make kickstart update the pkgs in %post from the remote location instead of from Satellite, which will fail.  Cobbler should use $redhat_management_server variable for the following step instead of $http_server -
wget -P /tmp/rhn_rpms/optional http://$http_server/download/package/7b86b444ab21fd3b237fd9c1a965baeae73a3c2e/0/3/19787/libxml2-python-2.6.26-2.1.2.8.x86_64.rpm http://$http_server/download/package/036d5749799616fb29ae889c393f1d49bbbe839d/0/3/5672/rhnlib-2.2.7-2.el5.noarch.rpm http://$http_server/download/package/8932277b32cac41e3a7c538e2956409c88622ed4/0/3/16519/pyOpenSSL-0.6-1.p24.7.2.2.x86_64.rpm

Version-Release number of selected component (if applicable):
Red Hat Network (RHN) Satellite 5.3.0

How reproducible:
Always.

Steps to Reproduce:
1. Have a server SERVER1 with a copy of a ks tree;
2. Have a 5.3.0 satellite with a custom ks distro, set Tree Path to some local ks tree path, and under Variables set http_server=SERVER1 and media_path=PATHTOKSTREE
3. Create kickstart profile using this distro
4. Try to kickstart a system with this distro

Actual results:
The %post script that downloads newer copies of things like pyOpenSsl won't work since that needs to be requested from the satellite, not SERVER1.

Expected results:
Updating http_server should not impact the %post script above.

Additional info:
Filing bug per discussion with Justin (thanks!).  Workaround is as follows:

1. Update the ks distros and first change Tree Path from the http://url to local ks tree on Satellite - e.g., /var/satellite/rhn/kickstart/rhel-x86_64-server-5-u3
2. Under "Variables" tab in the distro, add 2 variables - http_server2 and media_path2 - to specify the alternative server and path that they used to specify in the Tree Path. E.g.,
http_server2=SERVER1
media_path2=/pub/kickstart/dist/rhel-x86_64-server-5-u3
3. Now for all ks profiles using these distros, set url option in Advanced Options to "--url $http_server2$media_path2"
4. After saving the distros and ks profiles, wait a few minutes so taskomatic can sync the ks data with cobbler.

Comment 2 Justin Sherrill 2010-01-14 20:39:37 UTC
Fixed in spacewalk master:
dbd69f127b46abbfb4c631d8a02db2f5854b2251

Comment 5 Garik Khachikyan 2010-10-13 12:36:12 UTC
# VERIFIED 

the old behavior of having $http_server in the post script of replacing the "optional rpms" (described in comment#0) replaced with $redhat_management_server - so for newest package updates wget will look to the management server (and not http_server)

Scenario tried: define http_server=blablablah in Variables section of kickstart profile and look at kickstart profile file at: https://<sat>/rhn/kickstart/KickstartFileDownload.do?ksid=<ksID>
There is still the right package download location defined.

Checked on current sat540 iso: Satellite-5.4.0-RHEL5-re20101001.1

Comment 7 Clifford Perry 2010-10-28 14:50:20 UTC
The 5.4.0 RHN Satellite and RHN Proxy release has occurred. This issue has been resolved with this release. 


RHEA-2010:0801 - RHN Satellite Server 5.4.0 Upgrade
https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10332

RHEA-2010:0803 - RHN Tools enhancement update
https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10333

RHEA-2010:0802 - RHN Proxy Server 5.4.0 bug fix update
https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10334

RHEA-2010:0800 - RHN Satellite Server 5.4.0
https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10335

Docs are available:

http://docs.redhat.com/docs/en-US/Red_Hat_Network_Satellite/index.html 

Regards,
Clifford


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