[GH-ISSUE #40] Unable to Delete Domain #28

Closed
opened 2026-02-26 10:35:39 +03:00 by kerem · 8 comments
Owner

Originally created by @fredericmohr on GitHub (May 13, 2016).
Original GitHub issue: https://github.com/PowerDNS-Admin/PowerDNS-Admin/issues/40

Originally assigned to: @ivanfilippov on GitHub.

During PDNS setup, I created the test entries for example.com (see powerdns documentation).
After I installed PowerDNS-Admin, I created all my domains and their DNS records and resolution works fine.

However, I can't delete the example.com domain. I was able to delete all records for the domain, using the web UI, but when I go to manage -> delete domain and accept the permanent deletion, I get redirected to the domain overview and example.com is still there. There's no log entry in the GUI logfile, and only the following in uwsgi/app/powerdnsadmin.log

GET /admin/domain/example.com/manage => generated 19857 bytes in 23 msecs (HTTP/1.1 200) 3 headers in 416 bytes (1 switches on core 0)
/ => generated 227 bytes in 9 msecs (HTTP/1.1 302) 4 headers in 472 bytes (1 switches on core 0)
GET /admin/domain/example.com/manage => generated 19857 bytes in 23 msecs (HTTP/1.1 200) 3 headers in 416 bytes (1 switches on core 0)

The same goes for domains I created directly in the WebUI.

Originally created by @fredericmohr on GitHub (May 13, 2016). Original GitHub issue: https://github.com/PowerDNS-Admin/PowerDNS-Admin/issues/40 Originally assigned to: @ivanfilippov on GitHub. During PDNS setup, I created the test entries for example.com (see powerdns documentation). After I installed PowerDNS-Admin, I created all my domains and their DNS records and resolution works fine. However, I can't delete the example.com domain. I was able to delete all records for the domain, using the web UI, but when I go to manage -> delete domain and accept the permanent deletion, I get redirected to the domain overview and example.com is still there. There's no log entry in the GUI logfile, and only the following in uwsgi/app/powerdnsadmin.log ``` GET /admin/domain/example.com/manage => generated 19857 bytes in 23 msecs (HTTP/1.1 200) 3 headers in 416 bytes (1 switches on core 0) / => generated 227 bytes in 9 msecs (HTTP/1.1 302) 4 headers in 472 bytes (1 switches on core 0) GET /admin/domain/example.com/manage => generated 19857 bytes in 23 msecs (HTTP/1.1 200) 3 headers in 416 bytes (1 switches on core 0) ``` The same goes for domains I created directly in the WebUI.
kerem 2026-02-26 10:35:39 +03:00
Author
Owner

@ivanfilippov commented on GitHub (May 13, 2016):

Hi @fredericmohr

Can you tell me what version of PowerDNS you're using?

<!-- gh-comment-id:219186162 --> @ivanfilippov commented on GitHub (May 13, 2016): Hi @fredericmohr Can you tell me what version of PowerDNS you're using?
Author
Owner

@ivanfilippov commented on GitHub (May 14, 2016):

Hi @fredericmohr

I'm trying this on a fresh pdns-3.4.8 with the PowerDNS-Admin master and I can't replicate it. I created example.com using these queries:

INSERT INTO domains (name, type) values ('example.com', 'NATIVE');
INSERT INTO records (domain_id, name, content, type,ttl,prio) VALUES (1,'example.com','localhost ahu@ds9a.nl 1','SOA',86400,NULL);
INSERT INTO records (domain_id, name, content, type,ttl,prio) VALUES (1,'example.com','dns-us1.powerdns.net','NS',86400,NULL);
INSERT INTO records (domain_id, name, content, type,ttl,prio) VALUES (1,'example.com','dns-eu1.powerdns.net','NS',86400,NULL);
INSERT INTO records (domain_id, name, content, type,ttl,prio) VALUES (1,'www.example.com','192.0.2.10','A',120,NULL); 
INSERT INTO records (domain_id, name, content, type,ttl,prio) VALUES (1,'mail.example.com','192.0.2.12','A',120,NULL);
INSERT INTO records (domain_id, name, content, type,ttl,prio) VALUES (1,'localhost.example.com','127.0.0.1','A',120,NULL);
INSERT INTO records (domain_id, name, content, type,ttl,prio) VALUES (1,'example.com','mail.example.com','MX',120,25);

Do you have the LOG_FILE parameter set in config.py? Not sure if it works as I expect it to in uwsgi mode, but check for its existence and see if that log is more useful.

You can also try running PowerDNS-Admin via python run.py in it's directory (make sure to do source ./flask/bin/activate first), then connect to it directly via http://localhost:9393 and watch the console as you try to delete example.com

<!-- gh-comment-id:219190273 --> @ivanfilippov commented on GitHub (May 14, 2016): Hi @fredericmohr I'm trying this on a fresh pdns-3.4.8 with the PowerDNS-Admin `master` and I can't replicate it. I created `example.com` using these queries: ``` sql INSERT INTO domains (name, type) values ('example.com', 'NATIVE'); INSERT INTO records (domain_id, name, content, type,ttl,prio) VALUES (1,'example.com','localhost ahu@ds9a.nl 1','SOA',86400,NULL); INSERT INTO records (domain_id, name, content, type,ttl,prio) VALUES (1,'example.com','dns-us1.powerdns.net','NS',86400,NULL); INSERT INTO records (domain_id, name, content, type,ttl,prio) VALUES (1,'example.com','dns-eu1.powerdns.net','NS',86400,NULL); INSERT INTO records (domain_id, name, content, type,ttl,prio) VALUES (1,'www.example.com','192.0.2.10','A',120,NULL); INSERT INTO records (domain_id, name, content, type,ttl,prio) VALUES (1,'mail.example.com','192.0.2.12','A',120,NULL); INSERT INTO records (domain_id, name, content, type,ttl,prio) VALUES (1,'localhost.example.com','127.0.0.1','A',120,NULL); INSERT INTO records (domain_id, name, content, type,ttl,prio) VALUES (1,'example.com','mail.example.com','MX',120,25); ``` Do you have the LOG_FILE parameter set in `config.py`? Not sure if it works as I expect it to in uwsgi mode, but check for its existence and see if that log is more useful. You can also try running PowerDNS-Admin via `python run.py` in it's directory (make sure to do `source ./flask/bin/activate` first), then connect to it directly via `http://localhost:9393` and watch the console as you try to delete **example.com**
Author
Owner

@fredericmohr commented on GitHub (May 14, 2016):

Strange, this problem only seems to occur in Firefox. Deleting in Chrome works fine. I added my DB Version, since I'm not using MySQL but MariaDB, but I don't think that's the problem. This looks Browser Specific (I'm on Kubuntu 16.04 Desktop and Ubuntu 14.04 Server btw)

ubuntu@powerdns:~$ pdns_server --version
May 14 10:33:57 PowerDNS Authoritative Server 3.4.8 (jenkins@autotest.powerdns.com) (C) 2001-2015 PowerDNS.COM BV
May 14 10:33:57 Using 64-bits mode. Built on 20160203082222 by root@autotest.powerdns.com, gcc 4.7.2.
May 14 10:33:57 PowerDNS comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it according to the terms of the GPL version 2.
May 14 10:33:57 Features: botan1.10 libdl lua 
May 14 10:33:57 Built-in modules: bind gmysql gpgsql pipe gsqlite3 lua geo tinydns mydns opendbx remote random

DB: MariaDB 10.0.24 (AWS RDS Instance)

2016-05-14 10:45:31,321 - MODEL - INFO - Added domain chrometest.com successfully
2016-05-14 10:45:37,158 - MODEL - INFO - Delete domain chrometest.com successfully
2016-05-14 10:45:46,918 - MODEL - INFO - Added domain fftest.com successfully
# ff delete request doesn't show up in log file.

Current PowerDNS-Admin settings during tests (In production I use LOGLEVEL='WARNING' and debug = False)

#config.py
LOGLEVEL='DEBUG'

#run.py
app.run(debug = True, 
<!-- gh-comment-id:219213800 --> @fredericmohr commented on GitHub (May 14, 2016): Strange, this problem only seems to occur in Firefox. Deleting in Chrome works fine. I added my DB Version, since I'm not using MySQL but MariaDB, but I don't think that's the problem. This looks Browser Specific (I'm on Kubuntu 16.04 Desktop and Ubuntu 14.04 Server btw) ``` ubuntu@powerdns:~$ pdns_server --version May 14 10:33:57 PowerDNS Authoritative Server 3.4.8 (jenkins@autotest.powerdns.com) (C) 2001-2015 PowerDNS.COM BV May 14 10:33:57 Using 64-bits mode. Built on 20160203082222 by root@autotest.powerdns.com, gcc 4.7.2. May 14 10:33:57 PowerDNS comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it according to the terms of the GPL version 2. May 14 10:33:57 Features: botan1.10 libdl lua May 14 10:33:57 Built-in modules: bind gmysql gpgsql pipe gsqlite3 lua geo tinydns mydns opendbx remote random DB: MariaDB 10.0.24 (AWS RDS Instance) 2016-05-14 10:45:31,321 - MODEL - INFO - Added domain chrometest.com successfully 2016-05-14 10:45:37,158 - MODEL - INFO - Delete domain chrometest.com successfully 2016-05-14 10:45:46,918 - MODEL - INFO - Added domain fftest.com successfully # ff delete request doesn't show up in log file. ``` Current PowerDNS-Admin settings during tests (In production I use LOGLEVEL='WARNING' and debug = False) ``` #config.py LOGLEVEL='DEBUG' #run.py app.run(debug = True, ```
Author
Owner

@fredericmohr commented on GitHub (May 14, 2016):

Oh, and another thing. In chrome, the domain still shows after the redirect, until I do a page refresh...

<!-- gh-comment-id:219213926 --> @fredericmohr commented on GitHub (May 14, 2016): Oh, and another thing. In chrome, the domain still shows after the redirect, until I do a page refresh...
Author
Owner

@ivanfilippov commented on GitHub (May 15, 2016):

Hi @fredericmohr

I was able to replicate both the Firefox and the Chrome issues. I've pushed a fix to this branch here: https://github.com/ivanfilippov/PowerDNS-Admin/tree/fix_domain_deletion_issues. Are you able to try it out to tell me if the issue is fixed for you as well? If it's fixed I'll merge it into the main repo.

<!-- gh-comment-id:219304744 --> @ivanfilippov commented on GitHub (May 15, 2016): Hi @fredericmohr I was able to replicate both the Firefox and the Chrome issues. I've pushed a fix to this branch here: https://github.com/ivanfilippov/PowerDNS-Admin/tree/fix_domain_deletion_issues. Are you able to try it out to tell me if the issue is fixed for you as well? If it's fixed I'll merge it into the main repo.
Author
Owner

@fredericmohr commented on GitHub (May 17, 2016):

Works perfectly in both Chrome and Firefox now :)
Since I had to switch origin url to test the patch, will this be merged into this repository? Because currently I switched to the fork, which makes me a bit uneasy on a production server ;)

<!-- gh-comment-id:219638523 --> @fredericmohr commented on GitHub (May 17, 2016): Works perfectly in both Chrome and Firefox now :) Since I had to switch origin url to test the patch, will this be merged into this repository? Because currently I switched to the fork, which makes me a bit uneasy on a production server ;)
Author
Owner

@ivanfilippov commented on GitHub (May 19, 2016):

Hi @fredericmohr

I've created PR #42 for @ngoduykhanh to review, once accepted you can switch back to master. :)

<!-- gh-comment-id:220201399 --> @ivanfilippov commented on GitHub (May 19, 2016): Hi @fredericmohr I've created PR #42 for @ngoduykhanh to review, once accepted you can switch back to master. :)
Author
Owner

@ngoduykhanh commented on GitHub (May 19, 2016):

Hi @ivanfilippov ,

Your changes look good to me. Thank you for the PR. Merged.

<!-- gh-comment-id:220220347 --> @ngoduykhanh commented on GitHub (May 19, 2016): Hi @ivanfilippov , Your changes look good to me. Thank you for the PR. Merged.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/PowerDNS-Admin-PowerDNS-Admin#28
No description provided.