projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch '8345-revert-llfuse-to-0.41.1'
[arvados.git]
/
sdk
/
go
/
keepclient
/
keepclient.go
diff --git
a/sdk/go/keepclient/keepclient.go
b/sdk/go/keepclient/keepclient.go
index 26aa7177e05c3aa64d3e956f183379614093d341..baf4bac02444170446c91a61c0b7469813bf308c 100644
(file)
--- a/
sdk/go/keepclient/keepclient.go
+++ b/
sdk/go/keepclient/keepclient.go
@@
-4,7
+4,6
@@
package keepclient
import (
"bytes"
"crypto/md5"
import (
"bytes"
"crypto/md5"
- "crypto/tls"
"errors"
"fmt"
"git.curoverse.com/arvados.git/sdk/go/arvadosclient"
"errors"
"fmt"
"git.curoverse.com/arvados.git/sdk/go/arvadosclient"
@@
-103,7
+102,7
@@
func New(arv *arvadosclient.ArvadosClient) *KeepClient {
Arvados: arv,
Want_replicas: defaultReplicationLevel,
Client: &http.Client{Transport: &http.Transport{
Arvados: arv,
Want_replicas: defaultReplicationLevel,
Client: &http.Client{Transport: &http.Transport{
- TLSClientConfig:
&tls.Config{InsecureSkipVerify: arv.ApiInsecure}
}},
+ TLSClientConfig:
arvadosclient.MakeTLSConfig(arv.ApiInsecure)
}},
Retries: 2,
}
return kc
Retries: 2,
}
return kc
@@
-168,6
+167,10
@@
func (kc *KeepClient) PutR(r io.Reader) (locator string, replicas int, err error
}
func (kc *KeepClient) getOrHead(method string, locator string) (io.ReadCloser, int64, string, error) {
}
func (kc *KeepClient) getOrHead(method string, locator string) (io.ReadCloser, int64, string, error) {
+ if strings.HasPrefix(locator, "d41d8cd98f00b204e9800998ecf8427e+0") {
+ return ioutil.NopCloser(bytes.NewReader(nil)), 0, "", nil
+ }
+
var errs []string
tries_remaining := 1 + kc.Retries
var errs []string
tries_remaining := 1 + kc.Retries
@@
-352,7
+355,7
@@
func (kc *KeepClient) WritableLocalRoots() map[string]string {
// caller can reuse/modify them after SetServiceRoots returns, but
// they should not be modified by any other goroutine while
// SetServiceRoots is running.
// caller can reuse/modify them after SetServiceRoots returns, but
// they should not be modified by any other goroutine while
// SetServiceRoots is running.
-func (kc *KeepClient) SetServiceRoots(newLocals, newWritableLocals
map[string]string
, newGateways map[string]string) {
+func (kc *KeepClient) SetServiceRoots(newLocals, newWritableLocals, newGateways map[string]string) {
locals := make(map[string]string)
for uuid, root := range newLocals {
locals[uuid] = root
locals := make(map[string]string)
for uuid, root := range newLocals {
locals[uuid] = root