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
The fix for this is deployed to production.
VERIFIED 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())},