Issue #7639 has been updated by Jeff Weiss. Status changed from In Topic Branch Pending Review to Merged - Pending Release Target version set to Telly
Thank you for the quick contribution, Sean! Merged in commit [e8d8d6879cf54881bba1f6887162b78b7ab3c7bb](https://github.com/puppetlabs/puppet/commit/e8d8d6879cf54881bba1f6887162b78b7ab3c7bb). ---------------------------------------- Bug #7639: Schedule resource accepts invalid schedules https://projects.puppetlabs.com/issues/7639#change-60484 Author: Josh Cooper Status: Merged - Pending Release Priority: Normal Assignee: Sean Millichamp Category: Target version: Telly Affected Puppet version: Keywords: schedule Branch: https://github.com/puppetlabs/puppet/pull/655 There are some problems with the schedule resource in how it parses and applies ranges: * Resources may span days, even though the code attempts to prevent this. The code ensures that the lower limit hour is less than the upper limit hour, but does not check the minutes and seconds. As a result, a schedule of the form: <pre> schedule { maint: range => "1:2:3 - 1:0:0" } </pre> will result in an upper limit of 1AM tomorrow. In other words, we are spanning days, even though the code tries to prevent it. * If minutes or seconds are omitted, they default to Time.now's minutes and seconds. If you specify a schedule range of the form: "1:59:59 - 1" and Time.now's minutes and/or seconds are less, the same behavior as above can result. As an aside it seems more intuitive that we default minutes and seconds to 0, even though it wouldn't prevent this scenario. -- 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.
