| Summary: | noSSLServerURL is not updated after rhel3/4 kickstarts from RHN Satellite v540 | ||
|---|---|---|---|
| Product: | Red Hat Satellite 5 | Reporter: | Paresh Mutha <pmutha> |
| Component: | Provisioning | Assignee: | Jan Pazdziora <jpazdziora> |
| Status: | CLOSED ERRATA | QA Contact: | Martin Minar <mminar> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 540 | CC: | cperry, fdewaley, jhutar, jpazdziora, mkoci, mminar, mzazrivec, prc |
| Target Milestone: | --- | Keywords: | Patch, Regression |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | spacewalk-java-1.2.39-58 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2011-06-17 02:29:59 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Bug Depends On: | 703064 | ||
| Bug Blocks: | 677501 | ||
Taking. The problem was introduced by the fix for bug 576211. Paresh,
my proposed patch would be:
--- a/java/code/src/com/redhat/rhn/manager/kickstart/KickstartFormatter.java
+++ b/java/code/src/com/redhat/rhn/manager/kickstart/KickstartFormatter.java
@@ -639,12 +639,12 @@ public class KickstartFormatter {
log.debug("adding perl -npe for /etc/sysconfig/rhn/up2date");
if (this.ksdata.isRhel2()) {
- retval.append("perl -npe 's|^(\\s*serverURL\\s*=\\s*[^:]+://)[^/]*/|${1}" +
+ retval.append("perl -npe 's|^(\\s*(noSSLS|s)erverURL\\s*=\\s*[^:]+://)[^/]*/|${1}" +
up2datehost +
"/|' -i /etc/sysconfig/rhn/rhn_register" + NEWLINE);
}
// both rhel 2 and rhel3/4 need the following
- retval.append("perl -npe 's|^(\\s*serverURL\\s*=\\s*[^:]+://)[^/]*/|\\${1}" +
+ retval.append("perl -npe 's|^(\\s*(noSSLS|s)erverURL\\s*=\\s*[^:]+://)[^/]*/|\\${1}" +
up2datehost +
"/|' -i /etc/sysconfig/rhn/up2date" + NEWLINE);
to avoid any more checks for RHEL veersions. Does it sound reasonable?
Patch from comment 5 committed to upstream, Spacewalk master, 3241e638f6f406ec6ebfb4e5b30d59a4bdc0a232, to give it some exposure. yes. It looks better than what I proposed and serves the purpose. thnx! Checkstyle fix in Spacewalk master, 34daa81f1bb843a72b18f4b897da4e2f71ae9248. Verified in stage w/ spacewalk-java-1.2.39-82 -> release pending. 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. https://rhn.redhat.com/errata/RHSA-2011-0879.html |
Description of problem: After kickstarting a system to rhel3/4 from RHN Satellite v540, in / etc/sysconfig/rhn/up2date noSSLServerURL points to xmlrpc.rhn.redhat.com instead of pointing to local satellite from which it was kickstarted Checking the kickstart files %post section we can see: For RHEL4 kickstart on satellite V5.2: perl-NPE 's/xmlrpc.rhn.redhat.com/rhnold1g.bserv1.local /'-i / etc/sysconfig/rhn/up2date For RHEL4 kickstart on satellite V5.4: perl-NPE 's | ^ (\ s * serverURL \ s *= \ s *[^:]+://)[^/]*/|${ rhnsat1g.bserv1.local 1} / |'-i / etc/sysconfig/rhn/up2date Version-Release number of selected component (if applicable): RHN Satellite v540 How reproducible: Always Steps to Reproduce: 1.Create a kickstart profile with base channel selected as RHEL4 2.Kickstart a system 3.Check noSSLServerURL in up2date file Actual results: noSSLServerURL=http://xmlrpc.rhn.redhat.com/XMLRPC Expected results: noSSLServerURL=http://satellite.fqdn/XMLRPC