ir: Add health status reporting on reconfiguration #1311
No reviewers
TrueCloudLab/storage-core-developers
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-node#1311
Loading…
Reference in a new issue
No description provided.
Delete branch "elebedeva/frostfs-node:fix/ir-reload-notify-systemd"
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?
Fix #1135
Relates to #1262
frostfs-ir
service reconfigures correctly and service's statuses are being reported to systemd. However, since we replacedgo:linkname
&nanotime()
withtime.Since()
, systemd refuses to accept reload signal response fromfrostfs-ir
. To maintain correct behaviour it was decided to revevrt systemd-related changes until a better solution is found.Signed-off-by: Ekaterina Lebedeva ekaterina.lebedeva@yadro.com
@ -45,2 +44,2 @@
google.golang.org/grpc v1.63.2
google.golang.org/protobuf v1.33.0
golang.org/x/term v0.21.0
google.golang.org/grpc v1.65.0
no, too early #1268
fixed
@ -17,7 +16,6 @@ const (
var (
socket *net.UnixAddr
start = time.Now()
Have you tried using
start time.Time
(i.e. the default value)?The
time.Time
default value is0001-01-01 00:00:00 +0000 UTC
,time.Since()
returnstime.Duration
which is an alias ofint64
. According to Go doc:time.Since(time.Time{})
overflows.@ -53,7 +51,7 @@ func FlagAndStatus(status string) error {
// must be sent, containing "READY=1".
//
// For MONOTONIC_USEC format refer to https://www.man7.org/linux/man-pages/man3/sd_notify.3.html
Maybe in IR SIGHUP is so fast that we send the same
MONOTONIC_USEC
? This would've explained the problem.Receiving the same
MONOTONIC_USEC
doesn't seem like a problem tosystemd
. I tried sendingtime.Since(time.Time{})
(always the same value),systemd
is OK with it, service reload is successful.It appears as if
systemd
does not accept values less than some minimum and greater than some maximum, and time in us since start is deemed as being too small. Time in ns since start works fine most of the time but not always (i've got hang-ups a couple times). Haven't found those min & max values in systemd source code yet.Passing a
math.MaxInt64
asMONOTONIC_USEC
works fine butmath.MaxUint64
is not accepted.bb3945f62a
to5da41f1fe5