[Tech Preview] Linux Storage Node & Updater

I looked into storj/restart_linux.go at 89e682b4d73dc2b1c4623e174095d3d441ceb1b6 · storj/storj · GitHub
And see only “stop” on restart function:

ADD:

Based on the latest restart issue, I would like to propose changes for services:

Now we have:

[Unit]
Description  = Storage Node service
After        = syslog.target network.target

[Service]
Type         = simple
User         = storj-storagenode
Group        = storj-storagenode
ExecStart    = /opt/storagenode/bin/storagenode run --config-dir "/etc/storagenode/config"
Restart      = on-failure
NotifyAccess = main

[Install]
Alias        = storagenode
WantedBy     = multi-user.target

After change:

[Unit]
Description  = Storage Node service
After        = syslog.target network.target

[Service]
Type         = simple
User         = storj-storagenode
Group        = storj-storagenode
ExecStart    = /opt/storagenode/bin/storagenode run --config-dir "/etc/storagenode/config"

# Give a reasonable amount of time for the server to start up/shut down
TimeoutSec   = 300
RestartSec   = 30
#Restart      = on-failure
Restart      = always
NotifyAccess = main

[Install]
Alias        = storagenode
WantedBy     = multi-user.target

Description for new parameters is here

TimeoutSec   = 300
RestartSec   = 30
Restart      = always

The same parameters can be applied for storagenode-updater service.

4 Likes