mirror of
https://github.com/cubefs/cubefs.git
synced 2026-08-02 02:00:56 +00:00
refactor(master): resolve conflicts when picking to master branch. #22906448
Signed-off-by: Victor1319 <zengxuewei@oppo.com>
This commit is contained in:
parent
7c0e8fa470
commit
0c406f55d9
@ -1136,6 +1136,7 @@ func formatQuotaInfo(info *proto.QuotaInfo) string {
|
||||
}
|
||||
|
||||
var badDiskDetailTableRowPattern = "%-18v %-18v %-18v %-18v %-18v"
|
||||
|
||||
func formatBadDiskTableHeader() string {
|
||||
return fmt.Sprintf(badDiskDetailTableRowPattern, "Address", "Path", "TotalPartitionCnt", "DiskErrPartitionCnt", "PartitionIdsWithDiskErr")
|
||||
}
|
||||
|
||||
@ -85,9 +85,9 @@ const (
|
||||
|
||||
const (
|
||||
// LoggerDir = "client"
|
||||
LoggerPrefix = "client"
|
||||
LoggerOutput = "output.log"
|
||||
ModuleName = "fuseclient"
|
||||
LoggerPrefix = "client"
|
||||
LoggerOutput = "output.log"
|
||||
ModuleName = "fuseclient"
|
||||
ConfigKeyExporterPort = "exporterKey"
|
||||
|
||||
ControlCommandSetRate = "/rate/set"
|
||||
|
||||
@ -31,7 +31,7 @@ EOF
|
||||
}
|
||||
|
||||
#compose="docker-compose --env-file ${RootPath}/docker/run_docker.env -f ${RootPath}/docker/docker-compose-hy.yml"
|
||||
compose="docker-compose --env-file ${RootPath}/docker/run_docker.env -f ${RootPath}/docker/docker-compose.yml"
|
||||
compose="docker compose --env-file ${RootPath}/docker/run_docker.env -f ${RootPath}/docker/docker-compose.yml"
|
||||
|
||||
has_go() {
|
||||
if command -v go &> /dev/null
|
||||
|
||||
@ -209,22 +209,21 @@ func (o *ObjectNode) validateAuthInfo(r *http.Request, auth Auther) (err error)
|
||||
if !param.action.IsNone() && o.signatureIgnoredActions.Contains(param.action) {
|
||||
return nil
|
||||
}
|
||||
cred := auth.Credential()
|
||||
if auth.IsSkewed() {
|
||||
log.LogErrorf("validateAuthInfo: request skewed: requestID(%v) reqTime(%v) servTime(%v)",
|
||||
GetRequestID(r), cred.TimeStamp, time.Now().UTC().Format(ISO8601Format))
|
||||
return RequestTimeTooSkewed
|
||||
}
|
||||
if auth.IsExpired() {
|
||||
log.LogErrorf("validateAuthInfo: signature has expired: requestID(%v) servTime(%v) reqDate(%v) expires(%v)",
|
||||
GetRequestID(r), time.Now().UTC().Format(ISO8601Format), cred.Date, cred.Expires)
|
||||
return ExpiredToken
|
||||
}
|
||||
if !auth.SignatureMatch(sk, o.wildcards) {
|
||||
log.LogErrorf("validateAuthInfo: signature not match: requestID(%v) AccessKeyId(%v)\nstringToSign=(\n%v\n)\ncanonialRequest=(\n%v\n)",
|
||||
GetRequestID(r), reqAK, auth.StringToSign(), auth.CanonicalRequest())
|
||||
return SignatureDoesNotMatch
|
||||
}
|
||||
cred := auth.Credential()
|
||||
if auth.IsSkewed() {
|
||||
log.LogErrorf("validateAuthInfo: request skewed: requestID(%v) reqTime(%v) servTime(%v)",
|
||||
GetRequestID(r), cred.TimeStamp, time.Now().UTC().Format(ISO8601Format))
|
||||
return RequestTimeTooSkewed
|
||||
}
|
||||
if auth.IsExpired() {
|
||||
log.LogErrorf("validateAuthInfo: signature has expired: requestID(%v) servTime(%v) reqDate(%v) expires(%v)",
|
||||
GetRequestID(r), time.Now().UTC().Format(ISO8601Format), cred.Date, cred.Expires)
|
||||
return ExpiredToken
|
||||
}
|
||||
if !auth.SignatureMatch(sk, o.wildcards) {
|
||||
log.LogErrorf("validateAuthInfo: signature not match: requestID(%v) AccessKeyId(%v)\nstringToSign=(\n%v\n)\ncanonialRequest=(\n%v\n)",
|
||||
GetRequestID(r), reqAK, auth.StringToSign(), auth.CanonicalRequest())
|
||||
return SignatureDoesNotMatch
|
||||
}
|
||||
|
||||
if stsInfo != nil {
|
||||
|
||||
@ -725,7 +725,6 @@ func (api *AdminAPI) QueryDisks(addr string) (disks *proto.DiskInfos, err error)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
func (api *AdminAPI) DiskDetail(addr string, diskPath string) (disk *proto.DiskInfo, err error) {
|
||||
disk = &proto.DiskInfo{}
|
||||
err = api.mc.requestWith(disk, newRequest(get, proto.QueryDiskDetail).Header(api.h).
|
||||
|
||||
Loading…
Reference in New Issue
Block a user