Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1029462 - Kickstart channels validation seems broken.
Summary: Kickstart channels validation seems broken.
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: WebUI
Version: 560
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
Assignee: Tomas Lestach
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: sat560-triage
TreeView+ depends on / blocked
 
Reported: 2013-11-12 12:37 UTC by Dimitar Yordanov
Modified: 2018-04-09 11:01 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-09 11:01:58 UTC


Attachments (Terms of Use)

Description Dimitar Yordanov 2013-11-12 12:37:28 UTC
Description of problem:
Kickstart channels validation seems broken.

Version-Release number of selected component (if applicable):
spacewalk-java-2.0.2-46

How reproducible:
100%

Steps to Reproduce:
1. Sync Base channel only with kickstart trees to RH Sattelite.
     Ex: satellite-sync -c rhel-i386-server-6 --no-errata --no-packages

2. Create a kickstart ks_test.
    Systems-> Kicktart -> Profiles -> Create new Kickstart 

The following message will be displayed.

"The following packages are not available in any of the channels associated to this kickstart profile: pyOpenSSL, rhnlib, libxml2-python, libxml2, spacewalk-koan*. In order for all kickstart functionality to work correctly, these packages should be present in at least one channel associated to this profile."

that states that  packages pyOpenSSL, rhnlib, libxml2-python, libxml2, spacewalk-koan are missing.


3. Sync the RHN-Tools channel. This way spacewalk-koan package will get to the Satellite.
  Ex: satellite-sync -c rhn-tools-rhel-i386-server-6 
  
4. Go to kickstart ks_test.
     Systems-> Kickstart -> Profiles -> List profiles -> ks_test

Actual results: 
 The message is no longer displayed even though packages "pyOpenSSL, rhnlib, libxml2-python, libxml2" are still missing.


Additional info:

 According to the source code, if packages "pyOpenSSL, rhnlib, libxml2-python, libxml2" are available currently is tested only for RHEL[4,3,2] kickstarts.

java/code/src/com/redhat/rhn/manager/kickstart/KickstartFormatter.java

    public static final String[] UPDATE_PKG_NAMES =
    {"pyOpenSSL", "rhnlib", "libxml2-python", "libxml2"};
    public static final String[] FRESH_PKG_NAMES_RHEL34 =
    {"up2date",  "up2date-gnome"};
    public static final String[] FRESH_PKG_NAMES_RHEL2 =
    {"rhn_register", "up2date", "rhn_register-gnome", "up2date-gnome"};


java/code/src/com/redhat/rhn/common/conf/ConfigDefaults.java
  public static final String DEFAULT_KICKSTART_PACKAGE_NAME = "spacewalk-koan";


java/code/src/com/redhat/rhn/frontend/action/kickstart/KickstartHelper.java
 
    private boolean hasUpdates(KickstartData ksdata) {
        if (ksdata.isRhel4() || ksdata.isRhel3() || ksdata.isRhel2()) {
            return hasPackages(ksdata.getChannel(), KickstartFormatter.UPDATE_PKG_NAMES);
        }
        return true;
    }


    public boolean verifyKickstartChannel(KickstartData ksdata, User user,
            boolean checkAutoKickstart) {
        if (ksdata.isRawData()) {
            //well this is Rawdata I am going to assume
            // its fine and dandy
            // In the future if we instead decide
            // that we need to do a channel
            // check on  a rawdata this is the place to fix that
            return true;
        }
        //I tried to make this readable while still maintaining all the boolean
        //shortcutting. Here is the one liner boolean:
        if (hasUpdates(ksdata) && hasFresh(ksdata) &&
                (!checkAutoKickstart || hasKickstartPackage(ksdata, user))) {
            return true;
        }
        return false;
    }

Comment 1 Tomas Lestach 2018-04-09 11:01:58 UTC
We have re-reviewed this bug, as part of an ongoing effort to improve Satellite/Proxy feature and bug updates, review and backlog.

This is a low priority bug and has no currently open customer cases. While this bug may still valid, we do not see it being implemented prior to the EOL of the Satellite 5.x product. As such, this is being CLOSED DEFERRED. 

Closing now to help set customer expectations as early as possible. You are welcome to re-open this bug if needed.


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