Journal space usage inconsistencies
I've been trying to adjust journal-related parameters in knot.conf, and seeing what happens, and then using kjournalprint
to see what is being stored, and how, and I've observed things I can't explain. They look like bugs to me. As an example, I've configured a large ccTLD zone as a secondary, with the following config:
template:
- id: bigzone
journal-content: all
journal-max-usage: 10M
master: distribution
zonefile-load: none
zonefile-sync: -1
zone:
- domain: CC.
template: bigzone
When I start knot, I see:
2021-05-21T19:02:10+0000 info: [CC.] AXFR, incoming, remote 193.0.19.190@53, finished, 8.88 seconds, 6250 messages, 72042840 bytes
2021-05-21T19:02:12+0000 info: [CC.] zone stored to journal, serial 2021052122
2021-05-21T19:02:12+0000 info: [CC.] refresh, remote 193.0.19.190@53, zone updated, 11.72 seconds, serial none -> 2021052122
So apparently, the zone has been stored into the journal, despite journal-max-usage: 10M
.
Next, I look at the disk usage, and apparently, there is data in the journal.
du -sh /var/lib/knot/journal/
114M /var/lib/knot/journal/
I can see the zone contents with kjournalprint /var/lib/knot/journal CC.
.
However, when I use the -d
flag of kjournalprint, to view journal usage, I see odd things:
kjournalprint -dz /var/lib/knot/journal
CC. 0 KiB
e164.arpa. 52 KiB
probes.atlas.ripe.net. 408 KiB
Occupied all zones together: 116052 KiB
Even though the total usage reported reflects real usage, the individual zone usage isn't being reported. I suspect that for individual zones kjournalprint is only reporting the space used by their changesets.
So this brings me to 2 main issues:
- Knot doesn't seem to honour the
journal-max-usage
setting, and has gone and stored a much larger zone into the journal - kjournalprint isn't reporting proper journal usage