mirror of
https://github.com/ceph/ceph
synced 2024-12-28 06:23:08 +00:00
Merge PR #33042 into master
* refs/pull/33042/head: cephadm: bootstrap: warn on fqdn hostname Reviewed-by: Sebastian Wagner <swagner@suse.com>
This commit is contained in:
commit
06c9e64bc6
@ -1610,6 +1610,8 @@ def command_bootstrap():
|
||||
# initial vars
|
||||
fsid = args.fsid or make_fsid()
|
||||
hostname = get_hostname()
|
||||
if '.' in hostname and not args.allow_fqdn_hostname:
|
||||
raise Error('hostname is a fully qualified domain name (%s); either fix (e.g., "sudo hostname %s" or similar) or pass --allow-fqdn-hostname' % (hostname, hostname.split('.')[0]))
|
||||
mon_id = args.mon_id or hostname
|
||||
mgr_id = args.mgr_id or generate_service_id()
|
||||
logging.info('Cluster fsid: %s' % fsid)
|
||||
@ -2830,6 +2832,10 @@ def _get_parser():
|
||||
'--allow-overwrite',
|
||||
action='store_true',
|
||||
help='allow overwrite of existing --output-* config/keyring/ssh files')
|
||||
parser_bootstrap.add_argument(
|
||||
'--allow-fqdn-hostname',
|
||||
action='store_true',
|
||||
help='allow hostname that is fully-qualified (contains ".")')
|
||||
|
||||
parser_deploy = subparsers.add_parser(
|
||||
'deploy', help='deploy a daemon')
|
||||
|
Loading…
Reference in New Issue
Block a user