Issue #17507 has been updated by Josh Cooper. Status changed from Unreviewed to Accepted Target version changed from 2.7.21 to 3.x
Thanks Jo, yes, clearly some more thought needs to be put into schedules and dependencies. I am retargeting this for 3.x as 2.7.x will only be receiving security fixes. ---------------------------------------- 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-82657 Author: Jo Rhett Status: Accepted Priority: Normal Assignee: Category: package Target version: 3.x 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 unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/puppet-bugs?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
