Bug 1344923

Summary: [RFE] Add katello-service disable/enable to stop/start services loading on boot.
Product: Red Hat Satellite Reporter: Calvin Hartwell <chartwel>
Component: InstallationAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Evgeni Golov <egolov>
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.1.8CC: bbuckingham, egolov, jcallaha, mvanderw, roywilli, stbenjam
Target Milestone: UnspecifiedKeywords: FutureFeature, Triaged
Target Release: Unused   
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: 2018-02-21 16:49:54 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 Calvin Hartwell 2016-06-12 16:04:40 UTC
Description of problem:

Customer needs to perform some maintenance on the partitions Satellite 6 is using and we don't want Satellite 6 to attempt to try to start if there are messed up partitions.

This would have many other uses when you need to temporarily disable Satellite 6 from running on boot. 

So we would like to be able to mass disable/enable all the services in Satellite 6 using the katello-service command. It seems to run every other action apart from enable/disable.  

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

6.1.1
6.1.8
6.1.x
6.2.x

How reproducible:

Easy to reproduce. 

Steps to Reproduce:
N/A it is a feature which not currently implemented. 

Actual results:
katello-service does not control services loading on boot (chkconfig or enable/disable)

Expected results:
katello-service should be able to disable/enable all services used in Satellite 6

Additional info:

Comment 1 Stephen Benjamin 2016-08-23 17:24:29 UTC
Created redmine issue http://projects.theforeman.org/issues/16251 from this bug

Comment 2 Bryan Kearney 2016-10-12 14:07:50 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/16251 has been resolved.

Comment 4 roywilli 2017-03-06 16:04:50 UTC
The issue marked as resolved on the foreman [1], does not actually implement this change for RHEL7.  I have code up a fix that has been merged into the foreman [2] and docs update [3].

[1] http://projects.theforeman.org/issues/16251
[2] https://github.com/Katello/katello-packaging/pull/383
[3] https://github.com/Katello/katello-packaging/pull/385

Comment 5 Evgeni Golov 2017-08-09 09:38:25 UTC
Verified.
Version Tested:
Satellite-6.3 Snap 10
               
[root@sat63-qa-rhel7-puppet4 ~]# katello-service disable
systemctl disable mongod.service
Removed symlink /etc/systemd/system/multi-user.target.wants/mongod.service.

systemctl disable postgresql.service
Removed symlink /etc/systemd/system/multi-user.target.wants/postgresql.service.

systemctl disable qpidd.service
Removed symlink /etc/systemd/system/multi-user.target.wants/qpidd.service.

systemctl disable qdrouterd.service
Removed symlink /etc/systemd/system/multi-user.target.wants/qdrouterd.service.

systemctl disable squid.service
Removed symlink /etc/systemd/system/multi-user.target.wants/squid.service.

systemctl disable tomcat.service
Removed symlink /etc/systemd/system/multi-user.target.wants/tomcat.service.

systemctl disable pulp_workers.service
Removed symlink /etc/systemd/system/multi-user.target.wants/pulp_workers.service.

systemctl disable smart_proxy_dynflow_core.service
Removed symlink /etc/systemd/system/multi-user.target.wants/smart_proxy_dynflow_core.service.

systemctl disable pulp_resource_manager.service
Removed symlink /etc/systemd/system/multi-user.target.wants/pulp_resource_manager.service.

systemctl disable pulp_streamer.service
Removed symlink /etc/systemd/system/multi-user.target.wants/pulp_streamer.service.

systemctl disable foreman-proxy.service
Removed symlink /etc/systemd/system/multi-user.target.wants/foreman-proxy.service.

systemctl disable pulp_celerybeat.service
Removed symlink /etc/systemd/system/multi-user.target.wants/pulp_celerybeat.service.

systemctl disable httpd.service
Removed symlink /etc/systemd/system/multi-user.target.wants/httpd.service.

systemctl disable puppetserver.service
Removed symlink /etc/systemd/system/multi-user.target.wants/puppetserver.service.

systemctl disable foreman-tasks.service
Removed symlink /etc/systemd/system/multi-user.target.wants/foreman-tasks.service.

Success!

[root@sat63-qa-rhel7-puppet4 ~]# reboot

→ after the reboot, Satellite services are not running.

[root@sat63-qa-rhel7-puppet4 ~]# katello-service enable
systemctl enable mongod.service
Created symlink from /etc/systemd/system/multi-user.target.wants/mongod.service to /usr/lib/systemd/system/mongod.service.

systemctl enable postgresql.service
Created symlink from /etc/systemd/system/multi-user.target.wants/postgresql.service to /etc/systemd/system/postgresql.service.

systemctl enable qpidd.service
Created symlink from /etc/systemd/system/multi-user.target.wants/qpidd.service to /usr/lib/systemd/system/qpidd.service.

systemctl enable qdrouterd.service
Created symlink from /etc/systemd/system/multi-user.target.wants/qdrouterd.service to /usr/lib/systemd/system/qdrouterd.service.

systemctl enable squid.service
Created symlink from /etc/systemd/system/multi-user.target.wants/squid.service to /usr/lib/systemd/system/squid.service.

systemctl enable tomcat.service
Created symlink from /etc/systemd/system/multi-user.target.wants/tomcat.service to /usr/lib/systemd/system/tomcat.service.

systemctl enable pulp_workers.service
Created symlink from /etc/systemd/system/multi-user.target.wants/pulp_workers.service to /usr/lib/systemd/system/pulp_workers.service.

systemctl enable smart_proxy_dynflow_core.service
Created symlink from /etc/systemd/system/multi-user.target.wants/smart_proxy_dynflow_core.service to /usr/lib/systemd/system/smart_proxy_dynflow_core.service.

systemctl enable pulp_resource_manager.service
Created symlink from /etc/systemd/system/multi-user.target.wants/pulp_resource_manager.service to /usr/lib/systemd/system/pulp_resource_manager.service.

systemctl enable pulp_streamer.service
Created symlink from /etc/systemd/system/multi-user.target.wants/pulp_streamer.service to /usr/lib/systemd/system/pulp_streamer.service.

systemctl enable foreman-proxy.service
Created symlink from /etc/systemd/system/multi-user.target.wants/foreman-proxy.service to /usr/lib/systemd/system/foreman-proxy.service.

systemctl enable pulp_celerybeat.service
Created symlink from /etc/systemd/system/multi-user.target.wants/pulp_celerybeat.service to /usr/lib/systemd/system/pulp_celerybeat.service.

systemctl enable httpd.service
Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.

systemctl enable puppetserver.service
Created symlink from /etc/systemd/system/multi-user.target.wants/puppetserver.service to /usr/lib/systemd/system/puppetserver.service.

systemctl enable foreman-tasks.service
Created symlink from /etc/systemd/system/multi-user.target.wants/foreman-tasks.service to /usr/lib/systemd/system/foreman-tasks.service.

Success!

[root@sat63-qa-rhel7-puppet4 ~]# reboot

→ after the reboot, Satellite services are running again.

Comment 6 Satellite Program 2018-02-21 16:49:54 UTC
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA.

For information on the advisory, and where to find the updated files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2018:0336