Bug 1569540

Summary: insights-client doesn't handle fails responses when register machine
Product: Cloud Software Services (cloud.redhat.com) Reporter: Pavlo Yakovlev <pyakovle>
Component: ClientAssignee: jcrafts
Status: CLOSED CURRENTRELEASE QA Contact: Jeff Needle <jneedle>
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: jcrafts, jnewton, klape, lphiri, pyakovle
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-09-24 16:30:46 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:

Description Pavlo Yakovlev 2018-04-19 13:09:23 UTC
Description of problem:
If happened Error 409 - The given system_id is already in use by a different account insights-client shows "Successfully registered host" and then tries to upload archive

Version-Release number of selected component (if applicable):
Client: 3.0.3-9
Core: 3.0.4-3

How reproducible:

Steps to Reproduce:
1.Using duplicate UUID in /etc/insights-client/machine-id
2. Run insights-client --register

Actual results:
Successfully registered host 
Could not reach the Insights service to register.

Automatic scheduling for Insights has been enabled.
Starting to collect Insights data for pyakovle-kvm-redhat74
Uploading Insights data.
Upload archive failed with status code  409
Upload attempt 1 of 1 failed! Status Code: 409
All attempts to upload have failed!

Expected results:
Detected duplicate UUID and generate a new machine-id

Additional info:
Also insights-client doesn't handle other fails responses such as:
1. Please enable Insights on Satellite server
2. Registration failed by 402 error. (Limit of registered systems reached)

Comment 1 Lindani Phiri 2018-08-14 19:28:12 UTC
Can you please retest?