Bug 1817067 - rhsm-conduit reports insights_id incorrectly
Summary: rhsm-conduit reports insights_id incorrectly
Alias: None
Product: Red Hat Hybrid Cloud Console (console.redhat.com)
Classification: Red Hat
Component: Subscription Watch
Version: unspecified
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: ---
Assignee: Kevin Howell
QA Contact: Nikhil Kathole
Depends On:
TreeView+ depends on / blocked
Reported: 2020-03-25 14:04 UTC by Jozef Hartinger
Modified: 2020-05-29 10:24 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2020-05-29 10:24:37 UTC
Target Upstream Version:

Attachments (Terms of Use)

Description Jozef Hartinger 2020-03-25 14:04:23 UTC
Description of problem:

Inventory expects the host.insights_id field to be a uuid. In some messages this requirement is not met by rhsm-conduit.

Example: "insights_id": "392ca55e85e240ad944dc35f0df9a2c2\n"

Looks like trimming/sanitation of the input is missing.

Version-Release number of selected component (if applicable):

How reproducible:
Happens in a small number of messages ~40 / day

Additional info:

See https://kibana-kibana.1b13.insights.openshiftapps.com/app/kibana#/discover?_g=(refreshInterval:(pause:!t,value:0),time:(from:now-7d,mode:quick,to:now))&_a=(columns:!(_source),index:'0a2575c0-65f9-11e9-ba88-097c6c9f6850',interval:auto,query:(language:lucene,query:'@log_stream:+%22inventory-mq-*%22+AND+message:+%22Error+adding+host+%22+AND+host.reporter:+%22rhsm-conduit%22+AND+exception:+%22insights_id%22'),sort:!('@timestamp',desc)) for all validation failures on messages reported by rhsm-conduit

Comment 1 Kevin Howell 2020-04-15 15:25:46 UTC
The fix for this is deployed to production.

Comment 2 Nikhil Kathole 2020-05-21 05:01:57 UTC

candlepin has - "insights_id":"7dbda785a50b49bc883f43eb9e287d3d\n" and after sync host inventory showed 'insights_id': '7dbda785a50b49bc883f43eb9e287d3d'.

Host added to inventory successfully.

{'account': '6676582',
              'ansible_host': None,
              'bios_uuid': None,
              'created': datetime.datetime(2020, 5, 20, 15, 54, 41, 498887, tzinfo=tzutc()),
              'culled_timestamp': datetime.datetime(2020, 6, 5, 15, 54, 41, 387000, tzinfo=tzutc()),
              'display_name': 'b2b252fd-8d6d-4455-ae28-0ba9212085c0',
              'external_id': None,
              'facts': [{'facts': {'ARCHITECTURE': 'x86_64',
                                   'CPU_CORES': 1,
                                   'CPU_SOCKETS': 1,
                                   'IS_VIRTUAL': True,
                                   'MEMORY': 1,
                                   'RH_PROD': ['69'],
                                   'SYNC_TIMESTAMP': '2020-05-20T15:54:41.387Z',
                                   'orgId': '13284229'},
                         'namespace': 'rhsm'}],
              'fqdn': None,
              'id': 'b2b252fd-8d6d-4455-ae28-0ba9212085c0',
              'insights_id': '7dbda785a50b49bc883f43eb9e287d3d',
              'ip_addresses': None,
              'mac_addresses': None,
              'reporter': 'rhsm-conduit',
              'rhel_machine_id': None,
              'satellite_id': None,
              'stale_timestamp': datetime.datetime(2020, 5, 22, 15, 54, 41, 387000, tzinfo=tzutc()),
              'stale_warning_timestamp': datetime.datetime(2020, 5, 29, 15, 54, 41, 387000, tzinfo=tzutc()),
              'subscription_manager_id': '51e3673d-3337-4baf-bc9d-efbb2069934e',
              'tags': None,
              'updated': datetime.datetime(2020, 5, 20, 15, 54, 41, 498892, tzinfo=tzutc())},

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