Actions
Bug #4333
closedSuspicious code for closing expected reports when target change
Status:
Rejected
Priority:
N/A
Assignee:
Category:
Web - Compliance & node report
Target version:
Pull Request:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:
Description
I falled on that line of code:
.... case Some(serial) if ((serial == newSerial)&&(configs.size > 0)) => // no change if same serial and some config appliable logger.debug("Same serial %s for ruleId %s, and configs presents".format(serial, ruleId)) currentConfigurationsToRemove.remove(ruleId) case Some(serial) if ((serial == newSerial)&&(configs.size == 0)) => // same serial, but no targets // if there is not target, then it need to be closed logger.debug("Same serial, and no configs present") case Some(serial) => // not the same serial logger.debug("Not same serial") confToCreate += conf confToClose += ruleId currentConfigurationsToRemove.remove(ruleId) }
The second pasted case is strange, because the comment seems to say "No config present, I need to do something!" and then, nothing is done. Is that what is expected ?
Updated by Nicolas CHARLES almost 11 years ago
- Status changed from New to Pending technical review
Yes, it is expected !
Be default, all configurations are to be removed ( https://github.com/Normation/rudder/blob/master/rudder-core/src/main/scala/com/normation/rudder/services/reports/ReportingServiceImpl.scala#L85 ), and they "saved" only if they should not be closed
So if there is no target, they need to be closed, so nothing is to be done :)
Updated by Nicolas CHARLES almost 11 years ago
- Status changed from Pending technical review to Rejected
Actions