everything is working again
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
301fe567e2
commit
71e0065240
|
@ -20,6 +20,7 @@ import (
|
|||
func importDomain(w http.ResponseWriter, r *http.Request) (string, error) {
|
||||
var result string
|
||||
domainName := r.URL.Query().Get("domainName")
|
||||
force := r.URL.Query().Get("force")
|
||||
if domainName == "" {
|
||||
result = "importDomain() failed. name is blank " + r.URL.Path
|
||||
log.Warn(result)
|
||||
|
@ -30,7 +31,7 @@ func importDomain(w http.ResponseWriter, r *http.Request) (string, error) {
|
|||
// a LocalOnly record should already have been created by hypervisor.Poll()
|
||||
d := me.cluster.FindDropletByName(domainName)
|
||||
if d == nil {
|
||||
result = "libvirt domain " + domainName + " could not be found on any hypervisor"
|
||||
result = "libvirt domain " + domainName + " could not be found on any hypervisor\n"
|
||||
log.Info(result)
|
||||
fmt.Fprintln(w, result)
|
||||
return result, errors.New(result)
|
||||
|
@ -38,11 +39,17 @@ func importDomain(w http.ResponseWriter, r *http.Request) (string, error) {
|
|||
|
||||
// if it's not local only, don't attempt this for now
|
||||
if d.LocalOnly == "" {
|
||||
result = "LocalOnly is blank. SKIP. merge not supported yet."
|
||||
if force == "true" {
|
||||
result = "LocalOnly is blank. force=true. PROCEEDING WITH DANGER\n"
|
||||
log.Warn(result)
|
||||
fmt.Fprint(w, result)
|
||||
} else {
|
||||
result = "LocalOnly is blank. SKIP. merge not supported yet. force=" + force
|
||||
log.Log(WARN, result)
|
||||
fmt.Fprintln(w, result)
|
||||
return result, errors.New(result)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
// it probably doesn't really matter what the state it
|
||||
|
|
2
poll.go
2
poll.go
|
@ -58,7 +58,7 @@ func (h *HyperT) pollHypervisor() {
|
|||
d.Current.Hypervisor = h.pb.Hostname
|
||||
}
|
||||
if d.LocalOnly == "" {
|
||||
log.Log(WARN, start, "local domain is a duplicate (need to resolve this)")
|
||||
log.Log(WARN, start, "local domain is a duplicate (need to resolve this)", h.pb.Hostname)
|
||||
continue
|
||||
}
|
||||
log.Log(WARN, start, "local domain ready to import from hypervisor")
|
||||
|
|
Loading…
Reference in New Issue