mirror of
https://github.com/PowerDNS-Admin/PowerDNS-Admin.git
synced 2026-04-25 00:35:52 +03:00
[GH-ISSUE #98] Delete domain does not work #62
Labels
No labels
bug / broken-feature
bug / broken-feature
docs / request
feature / request
help / other
mod / help-wanted
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/PowerDNS-Admin-PowerDNS-Admin#62
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @michielvisser on GitHub (Aug 4, 2016).
Original GitHub issue: https://github.com/PowerDNS-Admin/PowerDNS-Admin/issues/98
I just installed PowerDNS admin and I like the tool. However, I cannot delete any domains I've created, the same as in issue #89. My setup is based on CentOS 7, powerDNS 3.48 and MySQL as the backend. SELinux has been disabled.
I can delete all the records from a domain, that works fine. However, going to the admin button for the domain I want to delete, the click delete and confirm, nothing happens. The dashboard just gets reloaded and the doman is still there.
For now I've deleted the domain manually from both PowerDNS and PowerDNS-admin database.
@vauxia commented on GitHub (Aug 11, 2016):
The log says, "IOError: [Errno 32] Broken pipe" when this happens.
@ngoduykhanh commented on GitHub (Aug 12, 2016):
I couldn't reproduce @michielvisser 's issue with the same setup. It works fine for me. Does the history log show anything?
@vauxia : Try to restart application and delete the domain again. It looks like your application hangs. You can also set
threaded=Truein theapp.run()function inrun.pyfile to improve the application performance.@michielvisser commented on GitHub (Aug 16, 2016):
Tried today with the latest commit, but this does not change the issue. The history log does not show that much, here is the output. Actions I did:
Then I got the dashboard back and nothing has happened. I also cannot see a delete request of some kind going to the PDNS server.
Here is the log output I have of the above:
(flask) [root@powerdns PowerDNS-Admin]# ./run.py
[INFO] * Running on http://192.168.50.25:80/ (Press CTRL+C to quit)
[INFO] * Restarting with stat
[WARNING] * Debugger is active!
[INFO] * Debugger pin code: 103-133-745
[INFO] 192.168.50.60 - - [16/Aug/2016 07:35:24] "GET / HTTP/1.1" 200 -
[INFO] 192.168.50.60 - - [16/Aug/2016 07:35:24] "GET /static/adminlte2/bootstrap/css/bootstrap.min.css HTTP/1.1" 200 -
[INFO] 192.168.50.60 - - [16/Aug/2016 07:35:24] "GET /static/adminlte2/dist/css/AdminLTE.min.css HTTP/1.1" 200 -
[INFO] 192.168.50.60 - - [16/Aug/2016 07:35:24] "GET /static/adminlte2/plugins/iCheck/square/blue.css HTTP/1.1" 200 -
[INFO] 192.168.50.60 - - [16/Aug/2016 07:35:24] "GET /static/adminlte2/plugins/jQuery/jQuery-2.2.0.min.js HTTP/1.1" 200 -
[INFO] 192.168.50.60 - - [16/Aug/2016 07:35:24] "GET /static/adminlte2/bootstrap/js/bootstrap.min.js HTTP/1.1" 200 -
[INFO] 192.168.50.60 - - [16/Aug/2016 07:35:24] "GET /static/adminlte2/plugins/iCheck/icheck.min.js HTTP/1.1" 200 -
[INFO] 192.168.50.60 - - [16/Aug/2016 07:35:25] "GET /static/adminlte2/bootstrap/fonts/glyphicons-halflings-regular.woff2 HTTP/1.1" 200 -
[INFO] 192.168.50.60 - - [16/Aug/2016 07:35:25] "GET /static/adminlte2/plugins/iCheck/square/blue.png HTTP/1.1" 200 -
[INFO] 192.168.50.60 - - [16/Aug/2016 07:35:25] "GET /favicon.ico HTTP/1.1" 302 -
[INFO] 192.168.50.60 - - [16/Aug/2016 07:35:25] "GET /favicon.ico HTTP/1.1" 302 -
[INFO] 192.168.50.60 - - [16/Aug/2016 07:35:25] "GET /error/404 HTTP/1.1" 404 -
[INFO] 192.168.50.60 - - [16/Aug/2016 07:35:25] "GET /error/404 HTTP/1.1" 404 -
[INFO] User "admin" logged in successfully
[INFO] 192.168.50.60 - - [16/Aug/2016 07:35:33] "POST / HTTP/1.1" 302 -
[INFO] 192.168.50.60 - - [16/Aug/2016 07:35:33] "GET / HTTP/1.1" 302 -
[INFO] 192.168.50.60 - - [16/Aug/2016 07:35:33] "GET /dashboard HTTP/1.1" 200 -
[INFO] 192.168.50.60 - - [16/Aug/2016 07:35:33] "GET /static/adminlte2/plugins/datatables/dataTables.bootstrap.css HTTP/1.1" 200 -
[INFO] 192.168.50.60 - - [16/Aug/2016 07:35:33] "GET /static/adminlte2/dist/css/skins/_all-skins.min.css HTTP/1.1" 200 -
[INFO] 192.168.50.60 - - [16/Aug/2016 07:35:33] "GET /static/adminlte2/plugins/iCheck/all.css HTTP/1.1" 200 -
[INFO] 192.168.50.60 - - [16/Aug/2016 07:35:33] "GET /static/multiselect/css/multi-select.css HTTP/1.1" 200 -
[INFO] 192.168.50.60 - - [16/Aug/2016 07:35:33] "GET /static/custom/css/custom.css HTTP/1.1" 200 -
[INFO] 192.168.50.60 - - [16/Aug/2016 07:35:33] "GET /static/adminlte2/plugins/datatables/jquery.dataTables.min.js HTTP/1.1" 200 -
[INFO] 192.168.50.60 - - [16/Aug/2016 07:35:33] "GET /static/adminlte2/plugins/datatables/dataTables.bootstrap.min.js HTTP/1.1" 200 -
[INFO] 192.168.50.60 - - [16/Aug/2016 07:35:33] "GET /static/adminlte2/plugins/datatables/extensions/NaturalSort/natural.min.js HTTP/1.1" 200 -
[INFO] 192.168.50.60 - - [16/Aug/2016 07:35:33] "GET /static/adminlte2/plugins/sparkline/jquery.sparkline.min.js HTTP/1.1" 200 -
[INFO] 192.168.50.60 - - [16/Aug/2016 07:35:33] "GET /static/adminlte2/plugins/slimScroll/jquery.slimscroll.min.js HTTP/1.1" 200 -
[INFO] 192.168.50.60 - - [16/Aug/2016 07:35:33] "GET /static/adminlte2/plugins/fastclick/fastclick.js HTTP/1.1" 200 -
[INFO] 192.168.50.60 - - [16/Aug/2016 07:35:33] "GET /static/adminlte2/dist/js/app.min.js HTTP/1.1" 200 -
[INFO] 192.168.50.60 - - [16/Aug/2016 07:35:33] "GET /static/multiselect/js/jquery.multi-select.js HTTP/1.1" 200 -
[INFO] 192.168.50.60 - - [16/Aug/2016 07:35:33] "GET /static/custom/js/custom.js HTTP/1.1" 200 -
[INFO] 192.168.50.60 - - [16/Aug/2016 07:35:33] "GET /static/adminlte2/plugins/iCheck/minimal/_all.css HTTP/1.1" 200 -
[INFO] 192.168.50.60 - - [16/Aug/2016 07:35:33] "GET /static/adminlte2/plugins/iCheck/square/_all.css HTTP/1.1" 200 -
[INFO] 192.168.50.60 - - [16/Aug/2016 07:35:33] "GET /static/adminlte2/plugins/iCheck/flat/_all.css HTTP/1.1" 200 -
[INFO] 192.168.50.60 - - [16/Aug/2016 07:35:33] "GET /static/adminlte2/plugins/iCheck/line/_all.css HTTP/1.1" 200 -
[INFO] 192.168.50.60 - - [16/Aug/2016 07:35:33] "GET /static/adminlte2/plugins/iCheck/polaris/polaris.css HTTP/1.1" 200 -
[INFO] 192.168.50.60 - - [16/Aug/2016 07:35:33] "GET /static/adminlte2/plugins/iCheck/futurico/futurico.css HTTP/1.1" 200 -
[INFO] 192.168.50.60 - - [16/Aug/2016 07:35:56] "GET /admin/domain/vrijdagscouts.nl/manage HTTP/1.1" 200 -
[INFO] 192.168.50.60 - - [16/Aug/2016 07:35:57] "GET /static/multiselect/img/switch.png HTTP/1.1" 200 -
[INFO] 192.168.50.60 - - [16/Aug/2016 07:36:04] "GET /dashboard HTTP/1.1" 200 -
@michielvisser commented on GitHub (Aug 16, 2016):
And another test, just to check the API connection is working for this. When I enter the URL by hand, the domain gets deleted:
URL I've entered: http://192.168.50.25/admin/domain/vrijdagscouts.nl/delete
[INFO] Delete domain vrijdagscouts.nl successfully
[INFO] 192.168.50.60 - - [16/Aug/2016 07:55:41] "GET /admin/domain/vrijdagscouts.nl/delete HTTP/1.1" 302 -
[INFO] 192.168.50.60 - - [16/Aug/2016 07:55:41] "GET /dashboard HTTP/1.1" 200 -
So it seems that in my case the URL is not called upon after confirmation of deletion. I don't know exactly why as Python is not the thing I can read very well.
For the installation, I've followed the installation guide on the Wiki for Fedora 23 which also very nicely applies to CentOS 7 which is running on this server.
@ngoduykhanh commented on GitHub (Aug 17, 2016):
Are you running PDNS-Admin behind any reverse proxy? Can you post your web server config?
@michielvisser commented on GitHub (Aug 24, 2016):
Sorry, it has been a few days before I had some time get a step further with this issue.
At the moment, the PDNS-admin is not running behind a reverse proxy, I just set up the Python webserver (in config.py) to port 80. There is a firewall between the management network the PDNS server is in and the rest of the network.
As I had some doubts on the implementation I created a new CentOS 7.2.1511 server 64 bit with PowerDNS 4.0.1 installed. Then I installed PowerDNS admin according to the fedora 23 manual, but no luck as the same thing happens that I have on the production machine - I cannot delete domains (only by manually entering the URL), but I also found out that clearing the history does not work at all. I guess this also relies on a POST url, but this is not visible in the logs.
In the next few days I will try to build a test server on CentOS 6.8, the latest release in the previous version. Maybe it will work on that one, I'll keep you guys posted.
@michielvisser commented on GitHub (Aug 25, 2016):
@ngoduykhanh: And after some more testing last night and this morning: the issue is browser-related. When I try to delete a domain with Firefox (version 48.0.2) it does not work, but with Google Chrome it does. This also explains why I don't get a POST in the logs, the browser does not even send it.
I've tried this on multiple Windows computers (Win 7 and Win 10) and on my Macbook (MacOS 10.11.6) with the same results: Firefox not working, Chrome works.
And for completeness: IE 11 does work as well. I haven't tested Safari.
Maybe this is something of help in order to check and reproduce the issue.
@joachimtingvold commented on GitHub (Aug 25, 2016):
Sounds like a caching issue that doesn't take the fix commited into account?
@michielvisser commented on GitHub (Aug 25, 2016):
@jallakim I don't think it is a caching issue as I also used a computer I didn't use before with PowerDNS-admin. Also, on the other computer I've tested with Firefox I cleared the browser cache and that didn't help.
@Cultti commented on GitHub (Sep 12, 2016):
I can confirm that this is browser related issue. The domain does not get deleted when using Firefox. Chrome works perfectly.
The problem is that the browser will redirect first instead of calling /delete endpoint. This can be easily fixed by making sure that the delete executes first and only after then we redirect to dashboard. Other option would be actually to redirect browser to /delete endpoint and that endpoint will direct to dashboard.
I'm not sure why Firefox behaves differently from other.
See:
github.com/ngoduykhanh/PowerDNS-Admin@52e628d4d6/app/templates/domain_management.html (L121-L123)I have fixed this issue in my instance and I will create PR asap.