Bug #23411
closedforeman-tasks service "disappears" with service commands
Description
On katello 3.6, after restarting services and enabling/disabling services with the service subcommand, foreman-tasks service "disappeared", and hammer ping was failing.
Updated by John Mitsch over 6 years ago
It seems the disable command removes foreman-tasks
More info and reproducer:
On katello 3.6: dynflowd, foreman-tasks all exist and show up in the service list with restart
[root@centos7-katello-3-6 foreman_maintain]# ./bin/foreman-maintain service restart Running Restart Services ================================================================================ Check if command is run as root user: [OK] -------------------------------------------------------------------------------- Restart applicable services: Stopping the following service(s): postgresql, mongod, qdrouterd, squid, qpidd, pulp_resource_manager, pulp_streamer, pulp_celerybeat, pulp_workers, foreman-proxy, tomcat, foreman-tasks, httpd, puppetserver \ stopping httpd^C [RUNNING] -------------------------------------------------------------------------------- [root@centos7-katello-3-6 foreman_maintain]# which dynflowd /sbin/dynflowd [root@centos7-katello-3-6 foreman_maintain]# systemctl status foreman-tasks ● dynflowd.service - Foreman jobs daemon Loaded: loaded (/usr/lib/systemd/system/dynflowd.service; enabled; vendor preset: disabled) Active: active (running) since Fri 2018-04-27 20:54:15 UTC; 57s ago Docs: https://theforeman.org Process: 3602 ExecStop=/usr/sbin/dynflowd stop (code=exited, status=0/SUCCESS) Process: 4203 ExecStart=/usr/sbin/dynflowd start (code=exited, status=0/SUCCESS) CGroup: /system.slice/dynflowd.service ├─4239 dynflow_executor └─4245 dynflow_executor_monitor Apr 27 20:54:14 centos7-katello-3-6.jomitsch.example.com dynflowd[4203]: /usr/share/foreman/lib/foreman.rb:8: warning: already initialized constant Foreman::UUID_REGEXP Apr 27 20:54:14 centos7-katello-3-6.jomitsch.example.com dynflowd[4203]: /usr/share/foreman/lib/foreman.rb:8: warning: previous definition of UUID_REGEXP was here Apr 27 20:54:14 centos7-katello-3-6.jomitsch.example.com dynflowd[4203]: /usr/share/foreman/lib/core_extensions.rb:183: warning: already initialized constant ActiveSupport::Messag...LT_CIPHER Apr 27 20:54:14 centos7-katello-3-6.jomitsch.example.com dynflowd[4203]: /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.4/lib/active_support/message_encrypto... was here Apr 27 20:54:14 centos7-katello-3-6.jomitsch.example.com dynflowd[4203]: /opt/theforeman/tfm/root/usr/share/gems/gems/logging-1.8.2/lib/logging/appender.rb:139: warning: constant ...eprecated Apr 27 20:54:14 centos7-katello-3-6.jomitsch.example.com dynflowd[4203]: Dynflow Executor: start in progress Apr 27 20:54:14 centos7-katello-3-6.jomitsch.example.com dynflowd[4203]: /opt/theforeman/tfm/root/usr/share/gems/gems/daemons-1.2.3/lib/daemons/daemonize.rb:75: warning: conflicti...dir block Apr 27 20:54:14 centos7-katello-3-6.jomitsch.example.com dynflowd[4203]: /opt/theforeman/tfm/root/usr/share/gems/gems/daemons-1.2.3/lib/daemons/daemonize.rb:108: warning: conflict...dir block Apr 27 20:54:15 centos7-katello-3-6.jomitsch.example.com dynflowd[4203]: dynflow_executor: process with pid 4239 started. Apr 27 20:54:15 centos7-katello-3-6.jomitsch.example.com systemd[1]: Started Foreman jobs daemon. Hint: Some lines were ellipsized, use -l to show in full.
When running 'foreman-maintain service disable', foreman-tasks disappears, notice it is not in the list the second time.
[root@centos7-katello-3-6 foreman_maintain]# ./bin/foreman-maintain service disable Running Disable Services ================================================================================ Check if command is run as root user: [OK] -------------------------------------------------------------------------------- Disable applicable services: Disabling the following service(s): postgresql, mongod, qdrouterd, squid, qpidd, pulp_resource_manager, pulp_streamer, pulp_celerybeat, pulp_workers, foreman-proxy, tomcat, foreman-tasks, httpd, puppetserver / All services disabled [OK] -------------------------------------------------------------------------------- [root@centos7-katello-3-6 foreman_maintain]# ./bin/foreman-maintain service disable Running Disable Services ================================================================================ Check if command is run as root user: [OK] -------------------------------------------------------------------------------- Disable applicable services: Disabling the following service(s): postgresql, mongod, qdrouterd, squid, qpidd, pulp_resource_manager, pulp_streamer, pulp_celerybeat, pulp_workers, foreman-proxy, tomcat, httpd, puppetserver | All services disabled [OK] --------------------------------------------------------------------------------
foreman-tasks is no longer present
[root@centos7-katello-3-6 foreman_maintain]# systemctl status foreman-tasks Unit foreman-tasks.service could not be found.
Updated by John Mitsch over 6 years ago
It looks like this actually isn't related to foreman-maintain and foreman-tasks can't be reenabled or found after being disabled?
[root@centos7-katello-3-6 ~]# systemctl status foreman-tasks ● dynflowd.service - Foreman jobs daemon Loaded: loaded (/usr/lib/systemd/system/dynflowd.service; enabled; vendor preset: disabled) Active: active (running) since Fri 2018-04-27 21:04:52 UTC; 53s ago Docs: https://theforeman.org Process: 832 ExecStart=/usr/sbin/dynflowd start (code=exited, status=0/SUCCESS) CGroup: /system.slice/dynflowd.service ├─1958 dynflow_executor └─1961 dynflow_executor_monitor Apr 27 21:04:50 centos7-katello-3-6.jomitsch.example.com dynflowd[832]: /usr/share/foreman/lib/foreman.rb:8: warning: already initialized constant Foreman::UUID_REGEXP Apr 27 21:04:50 centos7-katello-3-6.jomitsch.example.com dynflowd[832]: /usr/share/foreman/lib/foreman.rb:8: warning: previous definition of UUID_REGEXP was here Apr 27 21:04:50 centos7-katello-3-6.jomitsch.example.com dynflowd[832]: /usr/share/foreman/lib/core_extensions.rb:183: warning: already initialized constant ActiveSupport::Message...LT_CIPHER Apr 27 21:04:50 centos7-katello-3-6.jomitsch.example.com dynflowd[832]: /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.4/lib/active_support/message_encryptor... was here Apr 27 21:04:50 centos7-katello-3-6.jomitsch.example.com dynflowd[832]: /opt/theforeman/tfm/root/usr/share/gems/gems/logging-1.8.2/lib/logging/appender.rb:139: warning: constant :...eprecated Apr 27 21:04:50 centos7-katello-3-6.jomitsch.example.com dynflowd[832]: Dynflow Executor: start in progress Apr 27 21:04:51 centos7-katello-3-6.jomitsch.example.com dynflowd[832]: /opt/theforeman/tfm/root/usr/share/gems/gems/daemons-1.2.3/lib/daemons/daemonize.rb:75: warning: conflictin...dir block Apr 27 21:04:51 centos7-katello-3-6.jomitsch.example.com dynflowd[832]: /opt/theforeman/tfm/root/usr/share/gems/gems/daemons-1.2.3/lib/daemons/daemonize.rb:108: warning: conflicti...dir block Apr 27 21:04:51 centos7-katello-3-6.jomitsch.example.com dynflowd[832]: dynflow_executor: process with pid 1958 started. Apr 27 21:04:52 centos7-katello-3-6.jomitsch.example.com systemd[1]: Started Foreman jobs daemon. Hint: Some lines were ellipsized, use -l to show in full. [root@centos7-katello-3-6 ~]# systemctl disable foreman-tasks Removed symlink /etc/systemd/system/multi-user.target.wants/dynflowd.service. Removed symlink /etc/systemd/system/foreman-tasks.service. [root@centos7-katello-3-6 ~]# systemctl status foreman-tasks Unit foreman-tasks.service could not be found. [root@centos7-katello-3-6 ~]# systemctl enable foreman-tasks Failed to execute operation: No such file or directory
Updated by Ivan Necas over 6 years ago
It seems it's due to fact that `foreman-tasks` is just an alias here, for compatibility reasons. In Foreman 1.18+, `dynflowd` name should be used instead.
Updated by John Mitsch over 6 years ago
Looks like changing to dynflowd works, however we will have to handle the different versions of katello/satellite using different service names. From an irc convo
aruzicka_ jomitsch: if I'm reading this right it (dynflowd) wasn't added through foreman-tasks
but it was added in foreman 1.17rc1
Updated by The Foreman Bot over 6 years ago
- Pull request https://github.com/theforeman/foreman_maintain/pull/175 added
Updated by John Mitsch over 6 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
Applied in changeset foreman_maintain|789d28be6d63c6329f929c2da46b8ed93fadcd9c.