When calling partprobe, we make sure there is at least one udev add
called for each partition created when preparing a device. But there is
no guarantee that the udev add for data partition will be last and the
following scenario can happen:
- udev add data partition fails because the journal partition is owned
by root
- udev add journal partition chown the journal partition
- no other udev add event is sent and the OSD does not activate
An additional, possibly redundant, udev add event is fired after
partprobe is run and after udevadm settles, to guarantee there is at
least one udev add data partition after the last udev add journal
partition.
http://tracker.ceph.com/issues/12787 Fixes: #12787
Signed-off-by: Loic Dachary <ldachary@redhat.com>
except subprocess.CalledProcessError as e:
raise Error(e)
update_partition(data, 'prepared')
+ command_check_call(['udevadm', 'trigger',
+ '--action=add',
+ '--sysname-match',
+ os.path.basename(rawdev)])
def check_journal_reqs(args):
_, allows_journal = command([