diff --git a/Dockerfile b/Dockerfile index b2291c15f..e87538fdb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ RUN echo tlsv1 >> ~/.curlrc RUN \ curl -Lks https://bintray.com$(curl -Lk http://bintray.com/chrislusf/seaweedfs/seaweedfs/_latestVersion | grep linux_amd64.tar.gz | sed -n "/href/ s/.*href=['\"]\([^'\"]*\)['\"].*/\1/gp") | gunzip | tar -xf - -C /opt/weed/ && \ - mkdir ./bin && mv weed_*/* ./bin && \ + mkdir ./bin && mv ./*/* ./bin && \ chmod +x ./bin/weed EXPOSE 8080 diff --git a/weed/command/export.go b/weed/command/export.go index 481aa111b..5a7dc71d9 100644 --- a/weed/command/export.go +++ b/weed/command/export.go @@ -51,7 +51,7 @@ func init() { var ( output = cmdExport.Flag.String("o", "", "output tar file name, must ends with .tar, or just a \"-\" for stdout") format = cmdExport.Flag.String("fileNameFormat", defaultFnFormat, "filename formatted with {{.Mime}} {{.Id}} {{.Name}} {{.Ext}}") - newer = cmdExport.Flag.String("newer", "", "export only files newer than this time, default is all files. Must be specified in RFC3339 without timezone") + newer = cmdExport.Flag.String("newer", "", "export only files newer than this time, default is all files. Must be specified in RFC3339 without timezone, e.g. 2006-01-02T15:04:05") tarOutputFile *tar.Writer tarHeader tar.Header diff --git a/weed/topology/data_node.go b/weed/topology/data_node.go index da6ed2895..b7f039559 100644 --- a/weed/topology/data_node.go +++ b/weed/topology/data_node.go @@ -53,7 +53,7 @@ func (dn *DataNode) UpdateVolumes(actualVolumes []storage.VolumeInfo) (deletedVo for _, v := range actualVolumes { actualVolumeMap[v.Id] = v } - dn.RLock() + dn.Lock() for vid, v := range dn.volumes { if _, ok := actualVolumeMap[vid]; !ok { glog.V(0).Infoln("Deleting volume id:", vid) @@ -62,8 +62,8 @@ func (dn *DataNode) UpdateVolumes(actualVolumes []storage.VolumeInfo) (deletedVo dn.UpAdjustVolumeCountDelta(-1) dn.UpAdjustActiveVolumeCountDelta(-1) } - } //TODO: adjust max volume id, if need to reclaim volume ids - dn.RUnlock() + } + dn.Unlock() for _, v := range actualVolumes { dn.AddOrUpdateVolume(v) }