mirror of
https://github.com/ceph/ceph
synced 2024-12-20 10:23:24 +00:00
92f8ec5c0e
Once upon a time, we configured our init systems to only restart an OSD 3 times in a 30 minute period. This made sure a permanently-slow OSD would stay dead, and that an OSD which was dying on boot (but only after a long boot process) would not insist on rejoining the cluster for *too* long. In62084375fa
, Boris applied these same rules to systemd in a great bid for init system consistency. Hurray! Sadly, Loic discovered that the great dragons udev and ceph-disk were susceptible to races under systemd (that we apparently didn't see with the other init systems?), and our 3x start limit was preventing the system from sorting them out. Inb3887379d6
he configured the system to allow *30* restarts in 30 minutes, but no more frequently than every 20 seconds. So that resolved the race issue, which was far more immediately annoying than any concern about OSDs sometimes taking too long to die. But I've started hearing in-person reports about OSDs not failing hard and fast when they go bad, and I attribute some of those reports to these init system differences. Happily, we no longer rely on udev and ceph-disk, and ceph-volume shouldn't be susceptible to the same race, so I think we can just go back to the old way. Partly-reverts:b3887379d6
Partly-fixes: http://tracker.ceph.com/issues/24368 Signed-off-by: Greg Farnum <gfarnum@redhat.com>
25 lines
696 B
SYSTEMD
25 lines
696 B
SYSTEMD
[Unit]
|
|
Description=Ceph object storage daemon osd.%i
|
|
After=network-online.target local-fs.target time-sync.target ceph-mon.target
|
|
Wants=network-online.target local-fs.target time-sync.target
|
|
PartOf=ceph-osd.target
|
|
|
|
[Service]
|
|
LimitNOFILE=1048576
|
|
LimitNPROC=1048576
|
|
EnvironmentFile=-@SYSTEMD_ENV_FILE@
|
|
Environment=CLUSTER=ceph
|
|
ExecStart=/usr/bin/ceph-osd -f --cluster ${CLUSTER} --id %i --setuser ceph --setgroup ceph
|
|
ExecStartPre=/usr/lib/ceph/ceph-osd-prestart.sh --cluster ${CLUSTER} --id %i
|
|
ExecReload=/bin/kill -HUP $MAINPID
|
|
ProtectHome=true
|
|
ProtectSystem=full
|
|
PrivateTmp=true
|
|
TasksMax=infinity
|
|
Restart=on-failure
|
|
StartLimitInterval=30min
|
|
StartLimitBurst=3
|
|
|
|
[Install]
|
|
WantedBy=ceph-osd.target
|