Fix journal disk path incorrect initialize with dedicate journal disk
When user provision a storage node with dedicated storage add for journal, it is designated to create journal partition on this dedicated disk for every osd. $ system host-stor-add storage-0 journal <disk uuid> $ system host-stor-add storage-0 osd <disk uuid> For above case, "ceph-disk prepare" request correct journal partition for initialize and write header and keyring to journal disk. Closes-Bug: 1830736 Change-Id: I70ae1a3bc049ad3842e0ec22851b148de5671781 Signed-off-by: Martin, Chen <haochuan.z.chen@intel.com>
This commit is contained in:
parent
3560d5b9fd
commit
3e5e741f47
|
@ -335,6 +335,15 @@ define platform_ceph_osd(
|
|||
$tier_name,
|
||||
) {
|
||||
|
||||
# If journal path is substring of disk path, it is collocated journal,
|
||||
# otherwise it is external journal. In external journal case, class ceph::osd
|
||||
# request journal path as argument for ceph osd initializaiton
|
||||
if $disk_path in $journal_path {
|
||||
$journal = ''
|
||||
} else {
|
||||
$journal = $journal_path
|
||||
}
|
||||
|
||||
Anchor['platform::networking'] # Make sure networking is up before running ceph commands
|
||||
-> file { "/var/lib/ceph/osd/ceph-${osd_id}":
|
||||
ensure => 'directory',
|
||||
|
@ -347,8 +356,9 @@ define platform_ceph_osd(
|
|||
command => template('platform/ceph.osd.create.erb'),
|
||||
}
|
||||
-> ceph::osd { $disk_path:
|
||||
uuid => $osd_uuid,
|
||||
osdid => $osd_id,
|
||||
uuid => $osd_uuid,
|
||||
osdid => $osd_id,
|
||||
journal => $journal,
|
||||
}
|
||||
-> exec { "configure journal location ${name}":
|
||||
logoutput => true,
|
||||
|
|
Loading…
Reference in New Issue