Resolve puppet overwriting a pre-existing bootstrap-osd auth entry

Ceph jewel creates the client.bootstrap-osd auth entry when the cluster
is created. puppet-ceph has been overwriting this keyring in memory and
on the filesystem. This patch updates ceph::osd to exract the
client keyring from memory and write it to the filesystem. This will
means ceph::key will not need to create the client.bootstrap-osd keyring.

Depends-On: https://review.opendev.org/#/c/667387/
Change-Id: I11f134bed59da706a03ce4a70d941145c16f8175
Partial-bug: 1769722
(cherry picked from commit d833c03b97)
This commit is contained in:
Keith Schincke 2018-04-24 14:52:02 -04:00 committed by Alex Schultz
parent 021cc6425e
commit b90c642c68
1 changed files with 11 additions and 1 deletions

View File

@ -163,7 +163,17 @@ test -z $(ceph-disk list $(readlink -f ${data}) | egrep -o '[0-9a-f]{8}-([0-9a-f
}
}
Exec[$ceph_check_udev] -> Exec[$ceph_prepare]
#name of the bootstrap osd keyring
$bootstrap_osd_keyring = "/var/lib/ceph/bootstrap-osd/${cluster_name}.keyring"
exec { "extract-bootstrap-osd-keyring-${name}":
command => "/bin/true # comment to satisfy puppet syntax requirements
ceph auth get client.bootstrap-osd > ${bootstrap_osd_keyring}
",
creates => "${bootstrap_osd_keyring}",
}
Exec[$ceph_check_udev] -> Exec["extract-bootstrap-osd-keyring-${name}"]
Exec["extract-bootstrap-osd-keyring-${name}"] -> Exec[$ceph_prepare]
# ceph-disk: prepare should be idempotent http://tracker.ceph.com/issues/7475
exec { $ceph_prepare:
command => "/bin/true # comment to satisfy puppet syntax requirements