Jira (PUP-9021) [Resource Type: service][Enhancement] Allow a Systemd service to be reload from a notify instead of restart
Title: Message Title Eric Sorenson commented on PUP-9021 Re: [Resource Type: service][Enhancement] Allow a Systemd service to be reload from a notify instead of restart Good idea. This is a duplicate of an old ticket, so I'll link this and close it as a duplicate so we can track your design suggestion. Check out PUP-1054 for the previous discussion on this enhancement request. Add Comment This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-9021) [Resource Type: service][Enhancement] Allow a Systemd service to be reload from a notify instead of restart
Title: Message Title vincent lours updated an issue Puppet / PUP-9021 [Resource Type: service][Enhancement] Allow a Systemd service to be reload from a notify instead of restart Change By: vincent lours *Module Version:* Resource Type: service*Puppet Version:* Puppet Enterprise agent, all versions before 2018.1.2*OS Name/Version:* Centos 7Can you add *an option* to allow a Systemd service to be reloaded instead of restarted when Notify (refreshable).Because some of the Systemd service have a reload option to avoid the service to be restarted, and only reload the config. As example "_httpd_", that you want to keep alive instead of killing/starting all children process.*Desired Behavior:* Something like: {code}notify => Service[httpd = { 'option' :refresh_option => 'reload'}, service2, service3 = {'option' => 'restart'} ] {code}which can be checked in /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type/service.rb filewith something like _(It's just an example as I'm not a Ruby expert and I was not able to follow the full workflow of the Resource Type Service)_:{code} feature :refreshable, "The provider can restart the service.", :methods => :refreshable[ 'option' :refresh_option ] == 'reload' ? [:reload] : [:restart]{code}And match a new function in /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider/service/systemd.rb{code} def reloadcmddaemon_reload? #This line can be a new feature requested from PUP-3483[command(:systemctl), "reload", @resource[:name]] end def reloadbegin superrescue Puppet::Error => e raise Puppet::Error.new(prepare_error_message(@resource[:name], 'restart', e))end end{code}*Actual Behavior:* notify => Service[httpd] Which has only one action defined in the puppet agent code: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type/service.rb{code} Type.newtype(:service) do@doc = "Manage running services. Service support unfortunately varies widely by platform --- some platforms have very little if any concept of a running service, and some have a very codified and powerful concept. Puppet's service support is usually capable of doing the right thing, but the more information you can provide, the better behaviour you will get. Puppet 2.7 and newer expect init scripts to have a working status command. If this isn't the case for any of your services' init scripts, you will need to set `hasstatus` to false and possibly specify a custom status command in the `status` attribute. As a last resort, Puppet will attempt to search the process table by calling whatever command is listed in the `ps` fact. The default search pattern is the name of the service, but you can specify it with the `pattern` attribute. **Refresh:** `service` resources can respond to refresh events (via `notify`, `subscribe`, or the `~>` arrow). If a `service` receives an event from another resource, Puppet will restart the service it manages. The actual command used to rest
Jira (PUP-9021) [Resource Type: service][Enhancement] Allow a Systemd service to be reload from a notify instead of restart
Title: Message Title vincent lours updated an issue Puppet / PUP-9021 [Resource Type: service][Enhancement] Allow a Systemd service to be reload from a notify instead of restart Change By: vincent lours *Module Version:* Resource Type: service*Puppet Version:* Puppet Enterprise agent, all versions before 2018.1.2*OS Name/Version:* Centos 7Can you add *an option* to allow a Systemd service to be reloaded instead of restarted when Notify (refreshable).Because some of the Systemd service have a reload option to avoid the service to be restarted, and only reload the config. As example "_httpd_", that you want to keep alive instead of killing/starting all children process.*Desired Behavior:* Something like: {code}notify => Service[httpd = {:refresh_option => 'reload'}, service2, service3 = { 'option' :refresh_option => 'restart'} ] {code}which can be checked in /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type/service.rb filewith something like _(It's just an example as I'm not a Ruby expert and I was not able to follow the full workflow of the Resource Type Service)_:{code} feature :refreshable, "The provider can restart the service.", :methods => :refreshable[:refresh_option] == 'reload' ? [:reload] : [:restart]{code}And match a new function in /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider/service/systemd.rb{code} def reloadcmddaemon_reload? #This line can be a new feature requested from PUP-3483[command(:systemctl), "reload", @resource[:name]] end def reloadbegin superrescue Puppet::Error => e raise Puppet::Error.new(prepare_error_message(@resource[:name], 'restart', e))end end{code}*Actual Behavior:* notify => Service[httpd] Which has only one action defined in the puppet agent code: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type/service.rb{code} Type.newtype(:service) do@doc = "Manage running services. Service support unfortunately varies widely by platform --- some platforms have very little if any concept of a running service, and some have a very codified and powerful concept. Puppet's service support is usually capable of doing the right thing, but the more information you can provide, the better behaviour you will get. Puppet 2.7 and newer expect init scripts to have a working status command. If this isn't the case for any of your services' init scripts, you will need to set `hasstatus` to false and possibly specify a custom status command in the `status` attribute. As a last resort, Puppet will attempt to search the process table by calling whatever command is listed in the `ps` fact. The default search pattern is the name of the service, but you can specify it with the `pattern` attribute. **Refresh:** `service` resources can respond to refresh events (via `notify`, `subscribe`, or the `~>` arrow). If a `service` receives an event from another resource, Puppet will restart the service it manages. The actual command used to restart
Jira (PUP-9021) [Resource Type: service][Enhancement] Allow a Systemd service to be reload from a notify instead of restart
Title: Message Title vincent lours updated an issue Puppet / PUP-9021 [Resource Type: service][Enhancement] Allow a Systemd service to be reload from a notify instead of restart Change By: vincent lours *Module Version:* Resource Type: service*Puppet Version:* Puppet Enterprise agent, all versions before 2018.1.2*OS Name/Version:* Centos 7Can you add *an option* to allow a Systemd service to be reloaded instead of restarted when Notify (refreshable).Because some of the Systemd service have a reload option to avoid the service to be restarted, and only reload the config. As example "_httpd_", that you want to keep alive instead of killing/starting all children process.*Desired Behavior:* Something like: {code}notify => Service[httpd , = {'option' => ' reload '}, service2, service3 = {'option' => 'restart'} ] {code}which can be checked in /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type/service.rb filewith something like _(It's just an example as I'm not a Ruby expert and I was not able to follow the full workflow of the Resource Type Service)_:{code} feature :refreshable, "The provider can restart the service.", :methods => :refreshable[ 1 'option' ] == 'reload' ? [:reload] : [:restart]{code}And match a new function in /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider/service/systemd.rb{code} def reloadcmddaemon_reload? #This line can be a new feature requested from PUP-3483[command(:systemctl), "reload", @resource[:name]] end def reloadbegin superrescue Puppet::Error => e raise Puppet::Error.new(prepare_error_message(@resource[:name], 'restart', e))end end{code}*Actual Behavior:* notify => Service[httpd] Which has only one action defined in the puppet agent code: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type/service.rb{code} Type.newtype(:service) do@doc = "Manage running services. Service support unfortunately varies widely by platform --- some platforms have very little if any concept of a running service, and some have a very codified and powerful concept. Puppet's service support is usually capable of doing the right thing, but the more information you can provide, the better behaviour you will get. Puppet 2.7 and newer expect init scripts to have a working status command. If this isn't the case for any of your services' init scripts, you will need to set `hasstatus` to false and possibly specify a custom status command in the `status` attribute. As a last resort, Puppet will attempt to search the process table by calling whatever command is listed in the `ps` fact. The default search pattern is the name of the service, but you can specify it with the `pattern` attribute. **Refresh:** `service` resources can respond to refresh events (via `notify`, `subscribe`, or the `~>` arrow). If a `service` receives an event from another resource, Puppet will restart the service it manages. The actual command used to restart the service depends on
Jira (PUP-9021) [Resource Type: service][Enhancement] Allow a Systemd service to be reload from a notify instead of restart
Title: Message Title vincent lours updated an issue Puppet / PUP-9021 [Resource Type: service][Enhancement] Allow a Systemd service to be reload from a notify instead of restart Change By: vincent lours *Module Version:* Resource Type: service*Puppet Version:* Puppet Enterprise agent, all versions before 2018.1.2*OS Name/Version:* Centos 7Can you add *an option* to allow a Systemd service to be reloaded instead of restarted when Notify (refreshable).Because some of the Systemd service have a reload option to avoid the service to be restarted, and only reload the config. As example "_httpd_", that you want to keep alive instead of killing/starting all children process.*Desired Behavior:* Something like: {code}notify => Service[httpd, reload] {code}which can be checked in /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type/service.rb filewith something like _(It's just an example as I'm not a Ruby expert and I was not able to follow the full workflow of the Resource Type Service)_:{code} feature :refreshable, "The provider can restart the service.", :methods => :refreshable[1] == 'reload' ? [:reload] : [:restart]{code}And match a new function in /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider/service/systemd.rb{code} def reloadcmddaemon_reload? #This line can be a new feature requested from PUP-3483[command(:systemctl), "reload", @resource[:name]] end def reloadbegin superrescue Puppet::Error => e raise Puppet::Error.new(prepare_error_message(@resource[:name], 'restart', e))end end{code}*Actual Behavior:* notify => Service[httpd] Which has only one action defined in the puppet agent code: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type/service.rb{code} Type.newtype(:service) do@doc = "Manage running services. Service support unfortunately varies widely by platform --- some platforms have very little if any concept of a running service, and some have a very codified and powerful concept. Puppet's service support is usually capable of doing the right thing, but the more information you can provide, the better behaviour you will get. Puppet 2.7 and newer expect init scripts to have a working status command. If this isn't the case for any of your services' init scripts, you will need to set `hasstatus` to false and possibly specify a custom status command in the `status` attribute. As a last resort, Puppet will attempt to search the process table by calling whatever command is listed in the `ps` fact. The default search pattern is the name of the service, but you can specify it with the `pattern` attribute. **Refresh:** `service` resources can respond to refresh events (via `notify`, `subscribe`, or the `~>` arrow). If a `service` receives an event from another resource, Puppet will restart the service it manages. The actual command used to restart the service depends on the platform and can be configured: * If you set `hasrestart` to tru
Jira (PUP-9021) [Resource Type: service][Enhancement] Allow a Systemd service to be reload from a notify instead of restart
Title: Message Title vincent lours updated an issue Puppet / PUP-9021 [Resource Type: service][Enhancement] Allow a Systemd service to be reload from a notify instead of restart Change By: vincent lours *Module Version:* Resource Type: service*Puppet Version:* Puppet Enterprise agent, all versions before 2018.1.2*OS Name/Version:* Centos 7Can you add *an option* to allow a Systemd service to be reloaded instead of restarted when Notify (refreshable).Because some of the Systemd service have a reload option to avoid the service to be restarted, and only reload the config. As example "_httpd_", that you want to keep alive instead of killing/starting all children process.*Desired Behavior:* Something like: {code}notify => Service[httpd, reload] or notify => Service[httpd = { option => reload}]{ code}which can be checked in /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type/service.rb something like _(It's just an example as I'm not a Ruby expert and I was not able to follow the full workflow of the Resource Type Service)_:{code} feature :refreshable, "The provider can restart the service.", if : refreshable[1] == 'reload': methods => [ : reload] else:methods => [:restart] end{code}or{code}feature : refreshable , "The provider can restart the service.", if :refreshable [ 'option' 1 ] == 'reload' :methods => ? [:reload] else : methods => [:restart] end {code} And match a new function in /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider/service/systemd.rb{code} def reloadcmddaemon_reload? #This line can be a new feature requested from PUP-3483[command(:systemctl), "reload", @resource[:name]] end def reloadbegin superrescue Puppet::Error => e raise Puppet::Error.new(prepare_error_message(@resource[:name], 'restart', e))end end{code}*Actual Behavior:* notify => Service[httpd] Which has only one action defined in the puppet agent code: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type/service.rb{code} Type.newtype(:service) do@doc = "Manage running services. Service support unfortunately varies widely by platform --- some platforms have very little if any concept of a running service, and some have a very codified and powerful concept. Puppet's service support is usually capable of doing the right thing, but the more information you can provide, the better behaviour you will get. Puppet 2.7 and newer expect init scripts to have a working status command. If this isn't the case for any of your services' init scripts, you will need to set `hasstatus` to false and possibly specify a custom status command in the `status` attribute. As a last resort, Puppet will attempt to search the process table by calling whatever command is listed in the `ps` fact. The default search pattern is the name of the service, but you can specify it with the `pattern` attribute. **Refresh:** `service` resources can respond to r
Jira (PUP-9021) [Resource Type: service][Enhancement] Allow a Systemd service to be reload from a notify instead of restart
Title: Message Title vincent lours updated an issue Puppet / PUP-9021 [Resource Type: service][Enhancement] Allow a Systemd service to be reload from a notify instead of restart Change By: vincent lours *Module Version:* Resource Type: service*Puppet Version:* Puppet Enterprise agent, all versions before 2018.1.2*OS Name/Version:* Centos 7Can you add *an option* to allow a Systemd service to be reloaded instead of restarted when Notify (refreshable).Because some of the Systemd service have a reload option to avoid the service to be restarted, and only reload the config. As example "_httpd_", that you want to keep alive instead of killing/starting all children process.*Desired Behavior:* Something like: {code}notify => Service[httpd, reload] or notify => Service[httpd = {option => reload}]{code}which can be checked in /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type/service.rb something like _(It's just an example as I'm not a Ruby expert and I was not able to follow the full workflow of the Resource Type Service)_:{code}feature :refreshable, "The provider can restart the service.", if :refreshable[ 1] == ' reload':methods => [:reload] else:methods => [:restart] end{code}or{code}feature :refreshable, "The provider can restart the service.", if :refreshable[' option'] == 'reload':methods => [:reload] else:methods => [:restart] end{code}And match a new function in /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider/service/systemd.rb{code} def reloadcmddaemon_reload? #This line can be a new feature requested from PUP-3483[command(:systemctl), "reload", @resource[:name]] end def reloadbegin superrescue Puppet::Error => e raise Puppet::Error.new(prepare_error_message(@resource[:name], 'restart', e))end end{code}*Actual Behavior:* notify => Service[httpd] Which has only one action defined in the puppet agent code: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type/service.rb{code} Type.newtype(:service) do@doc = "Manage running services. Service support unfortunately varies widely by platform --- some platforms have very little if any concept of a running service, and some have a very codified and powerful concept. Puppet's service support is usually capable of doing the right thing, but the more information you can provide, the better behaviour you will get. Puppet 2.7 and newer expect init scripts to have a working status command. If this isn't the case for any of your services' init scripts, you will need to set `hasstatus` to false and possibly specify a custom status command in the `status` attribute. As a last resort, Puppet will attempt to search the process table by calling whatever command is listed in the `ps` fact. The default search pattern is the name of the service, but you can specify it with the `pattern` attribute. **Refresh:** `service` resources can respond to refresh events (via `noti
Jira (PUP-9021) [Resource Type: service][Enhancement] Allow a Systemd service to be reload from a notify instead of restart
Title: Message Title vincent lours commented on PUP-9021 Re: [Resource Type: service][Enhancement] Allow a Systemd service to be reload from a notify instead of restart The Issue PUP-3483 - "Systemd provider doesn't scan for changed units" was the initial reference for my Systemd enhancement. I've submitted a updated code to fix the "deamon-reload" refresh on Systemd Servers. Which make me thought about the missing reload from systemd services. Add Comment This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-9021) [Resource Type: service][Enhancement] Allow a Systemd service to be reload from a notify instead of restart
Title: Message Title vincent lours created an issue Puppet / PUP-9021 [Resource Type: service][Enhancement] Allow a Systemd service to be reload from a notify instead of restart Issue Type: New Feature Assignee: Unassigned Components: Types and Providers Created: 2018/07/26 5:29 AM Environment: All OS using the provider systemd Priority: Normal Reporter: vincent lours Module Version: Resource Type: service Puppet Version: Puppet Enterprise agent, all versions before 2018.1.2 OS Name/Version: Centos 7 Can you add an option to allow a Systemd service to be reloaded instead of restarted when Notify (refreshable). Because some of the Systemd service have a reload option to avoid the service to be restarted, and only reload the config. As example "httpd", that you want to keep alive instead of killing/starting all children process. Desired Behavior: Something like: notify => Service[httpd, reload] or notify => Service[httpd{option => reload}]