Issue #17507 has been updated by John Bollinger.
Jo Rhett wrote: > If you setup a schedule such that packages are only installed certain hours > of the day, well, that part works. They won't install until that time. > However, if you have a policy that depends on the package being installed, if > it is NOT installed due to the schedule, it satisfies the Require and > everything else happens. I'm going to call this misfeature: "No package? No > Problem! ":( I think this is pretty clearly a bug. Although I can imagine people writing code depending on this undocumented behavior (on purpose, even), it would be more consistent and less surprising for synchronization of a resource to fail if one of the resources that must be applied before it is excluded from application by a schedule. If that makes it it somewhat (more) perilous to set up relationships with scheduled resources then so be it; schedules have always been an imperfectly-fitting feature. John ---------------------------------------- Bug #17507: Require of a Package is satisfied when the Package is NOT installed due to a schedule https://projects.puppetlabs.com/issues/17507#change-76111 Author: Jo Rhett Status: Unreviewed Priority: Normal Assignee: Category: package Target version: 2.7.20 Affected Puppet version: 2.7.19 Keywords: Branch: If you setup a schedule such that packages are only installed certain hours of the day, well, that part works. They won't install until that time. However, if you have a policy that depends on the package being installed, if it is NOT installed due to the schedule, it satisfies the Require and everything else happens. I'm going to call this misfeature: "No package? No Problem! ":( Example: with this example, if you apply the policy after 8pm (if you are using UTC like we are, that's noon PST) then it will actually install the configuration files and attempt to start the service. This is clearly a bug. Given some multi-application interactions, this could cause a major service outage. (I didn't find this with snmp but instead with some inhouse system components. I replicated it with this config before reporting it) I observed this on 2.7.19 but checking the sources it appears likely to be a problem with 3.0 as well. <pre>site.pp: # Schedule in the early part of the working day (not peak) schedule { 'early-day': range => '17 - 20', period => daily, periodmatch => number, } Package { schedule => 'early-day', } node default { class { snmpd: } } class snmpd { package { 'net-snmp': ensure => present, alias => 'snmpd', } package { 'net-snmp-perl': ensure => present, require => Package['net-snmp'], } file { "/etc/sysconfig/snmpd": owner => root, group => root, mode => 0755, source => 'puppet:///modules/snmpd/snmpd.sysconfig', require => Package['net-snmp'], notify => Service['snmpd'], } file { '/etc/snmp/snmpd.conf': ensure => file, owner => root, group => root, mode => 0755, content => template('snmpd/snmpd.conf'), require => Package['net-snmp'], notify => Service['snmpd'], } service { 'snmpd': ensure => running, enable => true, require => Package['net-snmp','net-snmp-perl'], } }</pre> -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
