Bug #78
Puppet reports fails with 0.24.4-5 master
| Status: | Closed | Start: | 11/12/2009 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assigned to: | % Done: | 0% |
||
| Category: | Puppet Reports | |||
| Target version: | - | |||
| Backlog: | Difficulity: | |||
| Votes: | 0 |
Description
Both classes changed since puppet v 0.24.4
Used in app/models/report.rb :
Method "report.name" doesn't exist.
Also I got errors with report.metrics method [] :
failed to process report for my_hostname due to:undefined method `[]' for #<Puppet::Util::Metric:0x7fda716a6ed8>
Some datas can't be accessed :
report.metrics["resources"][:failed]
report.metrics["resources"][:skipped]
report.metrics["resources"][:failed_restarts]
report.metrics["changes"][:total]
And the fix (method name and [] dont exists)
46c46
< logger.info "processing report for #{report.name}"
---
logger.info "processing report for #{report.host}"
60c60
< logger.warn "failed to process report for #{report.name} due to:#{e}"
--- logger.warn "failed to process report for #{report.host} due to:#{e}"
103a104,108 resources_failed = resources.values.find { |v| v0 :failed }[2] resources_skipped = resources.values.find { |v| v[0] :skipped }[2] resources_failed_restarts = resources.values.find { |v| v0 :failed_restarts }[2] total_report_changes = report.metrics["changes"].values.find { |v| v[0] :total }[2]
105,106c110,111
< if resources[:failed] + resources[:skipped] + resources[:failed_restarts] + report.metrics["changes"][:total] > 0
< status = resources[:failed] if resources[:failed] > 0
--- if resources_failed + resources_skipped + resources_failed_restarts + total_report_changes > 0 status = resources_failed if resources_failed > 0
110c115
< status |= resources[:skipped] if resources[:skipped] > 0 and report.logs.size >0
--- status |= resources_skipped if resources_skipped > 0 and report.logs.size >0
112c117
< status |= resources[:failed_restarts] << 24 if resources[:failed_restarts] > 0
--- status |= resources_failed_restarts << 24 if resources_failed_restarts > 0
122c127
< log.metrics[type][name]
--- log.metrics[type].values.find { |v| v0 == name }[2]
Related issues
| blocked by Foreman - Refactor #80: Reports data should be accessed in a simple way | Closed | 11/17/2009 |
History
Updated by Ohad Levy over 2 years ago
- Subject changed from Puppet::Transaction::Report and Puppet::Util::Metric changes to Puppet reports fails with 0.24.4 master
- Status changed from New to Assigned
- Target version set to 0.1-3
Updated by Ohad Levy over 2 years ago
- Status changed from Assigned to Ready For Testing
- Assigned to changed from Ohad Levy to Benoit CATTIE
I've made a few changes, can you test it with the version in edge branch works?
http://github.com/ohadlevy/foreman/tree/edge
Thanks
Updated by Ohad Levy over 2 years ago
- Subject changed from Puppet reports fails with 0.24.4 master to Puppet reports fails with 0.24.4-5 master
Updated by Ohad Levy over 2 years ago
- Target version changed from 0.1-3 to 0.1-4
waiting for feedback, pushing a version for now
Updated by Benoit CATTIE over 2 years ago
Hi
i just migrate to puppet 0.25.
i can't test anymore with 0.24.4
Sorry
Updated by Ohad Levy over 2 years ago
- Target version deleted (
0.1-4)
Updated by Ohad Levy over 1 year ago
- Status changed from Ready For Testing to Closed
