-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Various bugs encountered during chat in the Slack #irc channel #56
Comments
I'm not sure I clearly understand the problem, @myii I'm interested in seeing code which breaks tests. In any case seems an important bug, which justifies making any breaking change to fix it. |
@daks I've provided examples of all four problems below; it wouldn't be much effort to write small verification tests in InSpec but that can be done when the right strategy is determined.
So this is a bug in the formula as of the current time (v0.11.5). Ubuntu-specific configuration: logrotate-formula/logrotate/osmap.yaml Lines 4 to 6 in 8f685e9
Section in logrotate-formula/pillar.example Lines 9 to 14 in 8f685e9
The merging in However, the template ignores the merged map if pillar values exist, so https://travis-ci.org/github/myii/logrotate-formula/builds/731089195#L1891-L1928 Note, it's possible to workaround this issue by supplying all of the required values in the pillar but then that misses the point of having the values set in the YAML files.
So if this fix is applied: The map is still fine (obviously): And now the map is used in the template instead of just the pillar: Everything fixed, right? Not quite...
Say the user decides to have The map now contains entries for both And the template ends up using both during the One workaround discussed in the
In the
Then the map merging would end up with a single value, so we wouldn't need to resort to hacking the
This is a separate bug that really should be fixed in all situations:
|
Your setup
Formula commit hash / release tag
Versions reports (master & minion)
Pillar / config used
Bug details
Describe the bug
UPDATE: Full breakdown given in #56 (comment) below.
https://freenode.logbot.info/salt/20200925#c5237209-c5237678
So that's:
map.jinja
merging and only uses pillar items instead; should really be changed to{%- set config = logrotate.default_config %}
.dailyweekly
appearing in the config file.period: daily
).monthly
interval is missing from the template (and the formula).Steps to reproduce the bug
Expected behaviour
Attempts to fix the bug
Additional context
The text was updated successfully, but these errors were encountered: