Bug 671462 - Problems with spacewalk-update-signatures cause aborts.
Summary: Problems with spacewalk-update-signatures cause aborts.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Satellite Synchronization
Version: 540
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Michael Mráka
QA Contact: Jiri Kastner
URL:
Whiteboard:
Depends On:
Blocks: sat54-errata 671465
TreeView+ depends on / blocked
 
Reported: 2011-01-21 15:33 UTC by Martin Poole
Modified: 2011-03-28 09:32 UTC (History)
3 users (show)

Fixed In Version: spacewalk-backend-1.2.13-34.el5sat
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-03-28 09:32:19 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
poor diff to fix both problems (866 bytes, application/octet-stream)
2011-01-21 15:33 UTC, Martin Poole
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0387 0 normal SHIPPED_LIVE Red Hat Network Satellite bug fix update 2011-03-28 09:32:12 UTC

Description Martin Poole 2011-01-21 15:33:56 UTC
Created attachment 474633 [details]
poor diff to fix both problems

Description of problem:

whilst attempting to fix Content Provider issues in 5.4 with the spacewalk-updates-signatures two bugs hit that caused the program to fail.

1. package path might be NULL if previously removed prior to 5.3 updates
2. if running with debug and a key needs updating the log message references an unknown variable.

Comment 1 Michael Mráka 2011-01-27 09:52:11 UTC
Issues fixed in spacewalk nightly by
commit 3165e82de6d1ce16d478927a56a5e47526de781d
    671462 - fixed path in debug output
commit 0ba6724affa7e5e670756484a62456e8c7c1b338
    if package is not on disk do not throw TB
    
    addressing:
    Traceback (most recent call last):
      File "/usr/bin/spacewalk-update-signatures", line 147, in ?
        main()
      File "/usr/bin/spacewalk-update-signatures", line 76, in main
        process_package_data()
      File "/usr/bin/spacewalk-update-signatures", line 115, in process_package_data
        full_path = os.path.join(CFG.MOUNT_POINT, path)
      File "/usr/lib64/python2.4/posixpath.py", line 60, in join
        if b.startswith('/'):
    AttributeError: 'NoneType' object has no attribute 'startswith'

Comment 2 Michael Mráka 2011-01-27 15:08:04 UTC
Fixed package in spacewalk: spacewalk-backend-1.3.51-1

Comment 4 Jiri Kastner 2011-03-23 12:23:10 UTC
[root@tyan-gt24-09 ~]# satellite-sync -c rhn-tools-rhel-i386-server-6 --no-rpms
08:17:28 Red Hat Network Satellite - live synchronization
08:17:28    url: https://satellite.rhn.redhat.com
08:17:28    debug/output level: 1
08:17:29    db:  rhnsat/<password>@rhnsat
08:17:29 
08:17:29 Retrieving / parsing channel-families data
08:17:31 channel-families data complete
08:17:33 
08:17:33 Retrieving / parsing arches data
08:17:33 arches data complete
08:17:33 
08:17:33 Retrieving / parsing additional arches data
08:17:34 additional arches data complete
08:17:34 
08:17:34 Retrieving / parsing channel data
08:18:48    p = previously imported/synced channel
08:18:48    . = channel not yet imported/synced
08:18:48    base-channels:
08:18:48 
08:18:48 Channel data complete
08:18:48 
08:18:48 Retrieving / parsing blacklists data
08:18:49 blacklists data complete
08:18:49 
08:18:49 Retrieving / parsing product names data
08:18:50 product names data complete
08:18:50 
08:18:50 Retrieving short package metadata (used for indexing)
08:18:50    Retrieving / parsing short package metadata: rhn-tools-rhel-i386-server-6 (30)
08:18:50 Diffing package metadata (what's missing locally?): rhn-tools-rhel-i386-server-6
            ________________________________________
Diffing:    ######################################## - complete
08:18:50 
08:18:50 Downloading package metadata
08:18:50    Retrieving / parsing *relevant* package metadata: rhn-tools-rhel-i386-server-6 (NONE RELEVANT)
08:18:50 
08:18:50 Importing package metadata
08:18:50    Importing *relevant* package metadata: rhn-tools-rhel-i386-server-6 (30)
08:18:50    * WARNING: this may be a slow process.
            ________________________________________
Importing:  +++ sending log as an email +++

SYNC ERROR: unhandled exception occurred:

(Check logs/email for potentially more detail)

'NoneType' object has no attribute 'startswith'

You have new mail in /var/spool/mail/root

[root@tyan-gt24-09 ~]# echo 1 | mail
Mail version 8.1 6/6/93.  Type ? for help.
"/var/spool/mail/root": 2 messages 2 new
>N  1 rhn-satellite@tyan-g  Wed Mar 23 08:12  45/2173  "RHN Management Satellite sync. report from tyan-gt24-09.rhts.eng.bos.redhat.com"
 N  2 rhn-satellite@tyan-g  Wed Mar 23 08:18  45/2173  "RHN Management Satellite sync. report from tyan-gt24-09.rhts.eng.bos.redhat.com"
Message 1:
From rhn-satellite.eng.bos.redhat.com  Wed Mar 23 08:12:31 2011
Date: Wed, 23 Mar 2011 08:12:31 -0400
From: rhn-satellite.eng.bos.redhat.com
Subject: RHN Management Satellite sync. report from tyan-gt24-09.rhts.eng.bos.redhat.com
To: root.eng.bos.redhat.com

08:12:31 
SYNC ERROR: unhandled exception occurred:

Exception reported from tyan-gt24-09.rhts.eng.bos.redhat.com
Time: Wed Mar 23 08:12:31 2011
Exception type exceptions.AttributeError

Exception Handler Information
Traceback (most recent call last):
  File "/usr/bin/satellite-sync", line 143, in main
    return satsync.Runner().main()
  File "/usr/share/rhn/satellite_tools/satsync.py", line 226, in main
    ret = method()
  File "/usr/share/rhn/satellite_tools/satsync.py", line 342, in _step_packages
    self._affected_channels = self.syncer.import_packages()
  File "/usr/share/rhn/satellite_tools/satsync.py", line 1785, in import_packages
    sync_handlers.import_packages(batch, sources)
  File "/usr/share/rhn/satellite_tools/sync_handlers.py", line 433, in import_packages
    importer.run()
  File "/usr/share/rhn/server/importlib/importLib.py", line 651, in run
    self.submit()
  File "/usr/share/rhn/server/importlib/packageImport.py", line 322, in submit
    self._import_signatures()
  File "/usr/share/rhn/server/importlib/packageImport.py", line 506, in _import_signatures
    full_path = os.path.join(CFG.MOUNT_POINT, package['path'])
  File "/usr/lib/python2.4/posixpath.py", line 60, in join
    if b.startswith('/'):
AttributeError: 'NoneType' object has no attribute 'startswith'



Saved 1 message in mbox
Held 1 message in /var/spool/mail/root

Comment 6 Michael Mráka 2011-03-23 13:46:47 UTC
(In reply to comment #4)
...
>   File "/usr/share/rhn/server/importlib/packageImport.py", line 506, in
> _import_signatures
>     full_path = os.path.join(CFG.MOUNT_POINT, package['path'])
>   File "/usr/lib/python2.4/posixpath.py", line 60, in join
>     if b.startswith('/'):
> AttributeError: 'NoneType' object has no attribute 'startswith'

This is bug 674528.

Comment 8 errata-xmlrpc 2011-03-28 09:32:19 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0387.html


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