sdnotify: Send system monotonic time on reload #1314
Labels
No labels
P0
P1
P2
P3
badger
frostfs-adm
frostfs-cli
frostfs-ir
frostfs-lens
frostfs-node
good first issue
triage
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-node#1314
Loading…
Reference in a new issue
No description provided.
Delete branch "elebedeva/frostfs-node:fix/go-linkname-nanotime"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Close #1262
Turns out that
MONOTONIC_USEC
field required bysystemd
on reload must be the systemCLOCK_MONOTONIC
timestamp atthe time the notification message was generated as
systemd
compares it to otherCLOCK_MONOTONIC
timestamps taken by pid1.In the Go standard library the absolute monotonic timestamps in
time.Time
values are not made available to programmers.Signed-off-by: Ekaterina Lebedeva ekaterina.lebedeva@yadro.com
@ -17,6 +20,7 @@ const (
var (
socket *net.UnixAddr
errMonotonicClockNotAvaliable = errors.New("unable to send RELOADING: monotonic clock is not available on this system")
unable to send RELOADING
will be logged by the outer function, no need to include context hereis not available
can be misleading, there are multiple possible return codes for this syscall.How about
return fmt.Errorf("clock_gettime: %w", err)
in the function, without this variable?fixed
7a189b0967
toec1509de4e