On Tue, Jul 21, 2015 at 12:36 PM, Branan Riley <[email protected]> wrote:
> <This is email 1/2 inspired by PUP-4813> > > Currently, if a catalog fails after some resources have been applied > but ouside of an individual resource, the error handling is something > like this: > > * puppet agent with --detailed-exitcodes will return '1'. This > abandons any actual detailed exit information > > * The report will not be marked as failed. This is pretty obviously bad. > > * No further resources are applied. > > I've confirmed this will happen when a prefetch fails, and it looks as > though it will also occur when an eval_generate fails. There are > probably others. > > For the prefetch case I'd like to see improved error handling baked > in, and will be sending out another email shortly. For the more > general case, I think the following two small changes are worthwhile: > > * Add 3, 5, and 7 to --detailed-exitcodes. This will indicate that the > entire catalog was aborted, but that resource changes or failures > had also occured. It's important to note that this will ONLY > introduce new exitcodes in the case where we'd currently return > 1. Any case that would return a 2, 4, or 6 would still do so. > > * Make sure the report is marked as failed anytime the agent would > exit with one of those exit codes > > I feeel like these are pretty straightforward, but I figured there > would be lots of tools that make assumptions about our reporting and > wanted to get a bit of feedback before moving forward. > +1 on this. Re assumptions, the worst I could imagine is someone not realizing that detailed-exitcodes returns a *bitmask* and checking for just 1 (as opposed to return_value & 1). But that would be a bug in their code and would be trivially fixed. While we're at it, we should clarify the docs re --detailed-exitcodes. It's *implemented* as a bitmask but the docs don't mention that and instead say what 2, 4, and 6 means. Kylo > Thanks, > Branan Riley > Puppet Labs Software Engineer > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Developers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/puppet-dev/CADWDnr%3D_suvrcgCsr%2BhJVG71NiJCab1bs6jQSm76w4CFMmsxgA%40mail.gmail.com > <https://groups.google.com/d/msgid/puppet-dev/CADWDnr%3D_suvrcgCsr%2BhJVG71NiJCab1bs6jQSm76w4CFMmsxgA%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Kylo Ginsberg | [email protected] | irc: kylo | twitter: @kylog *PuppetConf 2015 <http://2015.puppetconf.com/> is coming to Portland, Oregon! Join us October 5-9.* *Register now to take advantage of the Early Bird discount <https://www.eventbrite.com/e/puppetconf-2015-october-5-9-tickets-13115894995?discount=EarlyBird> * *—**save $249!* -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-dev/CALsUZFEgg3fThmYktqH2pbucWNTwErcFAXmEc5z52%2BNPoY8xmw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
