Created
April 26, 2013 11:42
-
-
Save Habbie/5466740 to your computer and use it in GitHub Desktop.
supermaster anti-race workaround
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: packethandler.cc | |
=================================================================== | |
--- packethandler.cc (revision 2575) | |
+++ packethandler.cc (working copy) | |
@@ -778,7 +778,13 @@ | |
L<<Logger::Error<<"Unable to find backend willing to host "<<p->qdomain<<" for potential supermaster "<<p->getRemote()<<endl; | |
return RCode::Refused; | |
} | |
- db->createSlaveDomain(p->getRemote(),p->qdomain,account); | |
+ try { | |
+ db->createSlaveDomain(p->getRemote(),p->qdomain,account); | |
+ } | |
+ catch(AhuException& ae) { | |
+ L<<Logger::Error<<"Database error trying to create "<<p->qdomain<<" for potential supermaster "<<p->getRemote()<<": "<<ae.reason<<endl; | |
+ return RCode::ServFail; | |
+ } | |
Communicator.addSuckRequest(p->qdomain, p->getRemote()); | |
L<<Logger::Warning<<"Created new slave zone '"<<p->qdomain<<"' from supermaster "<<p->getRemote()<<", queued axfr"<<endl; | |
return RCode::NoError; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment