mirror of
https://github.com/ceph/ceph
synced 2025-01-01 16:42:29 +00:00
Merge pull request #2635 from dachary/wip-9653-ceph-disk-bootstrap-osd-giant
ceph-disk: bootstrap-osd keyring ignores --statedir (giant)
This commit is contained in:
commit
8d79181dd8
@ -1919,7 +1919,8 @@ def activate(
|
||||
raise Error('No OSD uuid assigned.')
|
||||
LOG.debug('OSD uuid is %s', fsid)
|
||||
|
||||
keyring = activate_key_template.format(cluster=cluster)
|
||||
keyring = activate_key_template.format(cluster=cluster,
|
||||
statedir=STATEDIR)
|
||||
|
||||
osd_id = get_osd_id(path)
|
||||
if osd_id is None:
|
||||
@ -2658,7 +2659,7 @@ def parse_args():
|
||||
help='path to block device or directory',
|
||||
)
|
||||
activate_parser.set_defaults(
|
||||
activate_key_template=STATEDIR + '/bootstrap-osd/{cluster}.keyring',
|
||||
activate_key_template='{statedir}/bootstrap-osd/{cluster}.keyring',
|
||||
func=main_activate,
|
||||
)
|
||||
|
||||
@ -2682,7 +2683,7 @@ def parse_args():
|
||||
choices=INIT_SYSTEMS,
|
||||
)
|
||||
activate_journal_parser.set_defaults(
|
||||
activate_key_template=STATEDIR + '/bootstrap-osd/{cluster}.keyring',
|
||||
activate_key_template='{statedir}/bootstrap-osd/{cluster}.keyring',
|
||||
func=main_activate_journal,
|
||||
)
|
||||
|
||||
@ -2701,7 +2702,7 @@ def parse_args():
|
||||
choices=INIT_SYSTEMS,
|
||||
)
|
||||
activate_all_parser.set_defaults(
|
||||
activate_key_template=STATEDIR + '/bootstrap-osd/{cluster}.keyring',
|
||||
activate_key_template='{statedir}/bootstrap-osd/{cluster}.keyring',
|
||||
func=main_activate_all,
|
||||
)
|
||||
|
||||
|
@ -218,6 +218,12 @@ function test_find_cluster_by_uuid() {
|
||||
teardown
|
||||
}
|
||||
|
||||
# http://tracker.ceph.com/issues/9653
|
||||
function test_keyring_path() {
|
||||
test_activate_dir 2>&1 | tee $DIR/test_keyring
|
||||
grep --quiet "keyring $DIR/bootstrap-osd/ceph.keyring" $DIR/test_keyring || return 1
|
||||
}
|
||||
|
||||
function run() {
|
||||
local default_actions
|
||||
default_actions+="test_path "
|
||||
@ -226,6 +232,7 @@ function run() {
|
||||
default_actions+="test_prepend_to_path "
|
||||
default_actions+="test_activate_dir_magic "
|
||||
default_actions+="test_activate_dir "
|
||||
default_actions+="test_keyring_path "
|
||||
local actions=${@:-$default_actions}
|
||||
for action in $actions ; do
|
||||
setup
|
||||
|
Loading…
Reference in New Issue
Block a user