Skip to content
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

Adding command to pdns_control #608

Closed
Habbie opened this issue Apr 26, 2013 · 10 comments
Closed

Adding command to pdns_control #608

Habbie opened this issue Apr 26, 2013 · 10 comments

Comments

@Habbie
Copy link
Member

Habbie commented Apr 26, 2013

Add the following commands to pdns_control:

  1. pdns_control list_zone --type $type, where $type can be all (default), master or slave; this command return all zones managed by pdns of type $type

  2. pdns_control delete $zone; this command will remove a zone (and all related records) from the backend

These commands can be used to create scripts for zone managing, for example for removing zone from superslaves

@Habbie
Copy link
Member Author

Habbie commented Apr 26, 2013

Author: anon
Ticket was created based on a request on Pdns-users

This comment is added by Mark Scholten

  1. $type can also be native for certain backends (at least for gmysql).

  2. Sounds like a great idea.

Adding an additional option to get information regarding the last check for slave domains would be great. This way it is possible to create a script that checks to see if this value is at least a week old and after that orders the delete command. Something like this is already (easily, automated) done by a PHP script provided on Pdns-users.

@Habbie
Copy link
Member Author

Habbie commented Apr 26, 2013

Author: anon
It would be nice to allow query for a certain domain only, e.g. pdns_control show . This could also dump useful info like: master IP (in case of slave), last check, next check ..., or dump nothing if the zone was not found.

@Habbie
Copy link
Member Author

Habbie commented Apr 26, 2013

Author: anon
Hi,

Picking up on this older message, because this relates to the ticket #608.

I've created a patch as a fix for #608. The patch can be found here:
https://github.com/cyclops1982/powerdns/compare/master...608.diff

At the moment, this simply includes a list-all-zones and delete-zone command for pdnssec and pdns_control has gotten a list-zones and delete-zone command.
I've discussed pdns_control and pdnssec with Peter van Dijk and we're not planning on keeping the pdnssec implementation and dropping the pdns_control implementation.

The interesting part is that this patch would resolve 608 quite nicely, but would not help to find out which zone must be deleted.
I understand people look at the last_check field, but that is (at the moment) not outputted by list-all-zones (or any other commands).

I would like some feedback on this, as there are a number of options:

  • Change list-all-zones to also show last_check (how would we format?)
  • Change show-zone to output more information about the zone (this was also suggested in ticket Adding command to pdns_control #608)
  • Create a delete-old-zones command which receives a last_check parameter and automatically deletes al zones that have a last_check field lower than the given command.

My preference would be to move to the 2nd option, but i'm not a big DNS operator so i have no clue if this is useful for you guys.

Any feedback is welcome!

Regards,
Ruben d'Arco

@cyclops1982
Copy link
Contributor

The branch has moved to https://github.com/cyclops1982/pdns/tree/608
However, there was no comment on the last e-mail on the mailling list - so the status is "pending"

@Habbie
Copy link
Member Author

Habbie commented Jan 17, 2014

If this is still wanted, please turn it into a pull. If silence is all you got on the list, closing the ticket is fine with me as well.

@cyclops1982
Copy link
Contributor

All i got was silence. Closing #608

@Habbie Habbie closed this as completed Jan 19, 2014
@andreacappelli
Copy link

Hi,
I tried the patch and solves the original request

I have only one question: for obtain a working system I need to add

domainmetadata
cryptokeys

to my mysql schema, until I'm not using DNSSEC, it's the intended behaviour?

@Habbie Habbie reopened this Feb 14, 2014
@mij
Copy link

mij commented Mar 4, 2014

+1 for this request

@HOSTED-POWER
Copy link

Any sample scripts available? Comment here (#467) says they should, but don't see them at first sight

@Habbie
Copy link
Member Author

Habbie commented Dec 11, 2019

Please ask support questions on IRC or the mailing list: https://www.powerdns.com/opensource.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants