Bug 781651 - Embedded Yum doesn't work
Summary: Embedded Yum doesn't work
Keywords:
Status: NEW
Alias: None
Product: RHQ Project
Classification: Other
Component: Content
Version: 4.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Nobody
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-01-14 02:00 UTC by Elias Ross
Modified: 2022-03-31 04:28 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description Elias Ross 2012-01-14 02:00:45 UTC
Description of problem:

Cannot deploy RPM packages you upload yourself via embedded Yum.

You see this:

2012-01-14 00:11:39,590 ERROR [ResourceContainer.invoker.nonDaemon-3] (org.rhq.plugins.platform.LinuxPlatformComponent)- Install packages failed
java.lang.NullPointerException
        at org.rhq.plugins.platform.content.yum.YumProxy.execute(YumProxy.java:160)
        at org.rhq.plugins.platform.content.yum.YumProxy.install(YumProxy.java:95)
        at org.rhq.plugins.platform.LinuxPlatformComponent.deployPackages(LinuxPlatformComponent.java:181)

modules/plugins/platform/src/main/java/org/rhq/plugins/platform/content/yum/Primary.java

It appears that PackageVersionMetadataComposite.getMetadata() returns null, resulting in NPE:

    private String gunzip(byte[] input) {
^^^ 

In fact, when you upload your own RPM, metadata is null. And AFAIK, metadata is always null for discovered resources.

Version-Release number of selected component (if applicable):

RHQ 4.1. Code is same in 4.3


How reproducible:

Steps to Reproduce:
1. Upload RPM using Package File Upload
2. Add to content repository
3. Attempt to install
  
Actual results:

Error in agent log.
History tab shows "Completed Requests" and shows success.
Package not installed.
Full Package Audit Trail shows installed, but not installed according to yum on machine.

$ yum info jdk
Loaded plugins: security
http://localhost:9080/yum/repodata/repomd.xml: [Errno 7] HTTP Exception (BadStatusLine): 
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: rhq. Please verify its path and try again


Expected results:

Package installed.


Additional info:

Linux RedHat systems.


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