Host status / cached catalog

> Hi every one,
>
> I have a question about the status displayed on the host list page and the
> cached catalog usage un puppet.
>
>
> Here is a practical exemple of my issue :
>
> * A host could not retrieve catalog due to a syntax error on the puppet
> master.
> * So it use the cached catalog
> * And skip the run
>
> When displaying the report of the host, the first and third line, as
> described above, are leveled as "error".
> However, the host status remain to "no change" and is displayed "green" in
> the list.

I think that if puppet succeeded in running on a cached catalog (even
though it failed to retrieve remote catalog) the run as a whole is
considered successful. There is a puppet.conf setting for the agent
that would probably change this behaviour if you wanted:

# Whether to use the cached configuration when the remote
# configuration will not compile.  This option is useful for testing
# new configurations, where you want to fix the broken configuration
# rather than reverting to a known-good one.
# The default value is 'true'.
# usecacheonfailure = true

> How can I set the foreman to warn me if the run is skipped, or the catalog
> can't be retreived ?
> Or, why these actions are detected as error in reports but not displayed so?

I can't say unless I examine the reporting code which I don't have
time to do right now. Open a Foreman bug/feature request if you want
the behaviour in a specific way.

··· On Thu, Jun 7, 2012 at 7:46 PM, xkrantz wrote:


Mikael

Thanks Mikael,

I was aware about the "usecacheonfailure" option, I will try it as soon as
possible and make a feed back on it.

I will also open a feature/bug request if needed…

Thanks again,

··· Le lundi 11 juin 2012 17:15:36 UTC+2, Mikael Fridh a écrit : > > On Thu, Jun 7, 2012 at 7:46 PM, xkrantz wrote: > > Hi every one, > > > > I have a question about the status displayed on the host list page and > the > > cached catalog usage un puppet. > > > > > > Here is a practical exemple of my issue : > > > > * A host could not retrieve catalog due to a syntax error on the puppet > > master. > > * So it use the cached catalog > > * And skip the run > > > > When displaying the report of the host, the first and third line, as > > described above, are leveled as "error". > > However, the host status remain to "no change" and is displayed "green" > in > > the list. > > I think that if puppet succeeded in running on a cached catalog (even > though it failed to retrieve remote catalog) the run as a whole is > considered successful. There is a puppet.conf setting for the agent > that would probably change this behaviour if you wanted: > > # Whether to use the cached configuration when the remote > # configuration will not compile. This option is useful for testing > # new configurations, where you want to fix the broken configuration > # rather than reverting to a known-good one. > # The default value is 'true'. > # usecacheonfailure = true > > > > How can I set the foreman to warn me if the run is skipped, or the > catalog > > can't be retreived ? > > Or, why these actions are detected as error in reports but not displayed > so? > > I can't say unless I examine the reporting code which I don't have > time to do right now. Open a Foreman bug/feature request if you want > the behaviour in a specific way. > > -- > Mikael >

Hi Again !

I have set in every puppet agent configuration "usecacheonfailure = false"
but I still have the issue.

  • Server is flaged as synced (Green)
  • When I list details about the last report I can see some entries flaged
    as Error from the master (can not compile catalog), but the global status
    of the server is still green.

It seems that Foreman do not handle complete skip of puppet run.

What can I do ?

··· Le mardi 12 juin 2012 23:53:08 UTC+2, xkrantz a écrit : > > > Thanks Mikael, > > I was aware about the "usecacheonfailure" option, I will try it as soon as > possible and make a feed back on it. > > I will also open a feature/bug request if needed.. > > Thanks again, > > > > Le lundi 11 juin 2012 17:15:36 UTC+2, Mikael Fridh a écrit : >> >> On Thu, Jun 7, 2012 at 7:46 PM, xkrantz wrote: >> > Hi every one, >> > >> > I have a question about the status displayed on the host list page and >> the >> > cached catalog usage un puppet. >> > >> > >> > Here is a practical exemple of my issue : >> > >> > * A host could not retrieve catalog due to a syntax error on the puppet >> > master. >> > * So it use the cached catalog >> > * And skip the run >> > >> > When displaying the report of the host, the first and third line, as >> > described above, are leveled as "error". >> > However, the host status remain to "no change" and is displayed "green" >> in >> > the list. >> >> I think that if puppet succeeded in running on a cached catalog (even >> though it failed to retrieve remote catalog) the run as a whole is >> considered successful. There is a puppet.conf setting for the agent >> that would probably change this behaviour if you wanted: >> >> # Whether to use the cached configuration when the remote >> # configuration will not compile. This option is useful for testing >> # new configurations, where you want to fix the broken configuration >> # rather than reverting to a known-good one. >> # The default value is 'true'. >> # usecacheonfailure = true >> >> >> > How can I set the foreman to warn me if the run is skipped, or the >> catalog >> > can't be retreived ? >> > Or, why these actions are detected as error in reports but not >> displayed so? >> >> I can't say unless I examine the reporting code which I don't have >> time to do right now. Open a Foreman bug/feature request if you want >> the behaviour in a specific way. >> >> -- >> Mikael >> >

Does Puppet send a report if the run is completely skipped? If there's
no report, it's not surprising that Foreman does not update.

Greg

··· On 26/07/12 17:35, xkrantz wrote: > Hi Again ! > > I have set in every puppet agent configuration "usecacheonfailure > = false" but I still have the issue. > > * Server is flaged as synced (Green) * When I list details about > the last report I can see some entries flaged as Error from the > master (can not compile catalog), but the global status of the > server is still green. > > It seems that Foreman do not handle complete skip of puppet run. > > What can I do ?

Hi Greg,

It seems that the agent send a report because I can display it in foreman
UI and see some entries flaged as Error.

··· Le jeudi 26 juillet 2012 18:43:06 UTC+2, Greg Sutcliffe a écrit : > > > Does Puppet send a report if the run is completely skipped? If there's > no report, it's not surprising that Foreman does not update. > > Greg > >

That's defintely not the previous report? If so, there's probably a bug
in there somewhere…

Greg

··· On Thu 26 Jul 2012 17:53:48 BST, xkrantz wrote: > Hi Greg, > > It seems that the agent send a report because I can display it in > foreman UI and see some entries flaged as Error.

Hi every body,

I have digged a little more into this problem (as a sysadmin point of view)

  • I use foreman 0.4.2 for the moment
  • My puppet master is 2.6.2 on Debian
  • It use the external report processor to send it to foreman

Puppet master get report from Agent :

Jul 27 "14:38":55 <HOSTNAME> puppet-master[18519]: (//<FQDN>/Puppet) Could
not retrieve catalog; skipping run

Foreman get the report :

Processing ReportsController#create to yml (f0r <IP> at 2012-07-27
14:38:55) [POST]
Parameters: {"report"=>"[FILTERED]", "format"=>"yml", "action"=>"create",
"controller"=>"reports"}
processing report for <FQDN>
Completed in 71ms (View: 0, DB: 45) | 200 OK
[http://foreman/reports/create?format=yml]

In Foreman, using the API to get last report in Json :

"summary":"Success",
"host":"<FQDn>",
"id":63690,
"reported_at":"2012-07-27T13:23:59Z"

So, here is, I suppose, the status of the Host : "summary":"Success"

My Issue here is :

  • When the Master doesn't manage to compile a catalog, the Host is
    unchanged, so he reports success.
  • How ever, foreman manage to flage each log entries from the report and
    this entry is recognized as an Error (I haven't found where in the code the
    flag happen)

So I would like, when a log entry is flagged as an Error, from the run of
the agent or the master compilation, that the server status label change as
Error.
Else, the agent skip sillently the run and the server stay labeled as
"synced" but he is not.

Yes it is more a master / compilation issue. But does it sounds right or
how do you do to ensure that your catalogs runs ?

Thansk all for your answers !

> Hi every body,
>
> I have digged a little more into this problem (as a sysadmin point of view)
>
>
> * I use foreman 0.4.2 for the moment
> * My puppet master is 2.6.2 on Debian
>
afair, this is a limitation of puppet earlier then 2.6.5, can you try with
a recent version and see if it works?

Ohad

··· On Fri, Jul 27, 2012 at 5:07 PM, xkrantz wrote:
  • It use the external report processor to send it to foreman

Puppet master get report from Agent :

Jul 27 “14:38”:55 puppet-master[18519]: (///Puppet) Could
not retrieve catalog; skipping run

Foreman get the report :

Processing ReportsController#create to yml (f0r at 2012-07-27
14:38:55) [POST]
Parameters: {“report”=>"[FILTERED]", “format”=>“yml”,
“action”=>“create”, “controller”=>“reports”}
processing report for
Completed in 71ms (View: 0, DB: 45) | 200 OK [
http://foreman/reports/create?format=yml]

In Foreman, using the API to get last report in Json :

“summary”:“Success”,
“host”:"",
“id”:63690,
“reported_at”:“2012-07-27T13:23:59Z”

So, here is, I suppose, the status of the Host : “summary”:“Success”

My Issue here is :

  • When the Master doesn’t manage to compile a catalog, the Host is
    unchanged, so he reports success.
  • How ever, foreman manage to flage each log entries from the report and
    this entry is recognized as an Error (I haven’t found where in the code the
    flag happen)

So I would like, when a log entry is flagged as an Error, from the run of
the agent or the master compilation, that the server status label change as
Error.
Else, the agent skip sillently the run and the server stay labeled as
"synced" but he is not.

Yes it is more a master / compilation issue. But does it sounds right or
how do you do to ensure that your catalogs runs ?

Thansk all for your answers !


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/foreman-users/-/SISV6KHXBLcJ.

To post to this group, send email to foreman-users@googlegroups.com.
To unsubscribe from this group, send email to
foreman-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/foreman-users?hl=en.

Ok Ohad, I will try with a more recent Puppet master and let you know.

Thanks for the answer by the way :slight_smile:

··· Le vendredi 27 juillet 2012 20:17:44 UTC+2, ohad a écrit : > > > > On Fri, Jul 27, 2012 at 5:07 PM, xkrantz wrote: > >> Hi every body, >> >> I have digged a little more into this problem (as a sysadmin point of >> view) >> >> >> * I use foreman 0.4.2 for the moment >> * My puppet master is 2.6.2 on Debian >> > afair, this is a limitation of puppet earlier then 2.6.5, can you try with > a recent version and see if it works? > > Ohad > >> * It use the external report processor to send it to foreman >> >> >> >> >> Puppet master get report from Agent : >> >> Jul 27 "14:38":55 puppet-master[18519]: (///Puppet) >> Could not retrieve catalog; skipping run >> >> >> >> Foreman get the report : >> >> Processing ReportsController#create to yml (f0r at 2012-07-27 >> 14:38:55) [POST] >> Parameters: {"report"=>"[FILTERED]", "format"=>"yml", >> "action"=>"create", "controller"=>"reports"} >> processing report for >> Completed in 71ms (View: 0, DB: 45) | 200 OK [ >> http://foreman/reports/create?format=yml] >> >> >> >> In Foreman, using the API to get last report in Json : >> >> "summary":"Success", >> "host":"", >> "id":63690, >> "reported_at":"2012-07-27T13:23:59Z" >> >> So, here is, I suppose, the status of the Host : "summary":"Success" >> >> >> >> My Issue here is : >> * When the Master doesn't manage to compile a catalog, the Host is >> unchanged, so he reports success. >> * How ever, foreman manage to flage each log entries from the report >> and this entry is recognized as an Error (I haven't found where in the code >> the flag happen) >> >> >> So I would like, when a log entry is flagged as an Error, from the run of >> the agent or the master compilation, that the server status label change as >> Error. >> Else, the agent skip sillently the run and the server stay labeled as >> "synced" but he is not. >> >> Yes it is more a master / compilation issue. But does it sounds right or >> how do you do to ensure that your catalogs runs ? >> >> >> Thansk all for your answers ! >> >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Foreman users" group. >> To view this discussion on the web visit >> https://groups.google.com/d/msg/foreman-users/-/SISV6KHXBLcJ. >> >> To post to this group, send email to foreman-users@googlegroups.com. >> To unsubscribe from this group, send email to >> foreman-users+unsubscribe@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/foreman-users?hl=en. >> > >