sdnotify: Fix status for RELOADING
#1440
No reviewers
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
5 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-node#1440
Loading…
Reference in a new issue
No description provided.
Delete branch "acid-ant/frostfs-node:bugfix/sdnotify"
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?
Before:
After:
Signed-off-by: Anton Nikiforov an.nikiforov@yadro.com
RELOADING
5be7aa3545
to60911b7cb1
@ -59,6 +59,8 @@ func FlagAndStatus(status string) error {
return fmt.Errorf("clock_gettime: %w", err)
}
status += "\nMONOTONIC_USEC=" + strconv.FormatInt(ts.Nano()/1000, 10)
status += "\nSTATUS=RELOADING"
What is the difference with the previous implementation?
60911b7cb1
to8b6ec57c61
Commit message updated.
@ -59,6 +59,8 @@ func FlagAndStatus(status string) error {
return fmt.Errorf("clock_gettime: %w", err)
}
status += "\nMONOTONIC_USEC=" + strconv.FormatInt(ts.Nano()/1000, 10)
status += "\nSTATUS=RELOADING"
Why not use this approach for other statuses as well? like READY=1 and STOPPING=1
Why using this approach in the first place? We already adding this line to
status
hereAh, I see, we added
MONOTONIC_USEC
tostatus
, so just trimming suffix=1
doesn't work anymore in case of reloading.But I still believe that for other statuses changing current behaviour is unnecessary.
This line is inside
if status == ReloadingEnabled
, so only reloading is affected.I think this answers both questions.