Bug 986335 - libxml2 needed by libxml2-python dependency errors in ks post
Summary: libxml2 needed by libxml2-python dependency errors in ks post
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Server
Version: 1.9
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Stephen Herr
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On: 787718
Blocks: space21
TreeView+ depends on / blocked
 
Reported: 2013-07-19 12:51 UTC by Stephen Herr
Modified: 2014-04-24 08:56 UTC (History)
8 users (show)

Fixed In Version: spacewalk-java-2.1.2-1
Clone Of: 787718
Environment:
Last Closed: 2014-03-04 13:07:46 UTC
Embargoed:


Attachments (Terms of Use)

Description Stephen Herr 2013-07-19 12:51:25 UTC
+++ This bug was initially created as a clone of Bug #787718 +++

Description of problem:

The following error occurs in ks post when kickstarting clients from Satellite:

error: Failed dependencies:
	libxml2 = 2.7.6-4.el6_2.1 is needed by libxml2-python-2.7.6-4.el6_2.1.x86_64

The client still gets registered to the Satellite though. This appears to be caused by the Satellite adding code to download pyOpenSSL, rhnlib, and libxml2-python in the ks post section every time a ks file is created or edited in the Sat webUI, but not libxml2. It looks like the version of libxml2-python and libxml2 are different in the ks tree versus the base channel.

Steps to Reproduce:
1. Create ks profile in Sat webUI
2. Kickstart client from Sat
  
Actual results:

Dependency errors in ks post file, even though the package ultimately are installed and the client is registered to Sat.

Expected results:

No dependency error message.

Additional info:

Seems like if libxml2 was added in as well in the code that adds pyOpenSSL, rhnlib, and libxml2-python to the ks post that this might not occur.

--- Additional comment from Alex Dellapenta on 2012-02-06 11:34:16 EST ---

Better "Steps to Reproduce":

1. Create ks profile using RHEL6 x86_64 channel (observed in both 6u1 and 6u2 ks trees so far).
2. Kickstart client using new profile.
3. After ks finishes, check /root/ks-rhn-post.log. After the logs about rhnlib, pyOpenSSL, and libxml2-python packages successfully downloading, observe:

error: Failed dependencies:
        libxml2 = 2.7.6-4.el6_2.1 is needed by libxml2-python-2.7.6-4.el6_2.1.x86_64

The libxml2 are libxml2-python packages are still installed, however:

[root@dhcp-66-76 ~]# rpm -qa | grep libxml2
libxml2-2.7.6-4.el6.x86_64
libxml2-python-2.7.6-4.el6.x86_64

Also tried adding rhnlib, pyOpenSSL, libxml2-python, and libxml2 to the @packages section to try to avoid this issue, but dependency error still occurs in %post.

--- Additional comment from Calvin Locklear on 2012-09-13 16:16:49 EDT ---

Hello,

Customer in tkt 702776 is reporting that when this happens, packages from some of their activation keys are not getting installed.  I will upload the kickstart to the ticket.

Calvin Locklear

--- Additional comment from Miguel Perez Colino on 2013-05-16 05:57:47 EDT ---

I've hit the same issue working with 6u1 ... the available "libxml2" version in the installer is 2.7.6-1 (RHN Satellite 5.5.0)

The package "libxml2-python-2.7.6-12.el6_4.1.x86_64.rpm" is the one included in the kickstart file to be installed to perform the rhn related tasks. This one has the following dependency: "libxml2 = 2.7.6-12.el6_4.1"

I found out that the version numbers of the "libxml2-python" packages, as well as the "pyOpenSSL" and "rhnlib", to be installed are defined in the "java/code/src/com/redhat/rhn/manager/kickstart/KickstartFormatter.java" file by the following parts:

[...]
public static final String[] UPDATE_PKG_NAMES =
{"pyOpenSSL", "rhnlib", "libxml2-python"};
[...]
for (int i = 0; i < UPDATE_PKG_NAMES.length; i++) {
            Long packageId = ChannelManager.getLatestPackageEqualInTree(c.getId(),
                    UPDATE_PKG_NAMES[i]);
            if (packageId == null) {
                log.debug("package:" + packageId + "not found in kickstart's channel");
                continue;
            }
[...]

I think of two ways to solve this:
a) include libxml2 in the "UPDATE_PKG_NAMES" 
b) make "ChannelManager.getLatestPackageEqualInTree" search in the appropriate kickstartable tree

Comment 1 Stephen Herr 2013-07-19 12:59:05 UTC
Accepting the suggestion to add libxml2 explicitly to the list of required rpms. Committed to spacewalk master: 49021dffd9d583bde743c6e82cf78567b7ff654e

Note to make it more explicit, this is *just* an error in the logs, there are no ill effects from this bug.

Comment 2 Matej Kollar 2014-01-17 12:15:25 UTC
Switching MODIFIED Spacewalk bugs to ON_QA before 2.1 release.

Comment 3 Matej Kollar 2014-03-04 13:07:46 UTC
Spacewalk 2.1 has been released.
https://fedorahosted.org/spacewalk/wiki/ReleaseNotes21

Comment 4 Matej Kollar 2014-03-04 13:08:55 UTC
Spacewalk 2.1 has been released.
https://fedorahosted.org/spacewalk/wiki/ReleaseNotes21


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