Bug 1124967 - hammer import organization --upload-manifests-from randomly fails to upload manifests
Summary: hammer import organization --upload-manifests-from randomly fails to upload m...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Transitions
Version: Unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
high vote
Target Milestone: Unspecified
Assignee: Grant Gainey
QA Contact: Lukas Pramuk
URL:
Whiteboard:
Depends On:
Blocks: stargate-GA-tracker
TreeView+ depends on / blocked
 
Reported: 2014-07-30 18:22 UTC by Lukas Pramuk
Modified: 2014-09-11 12:21 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-09-11 12:21:02 UTC


Attachments (Terms of Use)

Description Lukas Pramuk 2014-07-30 18:22:35 UTC
Description of problem:
hammer import organization --upload-manifests-from randomly fails to upload multiple manifests in a row. 3 out of 10 succeeded 

Version-Release number of selected component (if applicable):
rubygem-hammer_cli_import-0.9.0-1.el6.noarch

How reproducible:
100%

Steps to Reproduce:
0. prepare multiple manifest files in /tmp/manifests named by imported organizations (in filename spaces are replaced by underscores)

1.run import tool
# hammer import organization --csv-file /tmp/exports/users.csv --upload-manifests-from '/tmp/manifests'

2. check for actual results
for org in [...]; do
 hammer --csv subscription manifest-history --organization $org
done

out of 10 only 3 uploads were successful - 1st, 7th, 9th one
others were failures or with upload results missing at all!

Actual results:
3/10 success

Expected results:
10/10 success

Additional info:
candlepin is not that fast seems we need to embbed some sleeps

Comment 1 RHEL Product and Program Management 2014-07-30 18:23:45 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 3 Grant Gainey 2014-07-31 12:19:31 UTC
upload-manifest starts an asyn task, we need to wait for it to finish before starting a new one (per discussion w/jsherrill)

Comment 4 Grant Gainey 2014-07-31 18:24:34 UTC
commit e87cf91c9631929d93cd599fbf518e795b0d630e

Comment 6 Lukas Pramuk 2014-08-25 17:07:11 UTC
VERIFIED. rubygem-hammer_cli_import-0.10.1-1.el6.noarch

# hammer import organization --csv-file /tmp/exports/users.csv --upload-manifests-from /tmp/manifests
Summary
  Found 272 organizations.
  Uploaded 9 manifests.
  Created 9 organizations.

# hammer --csv subscription manifest-history --organization 'RED HAT SATELLITE ENGINEERING'
SUCCESS,RED_HAT_SATELLITE_ENGINEERING file imported successfully.,2014/08/24 20:35:46

# hammer --csv subscription manifest-history --organization 'Sec eng Brno Dept.'
SUCCESS,Sec_eng_Brno_Dept_ file imported successfully.,2014/08/24 20:36:13

# hammer --csv subscription manifest-history --organization 'QA Brno'
SUCCESS,QA_Brno file imported successfully.,2014/08/24 20:36:36

# hammer --csv subscription manifest-history --organization 'Security'
SUCCESS,Security file imported successfully.,2014/08/24 20:36:59

# hammer --csv subscription manifest-history --organization 'JBoss Brno QA'
SUCCESS,JBoss_Brno_QA file imported successfully.,2014/08/24 20:37:24

# hammer --csv subscription manifest-history --organization 'ClusterStorageQE'
SUCCESS,ClusterStorageQE file imported successfully.,2014/08/24 20:37:46

# hammer --csv subscription manifest-history --organization 'GSS'
SUCCESS,GSS file imported successfully.,2014/08/24 20:38:12

# hammer --csv subscription manifest-history --organization 'lvm-org'
SUCCESS,lvm-org file imported successfully.,2014/08/24 20:38:38

# hammer --csv subscription manifest-history --organization 'Red Hat OpenStack QE'
SUCCESS,Red_Hat_OpenStack_QE file imported successfully.,2014/08/24 20:39:03


--> 9 of 9 manifests uploaded

Comment 7 Bryan Kearney 2014-09-11 12:21:02 UTC
This was delivered with Satellite 6.0 which was released on 10 September 2014.


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