more logging
parent
970f7b989b
commit
8ac05f56e6
|
@ -733,8 +733,10 @@ func (self *HttpServer) tryAsDbUser(w libhttp.ResponseWriter, r *libhttp.Request
|
|||
}
|
||||
|
||||
func (self *HttpServer) tryAsDbUserAndClusterAdmin(w libhttp.ResponseWriter, r *libhttp.Request, yield func(common.User) (int, interface{})) {
|
||||
log.Debug("Trying to auth as a db user")
|
||||
statusCode, body := self.tryAsDbUser(w, r, yield)
|
||||
if statusCode == libhttp.StatusUnauthorized {
|
||||
log.Debug("Authenticating as a db user failed with %s (%d)", string(body), statusCode)
|
||||
// tryAsDbUser will set this header, since we're retrying
|
||||
// we should delete the header and let tryAsClusterAdmin
|
||||
// set it properly
|
||||
|
|
|
@ -66,6 +66,7 @@ func NewRaftServer(config *configuration.Configuration, clusterConfig *ClusterCo
|
|||
router: mux.NewRouter(),
|
||||
config: config,
|
||||
}
|
||||
rand.Seed(time.Now().Unix())
|
||||
// Read existing name or generate a new one.
|
||||
if b, err := ioutil.ReadFile(filepath.Join(s.path, "name")); err == nil {
|
||||
s.name = string(b)
|
||||
|
|
Loading…
Reference in New Issue