hive-egress: the lease hook's lines reach the journal at info under egress-lease
dnsmasq relays the hook's stderr at LOG_DEBUG as dnsmasq-script, and the field log shipper's journald receiver keeps info and above, so no lease add or renewal was visible in the field. The hook now also writes each line to /dev/log at info priority with identifier egress-lease. The stderr print stays. The VM test reads the lines back with journalctl -t egress-lease -p info.
This commit is contained in:
parent
7efa8c8ea7
commit
d9551415bf
1 changed files with 122 additions and 9 deletions
|
|
@ -857,9 +857,15 @@ source check lives in that table and the host-side filtering stays in
|
|||
`DNSMASQ_LEASE_EXPIRES` lies in the past does nothing, and the pair leaves the
|
||||
table at its own timeout, as the container's lease ends. A `del` for a lease
|
||||
that hasn't expired (a release) deletes the pair at once, as does one without
|
||||
a readable expiry. `egress-lease` logs each `add`, `old` and `del` to dnsmasq's
|
||||
log with the prefix `egress-lease:`, the MAC, address, port, expiry, and for
|
||||
`del` whether it was `applied` or `skipped (stale)`.
|
||||
a readable expiry. `egress-lease` logs each `add`, `old` and `del` to the
|
||||
journal under the identifier `egress-lease`, at info priority, with the prefix
|
||||
`egress-lease:`, the MAC, address, port, expiry, and for `del` whether it was
|
||||
`applied` or `skipped (stale)`. It also prints the line on stderr, which
|
||||
dnsmasq logs at debug priority as `dnsmasq-script`. The log shipper reads info
|
||||
and above, so search the store for the `egress-lease` identifier, not for the
|
||||
dnsmasq copy. The journal send waits at most a second for room in journald's
|
||||
queue, because dnsmasq runs its lease scripts one at a time. A send that
|
||||
fails or times out costs that one journal line and nothing else.
|
||||
- **The window.** The binding takes the MAC the container's link has when the
|
||||
command first looks, normally within a second of the veth appearing. Until
|
||||
then root in the container could change its own MAC, but in that time only
|
||||
|
|
|
|||
Loading…
Reference in a new issue