Disable config_controller
This commit disables the use of config_controller to configure the initial controller. To ease the transition to Ansible bootstrap, the --force option is provided. This option will be available for the duration of 1 week. After which time, the relevant code of config_controller will be removed. Tests performed: - Verify that config_controller --default, --config-file, and interactive cannot be used without --force - Verify that config_controller --default, --config-file, and interactive can be used with --force option - Verify that the invocations of other config_controller functionalities such as clone, backup, restore are unaffected by this change. Story: 2004695 Task: 30851 Depends-0n: I9fe72b87ea2edec0195f3fc0c2db4cb3bc008900 Change-Id: I1faab71ecc9fa1ea3c913b422156be6a7ade8cf5 Signed-off-by: Tee Ngo <tee.ngo@windriver.com>
This commit is contained in:
parent
97c98fc1d0
commit
16df5d0680
@ -306,6 +306,7 @@ def main():
|
||||
do_clone = False
|
||||
do_non_interactive = False
|
||||
do_provision = False
|
||||
force_config = False
|
||||
system_config_file = "/home/wrsroot/system_config"
|
||||
allow_ssh = False
|
||||
|
||||
@ -401,6 +402,8 @@ def main():
|
||||
# This is a temporary flag for use during development. Once things
|
||||
# are stable, we will remove it and make kubernetes the default.
|
||||
options['kubernetes'] = True
|
||||
elif sys.argv[arg] == "--force":
|
||||
force_config = True
|
||||
else:
|
||||
print("Invalid option. Use --help for more information.")
|
||||
exit(1)
|
||||
@ -459,6 +462,12 @@ def main():
|
||||
assistant = ConfigAssistant(**options)
|
||||
assistant.provision(answerfile)
|
||||
else:
|
||||
if not force_config:
|
||||
print(textwrap.fill(
|
||||
"Please use bootstrap playbook to configure the "
|
||||
"first controller.", 80))
|
||||
exit(1)
|
||||
|
||||
if do_non_interactive:
|
||||
if not os.path.isfile(system_config_file):
|
||||
raise ConfigFail("Config file %s does not exist." %
|
||||
|
Loading…
Reference in New Issue
Block a user