Bug 1966418

Summary: foreman-maintain shows warning to run 'systemctl daemon-reload' each time I restart services.
Product: Red Hat Satellite Reporter: Jameer Pathan <jpathan>
Component: Satellite MaintainAssignee: Anurag Patel <apatel>
Status: CLOSED DUPLICATE QA Contact: Gaurav Talreja <gtalreja>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.10.0CC: apatel, egolov, kgaikwad
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-06-01 09:12:04 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:

Description Jameer Pathan 2021-06-01 06:28:08 UTC
Description of problem:
foreman-maintain shows warning to run 'systemctl daemon-reload' each time I restart services.

Version-Release number of selected component (if applicable):
- Satellite 6.10.0 snap 2
- rubygem-foreman_maintain-0.8.1-1.el7sat.noarch

How reproducible:
- Always

Steps to Reproduce:
1. foreman-maintain service restart

Actual results:
- If I don't run `systemctl daemon-reload` after service restart some of satellite task fails. e.g repo sync, adding rh cloud token for insights etc.

[root@dhcp-2-149 ~]# foreman-maintain service restart
Running Restart Services
================================================================================
Check if command is run as root user:                                 [OK]
--------------------------------------------------------------------------------
Restart applicable services: 

Stopping the following service(s):
rh-redis5-redis, postgresql, pulpcore-api, pulpcore-content, pulpcore-resource-manager, rh-redis5-redis, tomcat, dynflow-sidekiq@orchestrator, foreman, httpd, puppetserver, dynflow-sidekiq@worker-1, dynflow-sidekiq@worker-hosts-queue-1, foreman-proxy
| stopping puppetserver                                                         
Warning: Stopping foreman.service, but it can still be activated by:
  foreman.socket
/ stopping rh-redis5-redis                                                      
Warning: postgresql.service changed on disk. Run 'systemctl daemon-reload' to reload units.

Warning: Stopping pulpcore-api.service, but it can still be activated by:
  pulpcore-api.socket

Warning: Stopping pulpcore-content.service, but it can still be activated by:
  pulpcore-content.socket
- All services stopped                                                          

Starting the following service(s):
rh-redis5-redis, postgresql, pulpcore-api, pulpcore-content, pulpcore-resource-manager, rh-redis5-redis, tomcat, dynflow-sidekiq@orchestrator, foreman, httpd, puppetserver, dynflow-sidekiq@worker-1, dynflow-sidekiq@worker-hosts-queue-1, foreman-proxy
\ starting rh-redis5-redis                                                      
Warning: postgresql.service changed on disk. Run 'systemctl daemon-reload' to reload units.
\ All services started                                                [OK]      
--------------------------------------------------------------------------------

[root@dhcp-2-149 ~]# systemctl daemon-reload


Expected results:
- No need to run `systemctl daemon-reload` manually each time after foreman-maintain service restart.

Additional info:

Comment 2 Evgeni Golov 2021-06-01 08:50:26 UTC
I don't think the component (Foreman Maintain) is correct.

If this is a freshly deployed machine (or a fresh upgrade), the Installer should have kicked systemd accordingly after modifying the file.
If it didn't, that's an Installer bug.

At the same time, the attached traceback doesn't show anything about *why* things are not working.
So please provide a full one, or a reproducer machine.

Comment 3 Jameer Pathan 2021-06-01 09:12:04 UTC

*** This bug has been marked as a duplicate of bug 1965901 ***