Bug 972879

Summary: spacewalk-splice-checkin --splice-sync and --spacewalk-sync cannot run at the same time
Product: [Retired] Subscription Asset Manager Reporter: Chris Duryee <cduryee>
Component: SpliceAssignee: James Slagle <jslagle>
Status: CLOSED ERRATA QA Contact: mkovacik
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 1.3CC: jmatthew, jslagle, 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 10:55:27 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 Chris Duryee 2013-06-10 17:45:02 UTC
Description of problem: currently, the splice-sync and spacewalk-sync portions of spacewalk-splice-tool are set to run at the same time:

# Sync data from spacewalk to candlepin every 4 hours
* */4 * * * root /usr/bin/spacewalk-splice-checkin --spacewalk-sync
# Sync data from candlepin to splice every 10 minutes
*/10 * * * * root /usr/bin/spacewalk-splice-checkin --splice-sync

On the 4 hour mark, both pieces of the sync will attempt to run. However, only one can "win" since there's only one lockfile. Both should be able to run at the same time.


Version-Release number of selected component (if applicable): spacewalk-splice-tool 0.19


How reproducible: every time


Steps to Reproduce:
1. run spacewalk-splice-checkin --spacewalk-sync
2. in another terminal, run spacewalk-splice-checkin --splice-sync
3. check spacewalk_splice_tool.log

Actual results: splice-sync cannot run


Expected results: both should run at the same time, they use different resources.

Comment 1 James Slagle 2013-06-18 22:12:10 UTC
commit 6bfaf15f21d40346086d644da9a99e3fc3c83f7f

They can now both run at the same time from separate instances of sst.  Also, added some help that if you run sst with no sync option, both syncs are run.

Comment 2 Vitaly Kuznetsov 2013-06-21 12:47:12 UTC
Verified in spacewalk-splice-tool-0.24-1.el6sam.x86_64:

# spacewalk-splice-checkin --spacewalk-sync > log1 2>&1 & spacewalk-splice-checkin --splice-sync > log2 2>&1 &
[1] 6629
[2] 6630

# cat /var/log/splice/spacewalk_splice_tool.log

2013-06-21 08:45:26,770 INFO: PID 6630 spacewalk_splice_tool.checkin checkin:main:586        run starting
2013-06-21 08:45:26,770 INFO: PID 6629 spacewalk_splice_tool.checkin checkin:main:586        run starting
2013-06-21 08:45:26,770 INFO: PID 6630 spacewalk_splice_tool.checkin checkin:splice_sync:557        Started syncing system data to splice
2013-06-21 08:45:26,770 INFO: PID 6629 spacewalk_splice_tool.checkin checkin:spacewalk_sync:512        Started capturing system data from spacewalk
2013-06-21 08:45:26,770 INFO: PID 6629 spacewalk_splice_tool.checkin checkin:spacewalk_sync:518        retrieving data from spacewalk
2013-06-21 08:45:27,927 INFO: PID 6630 spacewalk_splice_tool.checkin checkin:splice_sync:561        calculating marketing product usage
2013-06-21 08:45:28,095 INFO: PID 6630 spacewalk_splice_tool.checkin checkin:splice_sync:575        uploading to splice...
2013-06-21 08:45:28,095 INFO: PID 6630 spacewalk_splice_tool.checkin checkin:build_server_metadata:170        building server metadata
2013-06-21 08:45:28,096 INFO: PID 6630 spacewalk_splice_tool.checkin checkin:upload_to_rcs:220        sending metadata to server
2013-06-21 08:45:28,380 INFO: PID 6629 spacewalk_splice_tool.checkin checkin:update_system_channel:500        calculating base channels from cloned channels
2013-06-21 08:45:30,301 INFO: PID 6629 spacewalk_splice_tool.checkin checkin:delete_stale_consumers:403        removing 0 consumers that are no longer in spacewalk
2013-06-21 08:45:30,301 INFO: PID 6629 spacewalk_splice_tool.checkin checkin:spacewalk_sync:533        adding installed products to 1 spacewalk records
2013-06-21 08:45:30,518 INFO: PID 6629 spacewalk_splice_tool.checkin checkin:transform_to_consumers:145        Translating system details to katello consumers
2013-06-21 08:45:30,518 INFO: PID 6629 spacewalk_splice_tool.checkin checkin:spacewalk_sync:543        found 1 systems to upload into katello
2013-06-21 08:45:30,518 INFO: PID 6629 spacewalk_splice_tool.checkin checkin:spacewalk_sync:544        uploading to katello...
2013-06-21 08:45:30,518 INFO: PID 6629 spacewalk_splice_tool.checkin checkin:upload_to_katello:439        0 consumers uploaded so far.
2013-06-21 08:45:32,015 INFO: PID 6629 spacewalk_splice_tool.checkin checkin:spacewalk_sync:546        upload completed. updating with guest info..
2013-06-21 08:45:32,612 INFO: PID 6629 spacewalk_splice_tool.checkin checkin:spacewalk_sync:550        guest upload completed
2013-06-21 08:45:32,612 INFO: PID 6629 spacewalk_splice_tool.checkin checkin:main:597        run complete

Comment 5 errata-xmlrpc 2013-10-01 10:55:27 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