mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 02:50:30 +00:00
rbd: log LastUpdate in UTC format
This Commit converts the LastUpdate from int to the UTC format and logs it for better debugging. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
parent
2c66dfc3e4
commit
2782878ea2
@ -23,6 +23,7 @@ import (
|
|||||||
"regexp"
|
"regexp"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/ceph/ceph-csi/internal/util"
|
"github.com/ceph/ceph-csi/internal/util"
|
||||||
|
|
||||||
@ -615,12 +616,15 @@ func (rs *ReplicationServer) ResyncVolume(ctx context.Context,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// convert the last update time to UTC
|
||||||
|
lastUpdateTime := time.Unix(localStatus.LastUpdate, 0).UTC()
|
||||||
util.UsefulLog(
|
util.UsefulLog(
|
||||||
ctx,
|
ctx,
|
||||||
"image mirroring state=%s, description=%s and lastUpdate=%s",
|
"image mirroring state=%s, description=%s and lastUpdate=%s",
|
||||||
localStatus.State.String(),
|
localStatus.State.String(),
|
||||||
localStatus.Description,
|
localStatus.Description,
|
||||||
localStatus.LastUpdate)
|
lastUpdateTime)
|
||||||
|
|
||||||
resp := &replication.ResyncVolumeResponse{
|
resp := &replication.ResyncVolumeResponse{
|
||||||
Ready: ready,
|
Ready: ready,
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user