Bug 674528 - AttributeError: 'NoneType' object has no attribute 'startswith' - when syncing from dump with --no-rpms
Summary: AttributeError: 'NoneType' object has no attribute 'startswith' - when syncin...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Server
Version: 1.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Michael Mráka
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: space14 690173
TreeView+ depends on / blocked
 
Reported: 2011-02-02 10:13 UTC by Jan Hutař
Modified: 2011-04-26 09:11 UTC (History)
1 user (show)

Fixed In Version: spacewalk-backend-1.4.3-1
Clone Of:
: 690173 (view as bug list)
Environment:
Last Closed: 2011-04-26 09:11:08 UTC
Embargoed:


Attachments (Terms of Use)

Description Jan Hutař 2011-02-02 10:13:55 UTC
Description of problem:
During sync from dump with --no-rpms option, I got traceback.


Version-Release number of selected component (if applicable):
spacewalk-postgresql-1.3.3-1.el5
spacewalk-schema-1.3.18-1.el5


How reproducible:
1 of 1


Steps to Reproduce:
1. Have empty Spacewalk
2. Sync custom channels with --no-rpms from dump
   # satellite-sync -m /tmp/mydump -c test-i386-1 --no-rpms


Actual results:
# satellite-sync -m /tmp/mydump -c test-i386-1 --no-rpms
10:06:05 Red Hat Network Satellite - file-system synchronization
10:06:05    mp:  /tmp/mydump
10:06:05    db:  spaceuser/<password>@dbname=spaceschema;host=localhost;port=5432
[...]
10:06:06 Importing package metadata
10:06:06    Importing *relevant* package metadata: test-i386-1 (9)
            ________________________________________
Importing:  +++ sending log as an email +++

SYNC ERROR: unhandled exception occurred:

(Check logs/email for potentially more detail)

'NoneType' object has no attribute 'startswith'


Expected results:
Should work as expected.


Additional info:
When I have removed "--no-rpms" option, sync worked as expected.

When I have then removed channel using spacewalk-remove-channel and tried again (both with and without "--no-rpms" option), sync worked.

Comment 1 Jan Hutař 2011-02-02 10:14:30 UTC
Traceback sent by email:

Subject: RHN Management Satellite sync. report from hp-nehalem-02.rhts.eng.bos.redhat.com
To: root.eng.bos.redhat.com

10:06:06 
SYNC ERROR: unhandled exception occurred:

Exception reported from hp-nehalem-02.rhts.eng.bos.redhat.com
Time: Wed Feb  2 10:06:06 2011
Exception type exceptions.AttributeError

Exception Handler Information
Traceback (most recent call last):
  File "/usr/bin/satellite-sync", line 138, in main
    return satsync.Runner().main()
  File "/usr/lib/python2.4/site-packages/spacewalk/satellite_tools/satsync.py", line 226, in main
    ret = method()
  File "/usr/lib/python2.4/site-packages/spacewalk/satellite_tools/satsync.py", line 342, in _step_packages
    self._affected_channels = self.syncer.import_packages()
  File "/usr/lib/python2.4/site-packages/spacewalk/satellite_tools/satsync.py", line 1602, in import_packages
    [sources])
  File "/usr/lib/python2.4/site-packages/spacewalk/satellite_tools/satsync.py", line 1576, in _proces_batch
    prompt, nevermorethan, process_function_args)
  File "/usr/lib/python2.4/site-packages/spacewalk/satellite_tools/satsync.py", line 1556, in _processWithProgressBar
    process_function(chunk, *process_function_args)
  File "/usr/lib/python2.4/site-packages/spacewalk/satellite_tools/satsync.py", line 1583, in _import_packages_process
    sync_handlers.import_packages(batch, sources)
  File "/usr/lib/python2.4/site-packages/spacewalk/satellite_tools/sync_handlers.py", line 378, in import_packages
    importer.run()
  File "/usr/lib/python2.4/site-packages/spacewalk/server/importlib/importLib.py", line 630, in run
    self.submit()
  File "/usr/lib/python2.4/site-packages/spacewalk/server/importlib/packageImport.py", line 297, in submit
    self._import_signatures()
  File "/usr/lib/python2.4/site-packages/spacewalk/server/importlib/packageImport.py", line 483, 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'

Comment 3 Michael Mráka 2011-02-04 13:33:00 UTC
Fixed in
commit 2905144fee9eaf79ad17c40767c652e836245614
    674528 - don't read signatures when there is no rpm (--no-rpms)

Comment 4 Miroslav Suchý 2011-04-11 07:45:25 UTC
Mass moving to ON_QA before release of Spacewalk 1.4

Comment 5 Miroslav Suchý 2011-04-26 09:11:08 UTC
Spacewalk 1.4 has been released


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