[dnsdist] expungeByName from ALL pools
Remi Gacogne
remi.gacogne at powerdns.com
Fri Oct 7 16:05:54 UTC 2022
Hi Christof,
On 05/10/2022 12:06, Chen, Christof via dnsdist wrote:
> I use separate caches for various pools. Now I want to delete a given
> FQDN from the cache, but I don't know immediately in which cache it is -
> so I would like to simpy expungeByName it from all caches.
>
> Is there a straightforward way to address all pools or iterate over all
> pools? I would like to avoid hardcoding my list of pools here:
>
> getPool("poolA"):getCache():expungeByName(newDNSName("what.ever.name
> <http://what.ever.name>"))
> getPool("poolB"):getCache():expungeByName(newDNSName("what.ever.name
> <http://what.ever.name>"))
> [...several more pools with caches...]
>
> Maybe some Lua magic with getPools()?
I'm afraid I don't see an easy way to do that, short of parsing the
output of 'showPools()'. It would not be too hard to write a Lua
function returning the list of all the existing pools, though. Would you
mind opening a feature request on GH so that idea doesn't get lost?
Cheers,
--
Remi Gacogne
PowerDNS.COM BV - https://www.powerdns.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://mailman.powerdns.com/pipermail/dnsdist/attachments/20221007/41779b36/attachment.sig>
More information about the dnsdist
mailing list