liedekef / spacewalk_scripts

Several spacewalk scripts
52 stars 25 forks source link

Xen4CentOS Causing Errors When Parsing Errata #5

Closed ghost closed 11 years ago

ghost commented 11 years ago

A couple of months ago CentOS started including "Xen4CentOS" in their mailing lists. Since then, I've been getting errors in my ya-errata-import.pl log file.

Here's the output from STDERR related to the issue:

DEBUG: Called as /usr/local/bin/ya-errata-import.pl --server 127.0.0.1 --channel centos6-x86_64-contrib --os-version 6 --erratadir /tmp/centos-errata --publish --rhsa-oval /tmp/com.redhat.rhsa-all.xml --get-from-rhn --debug
Argument "CESA-2013:X007 Moderate Xen4CentOS kernel Security Updat..." isn't numeric in numeric ne (!=) at /usr/local/bin/ya-errata-import.pl line 404.

Is this an actual bug/issue or am I doing something wrong? I was using the previous 20130630 release (where you fixed another issue I had found) when this started happening. I recently upgraded to release 20130818 and am having the same issue (though I expected such as the release notes in the header made no mention of this issue).

liedekef commented 11 years ago

It's because they don't include any OS release number in those titles, so I can't know what OS release to use it for. For now Xen errata are not imported, so you can ignore the warning. I'll try to work around this ...

liedekef commented 11 years ago

Try if the current git version (script version: 20130905) does it for you.

ghost commented 11 years ago

Sorry for not responding sooner. I've grabbed the version from 20130905 and got sidetracked before I could run it interactively. I've not changed any of the other scripts calling ya-errata-import.pl or anything else with the system. That being said, I saw the following this morning in my email (only the stuff from STDERR is emailed to me):

DEBUG: Called as /usr/local/bin/ya-errata-import.pl --server 127.0.0.1 --channel centos6-x86_64-contrib --os-version 6 --erratadir /tmp/centos-errata --publish --rhsa-oval /tmp/com.redhat.rhsa-all.xml --get-from-rhn --debug
Fault returned from XML RPC Server, fault code -208: The errata RHBA-2013:X008 cannot be found.
DEBUG: Called as /usr/local/bin/ya-errata-import.pl --server 127.0.0.1 --channel centos6-x86_64-extras --os-version 6 --erratadir /tmp/centos-errata --publish --rhsa-oval /tmp/com.redhat.rhsa-all.xml --get-from-rhn --debug
Fault returned from XML RPC Server, fault code -208: The errata RHBA-2013:X008 cannot be found.
DEBUG: Called as /usr/local/bin/ya-errata-import.pl --server 127.0.0.1 --channel centos6-x86_64-fasttrack --os-version 6 --erratadir /tmp/centos-errata --publish --rhsa-oval /tmp/com.redhat.rhsa-all.xml --get-from-rhn --debug
Fault returned from XML RPC Server, fault code -208: The errata RHBA-2013:X008 cannot be found.
DEBUG: Called as /usr/local/bin/ya-errata-import.pl --server 127.0.0.1 --channel centos6-x86_64-plus --os-version 6 --erratadir /tmp/centos-errata --publish --rhsa-oval /tmp/com.redhat.rhsa-all.xml --get-from-rhn --debug
DEBUG: Called as /usr/local/bin/ya-errata-import.pl --server 127.0.0.1 --channel centos6-x86_64-updates --os-version 6 --erratadir /tmp/centos-errata --publish --rhsa-oval /tmp/com.redhat.rhsa-all.xml --get-from-rhn --debug
Fault returned from XML RPC Server, fault code -208: The errata RHBA-2013:X008 cannot be found.

Unsure if the newest code release broke it but it seems logical given that the errata appears to be "CEBA-2013:X008 Xen4CentOS kernel Update" from 2013/08/27 (see http://lists.centos.org/pipermail/centos-announce/2013-August/019912.html).

Also, I'm using my Red Hat subscription to pull in the additional information Red Hat's servers. Not sure if when you tested the fix rather you were or not.

liedekef commented 11 years ago

In the past Xen updates were not included. They are now, but it seems the centos errata number differs from the redhat ones here (redhat probably doesn't have xen errata), causing that error. Let me see what can be done :-)

liedekef commented 11 years ago

Ok, the Xen parsing was not working. Apparently they use a different format for Xen errata and regular centos errata. Sigh ... Anyway, it should work now, try the new git version.

ghost commented 11 years ago

Alright, I pulled down the latest version of the script and was able to run it and review the log. It appears to skip over the Xen4CentOS stuff now as expected:

INFO: Processing CESA-2013:X007 (Moderate Xen4CentOS kernel Security Update)
DEBUG: Good, errata CESA-2013:X007:C6-64 does not yet exist in channel centos6-x86_64-updates
DEBUG: Package: e1000e-2.4.14-3.4.59.1.el6.centos.alt.x86_64.rpm not found
DEBUG: Package: kernel-3.4.59-8.el6.centos.alt.x86_64.rpm not found
DEBUG: Package: kernel-devel-3.4.59-8.el6.centos.alt.x86_64.rpm not found
DEBUG: Package: kernel-doc-3.4.59-8.el6.centos.alt.noarch.rpm not found
DEBUG: Package: kernel-firmware-3.4.59-8.el6.centos.alt.noarch.rpm not found
DEBUG: Package: kernel-headers-3.4.59-8.el6.centos.alt.x86_64.rpm not found
DEBUG: Package: perf-3.4.59-8.el6.centos.alt.x86_64.rpm not found
INFO: Skipping CESA-2013:X007 since not all packages are present
INFO:    this should be fixed by the next channel sync, or the errata is already superseded by another one

But it appears to have introduced another bug. None of the Red Hat data is pulled into the errata page within the Spacewalk GUI. Here's the text from the errata it just imported (CEBA-2013:1255:C6-64). All three of the errata it just imported have no information in it (other than a reference link and an affected channel link). Version 20130905 imported the data as expected for all the prior ones (last one being CEBA-2013:1214:C6-64).

CentOS 6 dhcp Update

Issued: 9/12/13
Updated:    9/12/13
From:   
Topic

not available
Description

not available
Solution

not available
Affected Channels

CentOS 6 Updates (x86_64)
Fixes

(none)
Keywords

(none)
CVEs

(none)
OVAL

(none)
References

https://rhn.redhat.com/errata/RHBA-2013-1255.html
Notes

not available

Unfortunately I made the mistake of upgrading my Spacewalk to 2.0 last night (from 1.9) so now there's another variable in the mix. It appears that you updated it to support Spacewalk 2.0 several versions ago; however, I figured that noteworthy.

Again, here's the command and first few lines of that section of the log that did the import of the errata without the extra text:

DEBUG: Called as /usr/local/bin/ya-errata-import.pl --server 127.0.0.1 --channel centos6-x86_64-updates --os-version 6 --erratadir /tmp/centos-errata --publish --rhsa-oval /tmp/com.redhat.rhsa-all.xml --get-from-rhn --debug
INFO: Architecture is not specified, will try to determine it based on the channel properties of 'centos6-x86_64-updates'
INFO: Setting the OS variant to CentOS, if this is wrong please add the --redhat option
DEBUG: Version is 20130911
INFO: Server is running API version 13
INFO: API version is supported
INFO: Authentication successful
DEBUG: User is assigned these roles: channel_admin
INFO: User has administrator access to this server
INFO: Checking if channel centos6-x86_64-updates exists on 127.0.0.1
INFO: Determining architecture for channel centos6-x86_64-updates
INFO: Detected architecture 'x86_64' for channel 'centos6-x86_64-updates'
INFO: Listing all packages in centos6-x86_64-updates

And also the part within that section that actually found the relevant packages within a channel:

INFO: Processing CEBA-2013:1255 (CentOS 6 dhcp Update)
DEBUG: Good, errata CEBA-2013:1255:C6-64 does not yet exist in channel centos6-x86_64-updates
DEBUG: Package: dhclient-4.1.1-34.P1.el6_4.1.x86_64.rpm -> 32164
DEBUG: Package: dhcp-4.1.1-34.P1.el6_4.1.x86_64.rpm -> 32160
DEBUG: Package: dhcp-common-4.1.1-34.P1.el6_4.1.x86_64.rpm -> 32161
DEBUG: Package: dhcp-devel-4.1.1-34.P1.el6_4.1.i686.rpm -> 32162
DEBUG: Package: dhcp-devel-4.1.1-34.P1.el6_4.1.x86_64.rpm -> 32165
INFO: Creating errata CEBA-2013:1255:C6-64 for CEBA-2013:1255 (CentOS 6 dhcp Update) (All 5 packages present in the corresponding channel)

Did I goof by upgrading to Spacewalk 2.0?

liedekef commented 11 years ago

No you did not goof , I did :-) There was a typo fix, resulting in the errata details not being get for rhn. I fixed it and added some extra eval's just in case. Try the current git version.

ghost commented 11 years ago

After removing the errata without the Red Hat text, I resynchronized both the channel RPM list and then imported the newest errata.

It appears to have worked as intended without any errors at all. Even the Red Hat text was included as expected. Here's to hoping that CentOS doesn't make many more changes to their mailing list format.

Thanks (again) for your help.