sdnotify: Fix status for RELOADING
#1440
1 changed files with 2 additions and 0 deletions
|
@ -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"
|
||||
a-savchuk marked this conversation as resolved
a-savchuk
commented
Why not use this approach for other statuses as well? like READY=1 and STOPPING=1 Why not use this approach for other statuses as well? like READY=1 and STOPPING=1
elebedeva
commented
Why using this approach in the first place? We already adding this line to Why using this approach in the first place? We already adding this line to `status` [here](https://git.frostfs.info/TrueCloudLab/frostfs-node/src/commit/ed13387c0e1406040898fc91f36c6d9370f58413/pkg/util/sdnotify/sdnotify.go#L63)
elebedeva
commented
Ah, I see, we added But I still believe that for other statuses changing current behaviour is unnecessary. Ah, I see, we added `MONOTONIC_USEC` to `status`, 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.
fyrchik
commented
This line is inside This line is inside `if status == ReloadingEnabled`, so only reloading is affected.
I think this answers both questions.
|
||||
return Send(status)
|
||||
}
|
||||
status += "\nSTATUS=" + strings.TrimSuffix(status, "=1")
|
||||
return Send(status)
|
||||
|
|
Loading…
Reference in a new issue
What is the difference with the previous implementation?