FAQ
Hi,
Is there a tutorial on exceptions and error management in puppet script ?

I read the manual and found information which is confusing for me.

There is the notify function which seems to be executed on agent.

There are functions like notice, alert, fail and so on which are executed on server.

And I read the ErrorLog word.

So how to put all things together, what is the right policy ?

Cordialement,

Bernard Granier
CE Plateforme Système
bernard.granier@morpho.com
01 58 11 32 51

#
" This e-mail and any attached documents may contain confidential or proprietary information. If you are not the intended recipient, you are notified that any dissemination, copying of this e-mail and any attachments thereto or use of their contents by any means whatsoever is strictly prohibited. If you have received this e-mail in error, please advise the sender immediately and delete this e-mail and all attached documents from your computer system."
#

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Search Discussions

  • Ellison Marks at Jan 18, 2013 at 6:07 pm
    Notify is not a function. It is a resource type. It essentially logs on the
    client by putting a message in the client's catalog.

    alert, crit, debug, emerg, err, info, notice and warning are functions.
    They will record a message to the server's log at the specified level.
    Parsing and execution will continue. I did not list the levels in any
    particular order.

    fail is also a function. It is a way to programatically cause a parse
    failure. The error will be logged and execution on the current node will
    stop.

    I'm not sure what you mean about ErrorLog. Where did you see it?
    On Friday, January 18, 2013 5:13:35 AM UTC-8, bernard...@morpho.com wrote:

    Hi,

    Is there a tutorial on exceptions and error management in puppet script ?



    I read the manual and found information which is confusing for me.



    There is the notify function which seems to be executed on agent.



    There are functions like notice, alert, fail and so on which are executed
    on server.



    And I read the ErrorLog word.



    So how to put all things together, what is the right policy ?



    Cordialement,



    Bernard Granier

    CE Plateforme Système

    bernard.granier@morpho.com <javascript:>

    01 58 11 32 51



    #
    " This e-mail and any attached documents may contain confidential or
    proprietary information. If you are not the intended recipient, you are
    notified that any dissemination, copying of this e-mail and any attachments
    thereto or use of their contents by any means whatsoever is strictly
    prohibited. If you have received this e-mail in error, please advise the
    sender immediately and delete this e-mail and all attached documents from
    your computer system."
    #
    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/BwmVPXNfxcgJ.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
  • GRANIER Bernard (MORPHO) at Jan 21, 2013 at 8:47 am
    Hi,

    First, thanks for your answer.

    I am not still aware of a deep understanding of differences between resources and functions, but some tests confirmed what you said.

    A point, with my tests, notify messages are displayed in the reverse order they are written in manifest ...

    I understood that alert, crit, debug, emerg, err, info, notice are functions executed on server during parsing step; the documentation explains that, by default, messages are sent to syslog even if I did not find them.

    Thanks for your details on fail function, I did not understand clearly which effects this function has.

    I found ErrorLog in learning puppet documentation, (Generated on October 24, 2012, from git revision 38e9e6c36310cb4895f51e180890cd3fbbbba28e) page 53/67 : this is a sample of an erb file.

    Sincerly,

    Bernard Granier
    CE Plateforme Système
    bernard.granier@morpho.com
    01 58 11 32 51

    From: puppet-users@googlegroups.com On Behalf Of Ellison Marks
    Sent: Friday, January 18, 2013 7:07 PM
    To: puppet-users@googlegroups.com
    Subject: [Puppet Users] Re: exceptions, error, traces

    Notify is not a function. It is a resource type. It essentially logs on the client by putting a message in the client's catalog.

    alert, crit, debug, emerg, err, info, notice and warning are functions. They will record a message to the server's log at the specified level. Parsing and execution will continue. I did not list the levels in any particular order.

    fail is also a function. It is a way to programatically cause a parse failure. The error will be logged and execution on the current node will stop.

    I'm not sure what you mean about ErrorLog. Where did you see it?

    On Friday, January 18, 2013 5:13:35 AM UTC-8, bernard...@morpho.com wrote:
    Hi,
    Is there a tutorial on exceptions and error management in puppet script ?

    I read the manual and found information which is confusing for me.

    There is the notify function which seems to be executed on agent.

    There are functions like notice, alert, fail and so on which are executed on server.

    And I read the ErrorLog word.

    So how to put all things together, what is the right policy ?

    Cordialement,

    Bernard Granier
    CE Plateforme Système
    bernard.granier@morpho.com<javascript:>
    01 58 11 32 51


    #
    " This e-mail and any attached documents may contain confidential or proprietary information. If you are not the intended recipient, you are notified that any dissemination, copying of this e-mail and any attachments thereto or use of their contents by any means whatsoever is strictly prohibited. If you have received this e-mail in error, please advise the sender immediately and delete this e-mail and all attached documents from your computer system."
    #
    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/BwmVPXNfxcgJ.
    To post to this group, send email to puppet-users@googlegroups.com .
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com .
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
    #
    " This e-mail and any attached documents may contain confidential or proprietary information. If you are not the intended recipient, you are notified that any dissemination, copying of this e-mail and any attachments thereto or use of their contents by any means whatsoever is strictly prohibited. If you have received this e-mail in error, please advise the sender immediately and delete this e-mail and all attached documents from your computer system."
    #

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
  • Ellison Marks at Jan 21, 2013 at 6:07 pm

    On Monday, January 21, 2013 12:47:12 AM UTC-8, bernard...@morpho.com wrote:
    Hi,



    First, thanks for your answer.



    I am not still aware of a deep understanding of differences between
    resources and functions, but some tests confirmed what you said.
    Let me put it this way: A resource manages something on the client. A
    collection of resources is compiled on the server and applied to the
    client. A function is run on the server and works on a manifest before it
    is compiled, sort of like preprocessing.

    A point, with my tests, notify messages are displayed in the reverse order
    they are written in manifest …
    Ordering isn't guaranteed to be anything. The nature of puppet manifests is
    not linear, it is declarative. That is, unless you explicitly specify
    dependencies with before/require parameters, or the -> operator, resources
    will get applied in any order they please.

    I understood that alert, crit, debug, emerg, err, info, notice are
    functions executed on server during parsing step; the documentation
    explains that, by default, messages are sent to syslog even if I did not
    find them.



    Thanks for your details on fail function, I did not understand clearly
    which effects this function has.



    I found ErrorLog in learning puppet documentation, (Generated on October
    24, 2012, from git revision 38e9e6c36310cb4895f51e180890cd3fbbbba28e) page
    53/67 : this is a sample of an erb file.
    That may be referring to an apache directive.
    http://httpd.apache.org/docs/current/mod/core.html#errorlog
    Does it make sense in that context?
    Sincerly,



    Bernard Granier

    CE Plateforme Système

    bernard...@morpho.com <javascript:>

    01 58 11 32 51



    *From:* puppet...@googlegroups.com <javascript:> [mailto:
    puppet...@googlegroups.com <javascript:>] *On Behalf Of *Ellison Marks
    *Sent:* Friday, January 18, 2013 7:07 PM
    *To:* puppet...@googlegroups.com <javascript:>
    *Subject:* [Puppet Users] Re: exceptions, error, traces



    Notify is not a function. It is a resource type. It essentially logs on
    the client by putting a message in the client's catalog.

    alert, crit, debug, emerg, err, info, notice and warning are functions.
    They will record a message to the server's log at the specified level.
    Parsing and execution will continue. I did not list the levels in any
    particular order.

    fail is also a function. It is a way to programatically cause a parse
    failure. The error will be logged and execution on the current node will
    stop.

    I'm not sure what you mean about ErrorLog. Where did you see it?

    On Friday, January 18, 2013 5:13:35 AM UTC-8, bernard...@morpho.com wrote:

    Hi,

    Is there a tutorial on exceptions and error management in puppet script ?



    I read the manual and found information which is confusing for me.



    There is the notify function which seems to be executed on agent.



    There are functions like notice, alert, fail and so on which are executed
    on server.



    And I read the ErrorLog word.



    So how to put all things together, what is the right policy ?



    Cordialement,



    Bernard Granier

    CE Plateforme Système

    bernard.granier@morpho.com

    01 58 11 32 51



    #
    " This e-mail and any attached documents may contain confidential or
    proprietary information. If you are not the intended recipient, you are
    notified that any dissemination, copying of this e-mail and any attachments
    thereto or use of their contents by any means whatsoever is strictly
    prohibited. If you have received this e-mail in error, please advise the
    sender immediately and delete this e-mail and all attached documents from
    your computer system."
    #

    --
    You received this message because you are subscribed to the Google Groups
    "Puppet Users" group.
    To view this discussion on the web visit
    https://groups.google.com/d/msg/puppet-users/-/BwmVPXNfxcgJ.
    To post to this group, send email to puppet...@googlegroups.com<javascript:>
    .
    To unsubscribe from this group, send email to
    puppet-users...@googlegroups.com <javascript:>.
    For more options, visit this group at
    http://groups.google.com/group/puppet-users?hl=en.

    #
    " This e-mail and any attached documents may contain confidential or
    proprietary information. If you are not the intended recipient, you are
    notified that any dissemination, copying of this e-mail and any attachments
    thereto or use of their contents by any means whatsoever is strictly
    prohibited. If you have received this e-mail in error, please advise the
    sender immediately and delete this e-mail and all attached documents from
    your computer system."
    #
    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/XWooEEcFDvIJ.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
  • GRANIER Bernard (MORPHO) at Jan 22, 2013 at 8:32 am
    Hi,

    A great thanks for your answer and for the apache link.

    Sincerly,

    Bernard Granier
    CE Plateforme Système
    bernard.granier@morpho.com
    01 58 11 32 51

    From: puppet-users@googlegroups.com On Behalf Of Ellison Marks
    Sent: Monday, January 21, 2013 7:07 PM
    To: puppet-users@googlegroups.com
    Subject: Re: [Puppet Users] Re: exceptions, error, traces



    On Monday, January 21, 2013 12:47:12 AM UTC-8, bernard...@morpho.com wrote:
    Hi,

    First, thanks for your answer.

    I am not still aware of a deep understanding of differences between resources and functions, but some tests confirmed what you said.
    Let me put it this way: A resource manages something on the client. A collection of resources is compiled on the server and applied to the client. A function is run on the server and works on a manifest before it is compiled, sort of like preprocessing.
    A point, with my tests, notify messages are displayed in the reverse order they are written in manifest ...
    Ordering isn't guaranteed to be anything. The nature of puppet manifests is not linear, it is declarative. That is, unless you explicitly specify dependencies with before/require parameters, or the -> operator, resources will get applied in any order they please.

    I understood that alert, crit, debug, emerg, err, info, notice are functions executed on server during parsing step; the documentation explains that, by default, messages are sent to syslog even if I did not find them.

    Thanks for your details on fail function, I did not understand clearly which effects this function has.

    I found ErrorLog in learning puppet documentation, (Generated on October 24, 2012, from git revision 38e9e6c36310cb4895f51e180890cd3fbbbba28e) page 53/67 : this is a sample of an erb file.
    That may be referring to an apache directive. http://httpd.apache.org/docs/current/mod/core.html#errorlog
    Does it make sense in that context?
    Sincerly,

    Bernard Granier
    CE Plateforme Système
    bernard...@morpho.com<javascript:>
    01 58 11 32 51

    From: puppet...@googlegroups.com<javascript:> On Behalf Of Ellison Marks
    Sent: Friday, January 18, 2013 7:07 PM
    To: puppet...@googlegroups.com<javascript:>
    Subject: [Puppet Users] Re: exceptions, error, traces

    Notify is not a function. It is a resource type. It essentially logs on the client by putting a message in the client's catalog.

    alert, crit, debug, emerg, err, info, notice and warning are functions. They will record a message to the server's log at the specified level. Parsing and execution will continue. I did not list the levels in any particular order.

    fail is also a function. It is a way to programatically cause a parse failure. The error will be logged and execution on the current node will stop.

    I'm not sure what you mean about ErrorLog. Where did you see it?

    On Friday, January 18, 2013 5:13:35 AM UTC-8, bernard...@morpho.com wrote:
    Hi,
    Is there a tutorial on exceptions and error management in puppet script ?

    I read the manual and found information which is confusing for me.

    There is the notify function which seems to be executed on agent.

    There are functions like notice, alert, fail and so on which are executed on server.

    And I read the ErrorLog word.

    So how to put all things together, what is the right policy ?

    Cordialement,

    Bernard Granier
    CE Plateforme Système
    bernard.granier@morpho.com
    01 58 11 32 51


    #
    " This e-mail and any attached documents may contain confidential or proprietary information. If you are not the intended recipient, you are notified that any dissemination, copying of this e-mail and any attachments thereto or use of their contents by any means whatsoever is strictly prohibited. If you have received this e-mail in error, please advise the sender immediately and delete this e-mail and all attached documents from your computer system."
    #
    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/BwmVPXNfxcgJ.
    To post to this group, send email to puppet...@googlegroups.com<javascript:>.
    To unsubscribe from this group, send email to puppet-users...@googlegroups.com<javascript:>.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

    #
    " This e-mail and any attached documents may contain confidential or proprietary information. If you are not the intended recipient, you are notified that any dissemination, copying of this e-mail and any attachments thereto or use of their contents by any means whatsoever is strictly prohibited. If you have received this e-mail in error, please advise the sender immediately and delete this e-mail and all attached documents from your computer system."
    #
    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/XWooEEcFDvIJ.
    To post to this group, send email to puppet-users@googlegroups.com .
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com .
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
    #
    " This e-mail and any attached documents may contain confidential or proprietary information. If you are not the intended recipient, you are notified that any dissemination, copying of this e-mail and any attachments thereto or use of their contents by any means whatsoever is strictly prohibited. If you have received this e-mail in error, please advise the sender immediately and delete this e-mail and all attached documents from your computer system."
    #

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedJan 18, '13 at 1:13p
activeJan 22, '13 at 8:32a
posts5
users2
websitepuppetlabs.com

People

Translate

site design / logo © 2022 Grokbase