Bug 1156468
| Summary: | SAM 1.4 Enhanced Reporting: spacewalk-splice-checkin --splice-sync returns "KeyError: 'network.hostname'" | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Retired] Subscription Asset Manager | Reporter: | Masaki Furuta ( RH ) <mfuruta> | ||||||||||||||||||
| Component: | spacewalk-splice-tool | Assignee: | Katello Internal Mailing List <katello-internal> | ||||||||||||||||||
| Status: | CLOSED WONTFIX | QA Contact: | Katello QA List <katello-qa-list> | ||||||||||||||||||
| Severity: | high | Docs Contact: | |||||||||||||||||||
| Priority: | high | ||||||||||||||||||||
| Version: | 1.4 | CC: | aathomas, ajanorka, bkearney, chrobert, ifloodmu, jalviso, jko, katello-internal, mklika, nrathod, pwayper, xdmoon | ||||||||||||||||||
| Target Milestone: | rc | Keywords: | Reopened | ||||||||||||||||||
| Target Release: | --- | ||||||||||||||||||||
| Hardware: | All | ||||||||||||||||||||
| OS: | Linux | ||||||||||||||||||||
| Whiteboard: | |||||||||||||||||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||||||||||||||||
| Doc Text: | Story Points: | --- | |||||||||||||||||||
| Clone Of: | Environment: | ||||||||||||||||||||
| Last Closed: | 2017-06-27 11:36:41 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: | |||||||||||||||||||||
| Attachments: |
|
||||||||||||||||||||
Created attachment 950393 [details]
60-candlepin.dump
Created attachment 950394 [details]
50-consumer.txt
Created attachment 950395 [details]
40-consumer_facts.txt
Created attachment 950396 [details]
30-splice-debug.tar.gz
Created attachment 950398 [details]
20-sosreport-nu-sam.01183313-20140919164534-a83a.tar.xz
Created attachment 950399 [details]
10-katello-debug-20140919162739.tar.gz
Created attachment 950400 [details]
katello-debug-20140919162739.var.log.thumbslug.error.log.xz
Hi all, I have more information about this, and hopefully it's reproducible. The problem is that there are machines in the candlepin database with no network.hostname fact. Where did these machines come from? They're hypervisors and they were added automatically to the database by virt-who as part of its process of scanning data from (in this case) vCenter. So on the one hand, maybe virt-who should be supplying more information (how?) so that the machines also get a network.hostname fact and that satisfies spacewalk-splice-checkin. On the other hand, maybe spacewalk-splice-checkin should cope better with hosts that have no network.hostname fact, as this may be unavoidable if virt-who can't get the necessary details from the hypervisor management. Hope this helps, Paul I can see the simplest way to solve the immediate problem the customer encounters is:
diff --git a/src/spacewalk_splice_tool/checkin.py b/src/spacewalk_splice_tool/checkin.py
index 10d958c..e12f72d 100644
--- a/src/spacewalk_splice_tool/checkin.py
+++ b/src/spacewalk_splice_tool/checkin.py
@@ -239,7 +239,8 @@ def splice_sync(options):
# create the base marketing usage list
mpu_list = []
for katello_consumer in katello_consumers:
- mpu_list.append(dt.transform_to_rcs(katello_consumer, sps.get_splice_server_uuid()))
+ if 'facts' in katello_consumer and 'network.hostname' in katello_consumer['facts']:
+ mpu_list.append(dt.transform_to_rcs(katello_consumer, sps.get_splice_server_uuid()))
# strip out blank values that we don't want to send to splice
mpu_list = filter(None, mpu_list)
In other words, to only add a consumer to the mpu_list if it has the 'network.hostname' fact. This relies on the dicts working correctly (i.e. if they're mapped back to database queries behind the scenes, then that should query the database correctly). It also assumes that all other properties (e.g. owner->key and owner->displayName) are present.
Hope this helps,
Paul
Hi, Do we have a status update on this case? Regards, Josephine Hi Team, It seems that many engineers are waiting for an update to provide it to customer. Can someone provide an ETA on this. Regards, Neeraj Rathod. The release of Satellite 5.8 we are deprecating the support of Subscription Asset Manager. The release notes for 5.8 can be found at https://access.redhat.com/documentation/en-us/red_hat_satellite/5.8/pdf/release_notes/Red_Hat_Satellite-5.8-Release_Notes-en-US.pdf. I am therefore closing out this bug as WONTFIX. If you believe this to be an error, please feel free tor each out to either Rich Jerrido or Bryan Kearney. Thank you! |
Created attachment 950392 [details] 70-katello.dump