Ensure we delete the fqdn is the container fails to start.

This commit is contained in:
Tom Wilkie committed 2015-08-11 11:32:17 +00:00
1 parent f3ad81d554
commit 7fa568872c
1 file changed
+2 -2
+2 -2
View File
@@ -27,7 +27,7 @@ func (n *Nameserver) HandleHTTP(router *mux.Router) {
vars = mux.Vars(r)
container = vars["container"]
ipStr = vars["ip"]
hostname = r.FormValue("fqdn")
hostname = dns.Fqdn(r.FormValue("fqdn"))
ip, err = address.ParseIP(ipStr)
)
if err != nil {
@@ -35,7 +35,7 @@ func (n *Nameserver) HandleHTTP(router *mux.Router) {
return
}
if err := n.AddEntry(dns.Fqdn(hostname), container, n.ourName, ip); err != nil {
if err := n.AddEntry(hostname, container, n.ourName, ip); err != nil {
badRequest(w, fmt.Errorf("Unable to add entry: %v", err))
return
}