Bug 781651

Summary: Embedded Yum doesn't work
Product: [Other] RHQ Project Reporter: Elias Ross <genman>
Component: ContentAssignee: RHQ Project Maintainer <rhq-maint>
Status: NEW --- QA Contact: Mike Foley <mfoley>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.3CC: hrupp
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Elias Ross 2012-01-13 21:00:45 EST
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
        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)


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.