mirror of
https://github.com/cubefs/cubefs.git
synced 2026-08-02 02:00:56 +00:00
refactor(datameta): hybrid cloud optimize some logs related to upgrade compatibility
close:#22716686 Signed-off-by: true1064 <tangjingyu@oppo.com>
This commit is contained in:
parent
67ef6faefc
commit
2bced8d337
@ -681,7 +681,7 @@ func (s *DataNode) register(cfg *config.Config) (err error) {
|
||||
if settingsForbidFromMaster, err = MasterClient.AdminAPI().GetUpgradeCompatibleSettings(); err != nil {
|
||||
if strings.Contains(err.Error(), proto.KeyWordInHttpApiNotSupportErr) {
|
||||
// master may be lower version and has no this API
|
||||
volsForbidWriteOpVerMsg = fmt.Sprintf("[registerToMaster] master version has no api GetUpgradeCompatibleSettings, ues default value(false)")
|
||||
volsForbidWriteOpVerMsg = fmt.Sprintf("[registerToMaster] master version has no api GetUpgradeCompatibleSettings, ues default value")
|
||||
} else {
|
||||
log.LogErrorf("[registerToMaster] GetUpgradeCompatibleSettings from master(%v) err: %v",
|
||||
MasterClient.Leader(), err)
|
||||
|
||||
@ -625,7 +625,7 @@ func (s *DataNode) buildHeartBeatResponse(response *proto.DataNodeHeartbeatRespo
|
||||
}
|
||||
newVal := partition.IsForbidWriteOpOfProtoVer0()
|
||||
if oldVal != newVal {
|
||||
log.LogInfof("[Heartbeats] vol(%v) dpId(%v) IsForbidWriteOpOfProtoVer0 change to %v",
|
||||
log.LogWarnf("[Heartbeats] vol(%v) dpId(%v) IsForbidWriteOpOfProtoVer0 change to %v",
|
||||
partition.volumeID, partition.partitionID, newVal)
|
||||
}
|
||||
|
||||
|
||||
@ -22,8 +22,6 @@ import (
|
||||
"sync/atomic"
|
||||
"unsafe"
|
||||
|
||||
"github.com/cubefs/cubefs/util/log"
|
||||
|
||||
"github.com/cubefs/cubefs/depends/tiglabs/raft/logger"
|
||||
"github.com/cubefs/cubefs/depends/tiglabs/raft/proto"
|
||||
"github.com/cubefs/cubefs/depends/tiglabs/raft/util"
|
||||
|
||||
@ -300,14 +300,18 @@ func (m *ClusterService) getTopology(ctx context.Context, args struct{}) (*proto
|
||||
cv.NodeSet[ns.ID] = nsView
|
||||
ns.dataNodes.Range(func(key, value interface{}) bool {
|
||||
dataNode := value.(*DataNode)
|
||||
nsView.DataNodes = append(nsView.DataNodes, proto.NodeView{ID: dataNode.ID, Addr: dataNode.Addr,
|
||||
Status: dataNode.isActive, IsWritable: dataNode.IsWriteAble(), MediaType: dataNode.MediaType})
|
||||
nsView.DataNodes = append(nsView.DataNodes, proto.NodeView{
|
||||
ID: dataNode.ID, Addr: dataNode.Addr,
|
||||
Status: dataNode.isActive, IsWritable: dataNode.IsWriteAble(), MediaType: dataNode.MediaType,
|
||||
})
|
||||
return true
|
||||
})
|
||||
ns.metaNodes.Range(func(key, value interface{}) bool {
|
||||
metaNode := value.(*MetaNode)
|
||||
nsView.MetaNodes = append(nsView.MetaNodes, proto.NodeView{ID: metaNode.ID, Addr: metaNode.Addr,
|
||||
Status: metaNode.IsActive, IsWritable: metaNode.IsWriteAble(), MediaType: proto.MediaType_Unspecified})
|
||||
nsView.MetaNodes = append(nsView.MetaNodes, proto.NodeView{
|
||||
ID: metaNode.ID, Addr: metaNode.Addr,
|
||||
Status: metaNode.IsActive, IsWritable: metaNode.IsWriteAble(), MediaType: proto.MediaType_Unspecified,
|
||||
})
|
||||
return true
|
||||
})
|
||||
}
|
||||
|
||||
@ -60,7 +60,7 @@ func (m *metadataManager) checkVolForbidWriteOpOfProtoVer0(partition MetaPartiti
|
||||
}
|
||||
newVal := partition.IsForbidWriteOpOfProtoVer0()
|
||||
if oldVal != newVal {
|
||||
log.LogInfof("[checkVolForbidWriteOpOfProtoVer0] vol(%v) mpId(%v) IsForbidWriteOpOfProtoVer0 change to %v",
|
||||
log.LogWarnf("[checkVolForbidWriteOpOfProtoVer0] vol(%v) mpId(%v) IsForbidWriteOpOfProtoVer0 change to %v",
|
||||
mpVolName, partition.GetBaseConfig().PartitionId, newVal)
|
||||
}
|
||||
return
|
||||
|
||||
@ -482,7 +482,7 @@ func (m *MetaNode) register() (err error) {
|
||||
if settingsFromMaster, err = getUpgradeCompatibleSettings(); err != nil {
|
||||
if strings.Contains(err.Error(), proto.KeyWordInHttpApiNotSupportErr) {
|
||||
// master may be lower version and has no this API
|
||||
volsForbidWriteOpVerMsg = fmt.Sprintf("[register] master version has no api GetUpgradeCompatibleSettings, ues default value(false)")
|
||||
volsForbidWriteOpVerMsg = fmt.Sprintf("[register] master version has no api GetUpgradeCompatibleSettings, ues default value")
|
||||
} else {
|
||||
log.LogErrorf("[register] tryCnt(%v), GetUpgradeCompatibleSettings from master err: %v", tryCnt, err)
|
||||
time.Sleep(3 * time.Second)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user