mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-30 18:20:19 +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>
(cherry picked from commit 2782878ea2
)
This commit is contained in:
parent
0b43e91c77
commit
75ff33785b
@ -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