ceph: services: only clear the noout flags a bulk restart set itself
with_noout() set the flag on every OSD it was given and cleared it on every one again, without checking which OSDs already had it. An operator who had set noout on a single OSD, to stop it from flapping or while working on its disk, silently lost that flag as soon as any rolling restart finished. Read the per-OSD flag from 'osd dump' first and only touch the OSDs that do not have it yet. This makes the flag loss less likely, but it does not remove it: a flag that somebody sets while the restart runs is still cleared at the end, and the OSD map does not record who set a flag. The ids whose flag this run set are handed to the caller right away, because the cleanup here cannot survive a SIGKILL. The bulk restart stores them with its progress and passes them back on resume, where a fresh ownership check would find them already set and claim none of them. The two callers used different id formats, 'osd.N' against a bare N, so normalise before comparing against the OSD map. Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
T
Thomas Lamprecht committed
a5791bd2b23cae392222331808990e3c83a58dba
Parent: a58337b