Clear systemd-notify status on exit #1373

Merged
fyrchik merged 1 commit from a-savchuk/frostfs-node:systemd-notify into master 2024-09-13 09:36:25 +00:00
Member

Close #1283

Signed-off-by: Aleksey Savchuk a.savchuk@yadro.com

Close #1283 Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
a-savchuk added 1 commit 2024-09-12 14:44:32 +00:00
[#1283] Clear systemd-notify status on exit
All checks were successful
DCO action / DCO (pull_request) Successful in 2m24s
Tests and linters / Run gofumpt (pull_request) Successful in 2m52s
Tests and linters / Lint (pull_request) Successful in 4m5s
Tests and linters / gopls check (pull_request) Successful in 4m40s
Pre-commit hooks / Pre-commit (pull_request) Successful in 5m14s
Vulncheck / Vulncheck (pull_request) Successful in 5m41s
Tests and linters / Staticcheck (pull_request) Successful in 6m42s
Build / Build Components (pull_request) Successful in 6m55s
Tests and linters / Tests (pull_request) Successful in 10m8s
Tests and linters / Tests with -race (pull_request) Successful in 10m17s
59fe607e06
Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
a-savchuk force-pushed systemd-notify from 59fe607e06 to 546d09660f 2024-09-12 14:45:11 +00:00 Compare
Author
Member

The updated output from systemctl status after the changes

$ systemctl status frostfs-storage
frostfs-storage.service - FrostFS Storage node
     Loaded: loaded (/usr/lib/systemd/system/frostfs-storage.service; enabled; preset: disabled)
     Active: inactive (dead) since Thu 2024-09-12 14:54:11 UTC; 25s ago
   Duration: 1min 49.126s
   Main PID: 401922 (code=exited, status=0/SUCCESS)
        CPU: 6.074s
$ systemctl status frostfs-ir
frostfs-ir.service - FrostFS InnerRing node
     Loaded: loaded (/usr/lib/systemd/system/frostfs-ir.service; enabled; preset: disabled)
     Active: inactive (dead) since Thu 2024-09-12 14:52:14 UTC; 4s ago
   Duration: 8.538s
   Main PID: 401573 (code=exited, status=0/SUCCESS)
        CPU: 838ms
The updated output from `systemctl status` after the changes ``` $ systemctl status frostfs-storage frostfs-storage.service - FrostFS Storage node Loaded: loaded (/usr/lib/systemd/system/frostfs-storage.service; enabled; preset: disabled) Active: inactive (dead) since Thu 2024-09-12 14:54:11 UTC; 25s ago Duration: 1min 49.126s Main PID: 401922 (code=exited, status=0/SUCCESS) CPU: 6.074s ``` ``` $ systemctl status frostfs-ir frostfs-ir.service - FrostFS InnerRing node Loaded: loaded (/usr/lib/systemd/system/frostfs-ir.service; enabled; preset: disabled) Active: inactive (dead) since Thu 2024-09-12 14:52:14 UTC; 4s ago Duration: 8.538s Main PID: 401573 (code=exited, status=0/SUCCESS) CPU: 838ms ```
a-savchuk changed title from WIP: Clear systemd-notify status on exit to Clear systemd-notify status on exit 2024-09-12 14:57:11 +00:00
a-savchuk requested review from storage-core-developers 2024-09-12 14:57:22 +00:00
a-savchuk requested review from storage-core-committers 2024-09-12 14:57:23 +00:00
acid-ant approved these changes 2024-09-12 17:49:45 +00:00

The updated output from systemctl status after the changes

$ systemctl status frostfs-storage
frostfs-storage.service - FrostFS Storage node
     Loaded: loaded (/usr/lib/systemd/system/frostfs-storage.service; enabled; preset: disabled)
     Active: inactive (dead) since Thu 2024-09-12 14:54:11 UTC; 25s ago
   Duration: 1min 49.126s
   Main PID: 401922 (code=exited, status=0/SUCCESS)
        CPU: 6.074s
$ systemctl status frostfs-ir
frostfs-ir.service - FrostFS InnerRing node
     Loaded: loaded (/usr/lib/systemd/system/frostfs-ir.service; enabled; preset: disabled)
     Active: inactive (dead) since Thu 2024-09-12 14:52:14 UTC; 4s ago
   Duration: 8.538s
   Main PID: 401573 (code=exited, status=0/SUCCESS)
        CPU: 838ms

And what is the difference? Could you add systemctl output before fix?

> The updated output from `systemctl status` after the changes > ``` > $ systemctl status frostfs-storage > frostfs-storage.service - FrostFS Storage node > Loaded: loaded (/usr/lib/systemd/system/frostfs-storage.service; enabled; preset: disabled) > Active: inactive (dead) since Thu 2024-09-12 14:54:11 UTC; 25s ago > Duration: 1min 49.126s > Main PID: 401922 (code=exited, status=0/SUCCESS) > CPU: 6.074s > ``` > ``` > $ systemctl status frostfs-ir > frostfs-ir.service - FrostFS InnerRing node > Loaded: loaded (/usr/lib/systemd/system/frostfs-ir.service; enabled; preset: disabled) > Active: inactive (dead) since Thu 2024-09-12 14:52:14 UTC; 4s ago > Duration: 8.538s > Main PID: 401573 (code=exited, status=0/SUCCESS) > CPU: 838ms > ``` And what is the difference? Could you add systemctl output before fix?
Author
Member

And what is the difference? Could you add systemctl output before fix?

You can find it in the issue that I close and reference above. Here's the output after stopping frostfs-storage and frostfs-ir, the STATUS remains "STOPPING" even though all services are already inactive

root@aanikeev-node1:/etc/frostfs/storage# systemctl status frostfs-storage
○ frostfs-storage.service - FrostFS Storage node
     Loaded: loaded (/usr/lib/systemd/system/frostfs-storage.service; enabled; preset: disabled)
     Active: inactive (dead) since Wed 2024-07-31 06:55:10 UTC; 4min 19s ago
   Duration: 3min 30.145s
    Process: 1071039 ExecStart=/usr/bin/frostfs-node --config /etc/frostfs/storage/config.yml --config-dir /etc/frostfs/storage/conf.d (code=exited, status=0/SUCCESS)
   Main PID: 1071039 (code=exited, status=0/SUCCESS)
     Status: "STOPPING"
        CPU: 3min 26.023s
root@aanikeev-node1[alone_datacenter]:~# systemctl status frostfs-ir
○ frostfs-ir.service - FrostFS InnerRing node
     Loaded: loaded (/usr/lib/systemd/system/frostfs-ir.service; enabled; preset: disabled)
     Active: inactive (dead) since Wed 2024-07-31 07:34:13 UTC; 3s ago
   Duration: 18h 4min 9.292s
    Process: 61597 ExecStart=/usr/bin/frostfs-ir --config /etc/frostfs/ir/config.yml -config-dir /etc/frostfs/ir/conf.d (code=exited, status=0/SUCCESS)
   Main PID: 61597 (code=exited, status=0/SUCCESS)
     Status: "STOPPING"
        CPU: 3min 21.966s
> And what is the difference? Could you add systemctl output before fix? You can find it in [the issue](https://git.frostfs.info/TrueCloudLab/frostfs-node/issues/1283) that I close and reference above. Here's the output after stopping `frostfs-storage` and `frostfs-ir`, the STATUS remains "STOPPING" even though all services are already inactive ``` root@aanikeev-node1:/etc/frostfs/storage# systemctl status frostfs-storage ○ frostfs-storage.service - FrostFS Storage node Loaded: loaded (/usr/lib/systemd/system/frostfs-storage.service; enabled; preset: disabled) Active: inactive (dead) since Wed 2024-07-31 06:55:10 UTC; 4min 19s ago Duration: 3min 30.145s Process: 1071039 ExecStart=/usr/bin/frostfs-node --config /etc/frostfs/storage/config.yml --config-dir /etc/frostfs/storage/conf.d (code=exited, status=0/SUCCESS) Main PID: 1071039 (code=exited, status=0/SUCCESS) Status: "STOPPING" CPU: 3min 26.023s ``` ``` root@aanikeev-node1[alone_datacenter]:~# systemctl status frostfs-ir ○ frostfs-ir.service - FrostFS InnerRing node Loaded: loaded (/usr/lib/systemd/system/frostfs-ir.service; enabled; preset: disabled) Active: inactive (dead) since Wed 2024-07-31 07:34:13 UTC; 3s ago Duration: 18h 4min 9.292s Process: 61597 ExecStart=/usr/bin/frostfs-ir --config /etc/frostfs/ir/config.yml -config-dir /etc/frostfs/ir/conf.d (code=exited, status=0/SUCCESS) Main PID: 61597 (code=exited, status=0/SUCCESS) Status: "STOPPING" CPU: 3min 21.966s ```
dstepanov-yadro approved these changes 2024-09-13 07:11:42 +00:00
fyrchik added this to the v0.43.0 milestone 2024-09-13 09:36:20 +00:00
fyrchik merged commit 546d09660f into master 2024-09-13 09:36:25 +00:00
a-savchuk deleted branch systemd-notify 2024-09-13 09:40:13 +00:00
Sign in to join this conversation.
No reviewers
TrueCloudLab/storage-core-developers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-node#1373
No description provided.