Signed-off-by: Raffael Schmid <raf@nine.ch>
···
From: Raffael Schmid
---
app/models/report_common.rb | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/app/models/report_common.rb b/app/models/report_common.rb
index 31355b4…b1f8560 100644
— a/app/models/report_common.rb
+++ b/app/models/report_common.rb
@@ -22,9 +22,14 @@ module ReportCommon
end
end
-
returns true if the run failed when compiling the catalog
- def are_there_errors?
- self.logs.find_all_by_level_id(4).length > 0
- end
-
returns true if total error metrics are > 0
def error?
- %w[failed failed_restarts].sum {|f| status f} > 0
- %w[failed failed_restarts].sum {|f| status f} > 0 || are_there_errors?
end
returns true if total action metrics are > 0
–
1.7.5.4
> From: Raffael Schmid <raf@nine.ch>
>
>
> Signed-off-by: Raffael Schmid <raf@nine.ch>
> —
> app/models/report_common.rb | 7 +++++±
> 1 files changed, 6 insertions(+), 1 deletions(-)
>
> diff --git a/app/models/report_common.rb b/app/models/report_common.rb
> index 31355b4…b1f8560 100644
> — a/app/models/report_common.rb
> +++ b/app/models/report_common.rb
> @@ -22,9 +22,14 @@ module ReportCommon
> end
> end
>
> + # returns true if the run failed when compiling the catalog
> + def are_there_errors?
> + self.logs.find_all_by_level_id(4).length > 0
> + end
> +
Hi Raffael,
doesnt it imply we are importing the report incorrectly in the first
place? do you have such report that we could figure out why its not
tagged with error?
thanks
Ohad
···
On Wed, Nov 30, 2011 at 3:17 PM, wrote:
> # returns true if total error metrics are > 0
> def error?
> - %w[failed failed_restarts].sum {|f| status f} > 0
> + %w[failed failed_restarts].sum {|f| status f} > 0 || are_there_errors?
> end
>
> # returns true if total action metrics are > 0
> --
> 1.7.5.4
>
>
Hi Ohad
> doesnt it imply we are importing the report incorrectly in the
> first place? do you have such report that we could figure out why
> its not tagged with error?
Erm, yeah. It does
As you rely on the content of
self.class.report_status which contains the actions the node did.
If you call inspect on ReportCommon.status, it looks like
{"failed"=>0, "restarted"=>0, "skipped"=>0, "applied"=>0,
"failed_restarts"=>0}
for such a report. Which means, it did not fail… It did just nothing 
I attached such a report.
regards
raf
201111301635.yaml (4.9 KB)
···
On 11/30/11 17:18, Ohad Levy wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi Ohad
>
> any news on this one?
Sorry not yet, Didnt get to it yet 
···
On Fri, Dec 2, 2011 at 10:28 AM, Raffael Schmid wrote:
regards
raf
On 11/30/2011 05:45 PM, Raffael Schmid wrote:
Hi Ohad
On 11/30/11 17:18, Ohad Levy wrote:
doesnt it imply we are importing the report incorrectly in the
first place? do you have such report that we could figure out
why its not tagged with error?
Erm, yeah. It does
As you rely on the content of
self.class.report_status which contains the actions the node did.
If you call inspect on ReportCommon.status, it looks like
{“failed”=>0, “restarted”=>0, “skipped”=>0, “applied”=>0,
“failed_restarts”=>0}
for such a report. Which means, it did not fail… It did just
nothing 
I attached such a report.
regards raf
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQIcBAEBAgAGBQJO2IwsAAoJEF5WQ0UvdVsPUCIP/j/YYQyoBUMmbPplqs+tGqtl
Gb8kQL6Tdhj67NN3L0yQLzbZGT/lGWZIHv0P+mTJ3U2fmFvSFYlBkU/R8dT2Q3AK
REEv7EU9Yx1Dh7yzUS7USZVVgXrxoNiMPF8nK21s6wl2Xf/tKBR/xWflk1/8xBSb
yPnKlWcmKDcxOIh++JiPQGdq27q06gVTFfRG8O1rWWX4KbMS6GdsGmadR5ooRrvb
+UheWOPcBce1rdEbdDvqe/IR+GOQZIzipPWpNcvgrTShKUlpLlUoDCKrU+LBtUf4
xh1HlK0NznP2BeyWZfWTdOOyN3uaLl7aI8s+sjtP9faz1u7X+CLA9yXyU/oAHuDv
o2uKsNTzHLA/PPZWYMnFEp9B1vtzwyZ/1eEyyqfG9WQ8YTebqkrUx44BnXP+0zQC
/oG3kLMV1wWK6RCVpe9K1zIqSoz0nDXGjdH2yi8IiXGpL71F6J2HbgDo+v+M60s6
fWIMUjnibZ8ys61/vTU6/Lvjk7i5aRfEwwApcWYGUh6NvevqF2Elp2LPntFfeac/
JxNZgBH02Gg6oapyafArktE9OOAPNBnnUBjHRzq9G++cG31deG+W2axpbGxKEEsU
wmJU207Qvy8LpBaKe0M3DUoVPRoRT4W327UaPYmuuNMg37LM6Srmi3FezhRyJuyA
i+v83k0v3QlGxShYymhr
=NnIx
-----END PGP SIGNATURE-----
Hi Ohad
> any news on this one?
>> Sorry not yet, Didnt get to it yet 
Any news now? 
Sorry for asking again, but as we use tagmail at the moment we get a
lot of "false-alerts" (see http://projects.puppetlabs.com/issues/4694
for this). So we wanted to use foreman for this, but in the current
state, this won't work out…
You see, this is quite important for us.
Is there a way I could help you?
Regards
raf
···
On 12/06/11 08:47, Ohad Levy wrote: