move some volume lookup operations to grpc

jwt related lookup will come in next commit
This commit is contained in:
Chris Lu
2021-08-12 20:33:00 -07:00
parent 5571f4f70a
commit d1d1fc772c
6 changed files with 23 additions and 20 deletions

View File

@@ -65,7 +65,7 @@ func (vs *VolumeServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request)
w.WriteHeader(http.StatusNotFound)
return
}
lookupResult, err := operation.Lookup(vs.GetMaster, volumeId.String())
lookupResult, err := operation.LookupVolumeId(vs.GetMaster, vs.grpcDialOption, volumeId.String())
glog.V(2).Infoln("volume", volumeId, "found on", lookupResult, "error", err)
if err != nil || len(lookupResult.Locations) <= 0 {
glog.V(0).Infoln("lookup error:", err, r.URL.Path)