Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1592816

Summary: insights-client does not run automatically
Product: Red Hat Hybrid Cloud Console (console.redhat.com) Reporter: Christian Labisch <clnetbox>
Component: ClientAssignee: Kyle Lape <klape>
Status: CLOSED NOTABUG QA Contact: Jeff Needle <jneedle>
Severity: high Docs Contact:
Priority: medium    
Version: unspecifiedCC: clnetbox, jcrafts, jnewton, klape, lphiri
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-08-09 16:56:36 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:
Description Flags
content of /var/log/insights-client/insights-client.log
none
output of sudo insights-client --support none

Description Christian Labisch 2018-06-19 11:15:50 UTC
Description of problem:

The insights-client 3.0.3 on RHEL 7.5 does not run automatically.
It needs to be executed manually by running sudo insights-client.

insights-client.service is enabled but - dead after system start.
insights-client.timer is enabled and - active after system start.

sudo systemctl start insights-client.service leads to the result.
Afterwards, insights-client is running automatically as expected.

The problem is that it has to be started after every system boot.

Version-Release number of selected component:

insights-client-3.0.3-9.el7_5

How reproducible:

Tested with three registered RHEL 7.5 server systems

Steps to Reproduce:

1. Keep the RHEL 7 server running more than 24 hours
2. Check for log entries in /var/log/insights-client
3. Also https://access.redhat.com/insights/inventory

Actual results:

insights-client 3.0.3 is not running automatically

Expected results:

insights-client should automatically start and run

Additional info:

$ sudo systemctl status insights-client.service
● insights-client.service - Insights Client
   Loaded: loaded (/usr/lib/systemd/system/insights-client.service; static; vendor preset: disabled)
   Active: inactive (dead)
 
$ sudo systemctl status insights-client.timer
● insights-client.timer - Insights Client Timer Task
   Loaded: loaded (/usr/lib/systemd/system/insights-client.timer; enabled; vendor preset: disabled)
   Active: active (waiting)

Comment 1 jcrafts 2018-07-18 13:16:26 UTC
Need some more info on this.

1. Is the system subscribed to RHSM?
2. Was the client run with --register upon install?
3. Can we get the output of insights-client --version?

Comment 2 Christian Labisch 2018-07-18 13:55:38 UTC
(In reply to jcrafts from comment #1)
> Need some more info on this.
> 
> 1. Is the system subscribed to RHSM?
> 2. Was the client run with --register upon install?
> 3. Can we get the output of insights-client --version?

1. The systems are subscribed by executing : sudo subscription-manager register
2. The systems are registered by executing : sudo insights-client --register
3. The output of insights-client --version : Client: 3.0.3-9   Core: 3.0.4-3

Additional information : insights-client worked as expected on RHEL 7.4 Server.
After the upgrade to RHEL 7.5 Server insights-client doesn't run automatically.

sudo subscription-manager list
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:   Red Hat Software Collections (for RHEL Server)
Product ID:     201
Version:        3
Arch:           x86_64
Status:         Subscribed
Status Details: 
Starts:         02.04.2018
Ends:           02.04.2019

Product Name:   Red Hat Enterprise Linux Server
Product ID:     69
Version:        7.5
Arch:           x86_64
Status:         Subscribed
Status Details: 
Starts:         02.04.2018
Ends:           02.04.2019

sudo yum list insights-client
Loaded plugins: product-id, search-disabled-repos, subscription-manager
Installed Packages
insights-client.noarch        3.0.3-9.el7_5        @rhel-7-server-rpms

Comment 3 jcrafts 2018-07-18 14:13:36 UTC
Can you run insights-client --support and upload the contents of /var/log/insights-client?

Comment 4 Christian Labisch 2018-07-18 14:32:03 UTC
Created attachment 1459729 [details]
content of /var/log/insights-client/insights-client.log

Comment 5 Christian Labisch 2018-07-18 14:33:36 UTC
Created attachment 1459731 [details]
output of sudo insights-client --support

Comment 6 Christian Labisch 2018-07-18 14:42:34 UTC
(In reply to jcrafts from comment #3)
> Can you run insights-client --support and upload the contents of
> /var/log/insights-client?

I have executed sudo rm /var/log/insights-client/* to clear the older log files
from running insights-client manually before I've executed sudo insights-client
--support. I have uploaded the output and the content of the logs as requested.

Comment 7 jcrafts 2018-07-18 16:37:40 UTC
May we have the output of the following:

journalctl -u insights-client -b
journalctl -u insights-client.timer -b
systemctl list-timers \*insights\*

Comment 8 Christian Labisch 2018-07-18 16:47:19 UTC
(In reply to jcrafts from comment #7)
> May we have the output of the following:
> 
> journalctl -u insights-client -b
> journalctl -u insights-client.timer -b
> systemctl list-timers \*insights\*

journalctl -u insights-client -b
-- No entries --

journalctl -u insights-client.timer -b

-- Logs begin at Mi 2018-07-18 18:42:20 CEST, end at Mi 2018-07-18 18:43:01 CEST. --
Jul 18 18:42:27 cl-rs-1 systemd[1]: Adding 1h 7min 9.852667s random time.
Jul 18 18:42:27 cl-rs-1 systemd[1]: Started Insights Client Timer Task.
Jul 18 18:42:27 cl-rs-1 systemd[1]: Starting Insights Client Timer Task.

systemctl list-timers \*insights\*

NEXT                         LEFT    LAST PASSED UNIT                  ACTIVATES
Do 2018-07-19 01:07:09 CEST  6h left n/a  n/a    insights-client.timer insights-client.service

1 timers listed.
Pass --all to see loaded but inactive timers, too.

Comment 9 Kyle Lape 2018-07-18 16:51:45 UTC
insights-client.service is expected to be inactive; it's the timer that is active and enabled.  The symptom you're describing (i.e. works until restart) sounds like the timer is activated but not enabled in systemd.  Based on the output of the insights-client.timer status, though, it looks like it is configured properly (active/enabled).

Your output of insights-client.timer looks normal as well.  You may need to restart the host again (without re-activating the timer or service) so we can reproduce the problem.

Comment 10 Christian Labisch 2018-07-18 17:13:22 UTC
(In reply to Kyle Lape from comment #9)
> insights-client.service is expected to be inactive; it's the timer that is
> active and enabled.  The symptom you're describing (i.e. works until
> restart) sounds like the timer is activated but not enabled in systemd. 
> Based on the output of the insights-client.timer status, though, it looks
> like it is configured properly (active/enabled).
> 
> Your output of insights-client.timer looks normal as well.  You may need to
> restart the host again (without re-activating the timer or service) so we
> can reproduce the problem.

This is what I've already done several times, I booted the host (without re-
activating the timer or service) and kept it running for more than 24 hours.
Then restarted again, same procedure as before, insights-client not running
automatically. And I didn't make any change after the upgrade of the system.
The only exception was, when I started insights-client.service manually for
testing if that would lead to the client running automatically - and it did.
Without this interaction it does not - I'll have to run the client manually.

Comment 11 Christian Labisch 2018-11-19 12:18:25 UTC
Update : on RHEL 7.6 and on RHEL 8 Beta everything I have described is the same -
insights-client doesn't run automatically, I have to invoke the command manually.