Description of problem: Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. Create/sync/associate Content Provider, Repo, etc. 2. Associate platform with above. 3. in $Platform > Inventory > Connection, enable internal yum server; Look in /etc/yum.repos.d to assure rhq.repo has been created and that the data there matches the info $Platform > Inventory > Connectio 4. `yum list` Actual results: [root@core-01 yum.repos.d]# yum list Loaded plugins: refresh-packagekit 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 [root@core-01 yum.repos.d]# telnet localhost:9080 Expected results: Repo metadata should be getting populated but doesn't seem to be. Additional info: Note the port is open: [root@core-01 yum.repos.d]# telnet localhost 9080 Trying ::1... telnet: connect to address ::1: Connection refused Trying 127.0.0.1... Connected to localhost. Escape character is '^]'.
Looking at the agent logs, this is the exception I'm seeing. 2009-11-17 14:21:01,047 INFO [yum:9080] (plugins.platform.content.yum.Request)- processing: /yum/repodata/repomd.xml 2009-11-17 14:21:01,060 INFO [yum:9080] (plugins.platform.content.yum.PrimaryMD5)- primary.md5 updated: e29578a1c93f76eb524054b543d17203 2009-11-17 14:21:01,088 ERROR [yum:9080] (plugins.platform.content.yum.Request)- request failed: java.lang.NullPointerException at java.lang.String.<init>(String.java:601) at org.rhq.plugins.platform.content.yum.Primary.gunzip(Primary.java:265) at org.rhq.plugins.platform.content.yum.Primary.create(Primary.java:220) at org.rhq.plugins.platform.content.yum.Primary.file(Primary.java:139) at org.rhq.plugins.platform.content.yum.Repomd.create(Repomd.java:150) at org.rhq.plugins.platform.content.yum.Repomd.file(Repomd.java:118) at org.rhq.plugins.platform.content.yum.Repomd.length(Repomd.java:90) at org.rhq.plugins.platform.content.yum.Repomd.writeHeader(Repomd.java:71) at org.rhq.plugins.platform.content.yum.Request.reply(Request.java:187) at org.rhq.plugins.platform.content.yum.Request.process(Request.java:122) at org.rhq.plugins.platform.content.yum.YumServer.listen(YumServer.java:165) at org.rhq.plugins.platform.content.yum.YumServer.access$200(YumServer.java:45) at org.rhq.plugins.platform.content.yum.YumServer$1.run(YumServer.java:148)
First problem identified was that we were not saving the 'metadata' to the DB. For 'metadata' I'm talking about a GZipped XML String representing a <package> element which primary.xml (yum) uses. RHQ will look in the DB and grab a 'metadata' value for each package, it then throws them together to create the primary.xml. We addressed a change to the RHN plugin to translate it's data to the <package> blob and pass it gzipped into the DTO object. The data is now being persisted in the database, but it looks like more work is required. When doing a yum repolist, I see "0" packages. The initial problem "yum list" returning an error has been fixed, but the process as a whole needs more work. The 2 commits done to address the metadata with RHN Plugin are here: commit 4b618e36d53ef97c8710243ba0868312e4da71c0 Author: John Matthews <jmatthew> Date: Tue Nov 17 21:11:17 2009 -0500 Allows RHN plugin to save 'metadata' needed by RHQ Yum operations commit 4051ded4547cf520f08f8866c085cfce6b186b1d Author: John Matthews <jmatthew> Date: Tue Nov 17 20:51:59 2009 -0500 Adding 'metadata' to package store in RHQ. RHQ requires us to form a Package element from a primary.xml for each package We then need to ensure this xml string is gzipped and passed into the DTO so it will be preserved and later used to reconstruct a primary.xml to give to yum
This is now working with latest git pull from the "content" branch.
QA Verified.
Mass-closure of verified bugs against JON.