Bug 1004954

Summary: getting "KeyError: '1000010848'" when syncing from big satellite instance
Product: [Retired] Subscription Asset Manager Reporter: Jan Hutař <jhutar>
Component: SpliceAssignee: Splice Developers <splice-devel>
Status: CLOSED ERRATA QA Contact: mkovacik
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 1.3CC: bkearney, cduryee, jhutar, tomckay, vkuznets
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-10-01 11:24:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 833466    

Description Jan Hutař 2013-09-05 20:31:25 UTC
Description of problem:
Getting "KeyError: '1000010848'" when syncing from big satellite instance


Version-Release number of selected component (if applicable):
spacewalk-splice-tool-0.40-1.el6sam.noarch
splice-common-config-0.144-1.el6sam.noarch
splice-selinux-0.144-1.el6sam.noarch
splice-common-0.144-1.el6sam.noarch
katello-headpin-all-1.4.3-11.el6sam_splice.noarch
splice-0.144-1.el6sam.noarch


How reproducible:
1 of 1 attempt


Steps to Reproduce:
1. Setup Splice to sync from Satellite 5.6.0 to SAM 1.3 snapshot #4
2. $ spacewalk-splice-checkin


Actual results:
Traceback (most recent call last):
  File "/usr/bin/spacewalk-splice-checkin", line 97, in <module>
    checkin.main(opts)
  File "/usr/lib/python2.6/site-packages/spacewalk_splice_tool/checkin.py", line 206, in main
    spacewalk_sync(options)
  File "/usr/lib/python2.6/site-packages/spacewalk_splice_tool/checkin.py", line 159, in spacewalk_sync
    kps.upload_host_guest_mapping(hosts_guests, katello_consumer_list)
  File "/usr/lib/python2.6/site-packages/spacewalk_splice_tool/katello_sync.py", line 231, in upload_host_guest_mapping
    guest_consumer_ids.append(sysid_consumer_map[sw_guest][0])
KeyError: '1000010848'


Expected results:
No traceback.

Comment 2 Chris Duryee 2013-09-05 21:13:00 UTC
According to a katello developer, we are likely pushing data with too many threads, and it's having trouble keeping up. Reducing the num_threads count in checkin.conf should resolve this.

Let me know if num_threads=2 works better, and if it does I'll change the default in checkin.conf.

Comment 3 Jan Hutař 2013-09-06 06:31:09 UTC
Yes. This helped. I have decreased num_threads in /etc/splice/checkin.conf from 4 to 2 and re-run the command (note I have not purged SAM DB to be 100% sure all data gets inserted again) and it ended without traceback.

Comment 4 Chris Duryee 2013-09-06 15:12:07 UTC
eb0c566 spacewalk-splice-tool 0.42+

I changed the default num_threads from 4 to 2. This makes creates and updates somewhat slower, but avoids the issues mentioned above.

Comment 5 Chris Duryee 2013-09-12 16:41:31 UTC
After discussion with vkuznets, we changed this to 1

Comment 6 Vitaly Kuznetsov 2013-09-13 14:25:57 UTC
In Snapshot 6:

# grep num_threads /etc/splice/checkin.conf 
num_threads = 1

Jan, can you please confirm you're not hitting the initial issue with Snapshot6?

Comment 7 Jan Hutař 2013-09-16 08:55:57 UTC
Is there a way how to list all the systems in the SAM instance on the command line? I want to compare it to list in satellite. Would prefer some CSV file.

Comment 8 Vitaly Kuznetsov 2013-09-16 09:02:44 UTC
(In reply to Jan Hutař from comment #7)
> Is there a way how to list all the systems in the SAM instance on the
> command line? I want to compare it to list in satellite. Would prefer some
> CSV file.

Yes, it's possible.
E.g. :
#headpin -u admin -p admin system list --org satellite-1 -g --noheading -d ','

You can list all your org labels with 'headpin org list'.

Comment 9 Jan Hutař 2013-09-16 12:45:58 UTC
Thanks.

Note it will take some time to me (day or so) waiting for a Beaker to prepare mine environment, will report back with results later.

Comment 11 Vitaly Kuznetsov 2013-09-23 12:05:34 UTC
Verifying based on Comment 6 and Comment 10.

Comment 15 errata-xmlrpc 2013-10-01 11:24:55 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHEA-2013-1390.html