-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[doctor][stack] check ceph.config #208
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,28 +30,38 @@ def stack(parser): | |
if not NODE_ROLE.is_mongo(): | ||
cmd_warn('mongo') | ||
return | ||
if parser.CONTROLLER or parser.COMPUTE or parser.MONGO: | ||
if parser.CEPHOSD: | ||
if not NODE_ROLE.is_ceph_osd(): | ||
cmd_warn('ceph-osd') | ||
return | ||
if parser.CONTROLLER or parser.COMPUTE or parser.MONGO or parser.CEPHOSD: | ||
if parser.PROFILE and not parser.SERVICE and not parser.CHECK_ALL: | ||
if parser.CONTROLLER: | ||
check('controller', 'profile') | ||
if parser.COMPUTE: | ||
check('compute', 'profile') | ||
if parser.MONGO: | ||
check('mongo', 'profile') | ||
if parser.CEPHOSD: | ||
check('ceph_osd', 'profile') | ||
if parser.SERVICE and not parser.PROFILE and not parser.CHECK_ALL: | ||
if parser.CONTROLLER: | ||
check('controller', 'service') | ||
if parser.COMPUTE: | ||
check('compute', 'service') | ||
if parser.MONGO: | ||
check('mongo', 'service') | ||
if parser.CEPHOSD: | ||
check('ceph_osd', 'service') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ceph-osd |
||
if parser.SERVICE and parser.PROFILE or parser.CHECK_ALL or not parser.PROFILE and not parser.SERVICE: | ||
if parser.CONTROLLER: | ||
check('controller', 'all') | ||
if parser.COMPUTE: | ||
check('compute', 'all') | ||
if parser.MONGO: | ||
check('mongo', 'all') | ||
if parser.CEPHOSD: | ||
check('ceph_osd', 'all') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ceph-osd |
||
return | ||
# check all | ||
if parser.CHECK_ALL and parser.PROFILE and parser.SERVICE: | ||
|
@@ -109,13 +119,20 @@ def make(parser): | |
default=False, | ||
help='Check All Mongo Node', | ||
) | ||
parser.add_argument( | ||
'--ceph-osd', | ||
dest='CEPHOSD', | ||
action='store_true', | ||
default=False, | ||
help='Check All Ceph-OSD Node', | ||
) | ||
common.add_common_opt(parser) | ||
parser.set_defaults(func=stack) | ||
|
||
# check all component | ||
|
||
# IMPORTANT: node include fuel | ||
all_roles = ('controller','compute','mongo') | ||
all_roles = ('controller','compute','mongo','ceph_osd') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ceph-osd |
||
|
||
def check(role, obj): | ||
if NODE_ROLE.is_fuel(): | ||
|
@@ -146,18 +163,15 @@ def check_all_profile(): | |
check_nodes(role, 'profile', multi_role=True) | ||
else: | ||
for node_role in node_roles: | ||
# print node_role | ||
if node_role != 'ceph_osd': | ||
eval('check_%s_profile' % node_role)() | ||
eval('check_%s_profile' % node_role)() | ||
|
||
def check_all_service(): | ||
if NODE_ROLE.is_fuel(): | ||
for role in all_roles: | ||
check_nodes(role, 'service', multi_role=True) | ||
else: | ||
for node_role in node_roles: | ||
if node_role != 'ceph_osd': | ||
eval('check_%s_service' % node_role)() | ||
eval('check_%s_service' % node_role)() | ||
|
||
# check controller profile & service | ||
@userful_msg() | ||
|
@@ -193,5 +207,16 @@ def check_mongo_profile(): | |
def check_mongo_service(): | ||
check_node_services('mongo') | ||
|
||
# check ceph-osd node profile & service | ||
@userful_msg() | ||
@register | ||
def check_ceph_osd_profile(): | ||
check_node_profiles('ceph_osd') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ceph-osd |
||
|
||
@userful_msg() | ||
@register | ||
def check_ceph_osd_service(): | ||
check_node_services('ceph_osd') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ceph-osd |
||
|
||
def cmd_warn(node_role): | ||
LOG.warn('This command can only run on fuel or %s node !' % node_role) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[global] | ||
auth_cluster_required = cephx | ||
auth_service_required = cephx | ||
auth_client_required = cephx | ||
filestore_xattr_use_omap = true | ||
log_to_syslog_level = info | ||
log_to_syslog = False | ||
log_to_syslog_facility = LOG_LOCAL0 | ||
auth_supported = cephx | ||
osd_mkfs_type = xfs | ||
[client] | ||
rbd_cache_writethrough_until_flush = True | ||
rbd_cache = True |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[global] | ||
cluster_network = | ||
mon_host = | ||
public_network = | ||
mon_initial_members = | ||
fsid = | ||
osd_pool_default_pg_num = | ||
osd_pool_default_pgp_num = | ||
osd_journal_size = | ||
osd_pool_default_size = | ||
osd_pool_default_min_size = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ceph-osd