Skip to content

resolvectl: introduce dump-caches command - #19104

Closed
yuwata wants to merge 5 commits into
systemd:mainfrom
yuwata:resolve-dump-cache
Closed

yuwata wants to merge 5 commits into
systemd:mainfrom
yuwata:resolve-dump-cache

Conversation

@yuwata

@yuwata yuwata commented Mar 24, 2021

Copy link
Copy Markdown
Member

No description provided.

@yuwata yuwata added the resolve label Mar 24, 2021

@poettering poettering left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd really prefer if we'd synthesize JSON from the cache instead, and return that to clients. It would be processable then, and shouldn't be too difficult to synthesize. i.e. add dns_resource_key_to_json() and dns_resource_key_from_json() or so, and similar for dns_resource_record(). Pass the RR RDATA stuff as base64 blob.

x = *a;
y = *b;
x_str = dns_resource_key_to_string(x->rr ? x->rr->key : x->key);
y_str = dns_resource_key_to_string(y->rr ? y->rr->key : y->key);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dns_resource_key_compare_func() + dns_resource_record_compare_func() already exist

@keszybz

keszybz commented Mar 25, 2021

Copy link
Copy Markdown
Member

Since @yuwata gave thumbsup for the json idea, let's mark this as "needs rework".

@keszybz keszybz added the reviewed/needs-rework 🔨 PR has been reviewed and needs another round of reworks label Mar 25, 2021
@poettering

Copy link
Copy Markdown
Member

This reminds me of #19451 a bit, i.e. generate server-side json, pass to client via dbus, and then just prettify and output it there.

@yuwata
yuwata marked this pull request as draft May 20, 2023 05:34
poettering added a commit to poettering/systemd that referenced this pull request Jun 12, 2023
… all of resolved's RR caches

This adds a simple varlink call io.systemd.Resolve.Monitor.DumpCache to
the existing io.systemd.Resolve.Monitor service. It compiles a JSON
object containing the per-scope cache entries and returns it.

Replaces: systemd#20053 systemd#19104

Fixes: systemd#14796
@poettering

Copy link
Copy Markdown
Member

I implemented this based on the varlink monitoring interface now, which makes this quite nice and relatively minimal I think. See #28012. Let's continue there.

@poettering poettering closed this Jun 12, 2023
@github-actions github-actions Bot removed the reviewed/needs-rework 🔨 PR has been reviewed and needs another round of reworks label Jun 12, 2023
poettering added a commit to poettering/systemd that referenced this pull request Jun 12, 2023
… all of resolved's RR caches

This adds a simple varlink call io.systemd.Resolve.Monitor.DumpCache to
the existing io.systemd.Resolve.Monitor service. It compiles a JSON
object containing the per-scope cache entries and returns it.

Replaces: systemd#20053 systemd#19104

Fixes: systemd#14796
@yuwata
yuwata deleted the resolve-dump-cache branch June 14, 2023 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

3 participants