From e9955b8d3f15acce04b6728de40bea952f04abe3 Mon Sep 17 00:00:00 2001 From: Alexander Petrukhin Date: Sat, 4 Jan 2025 18:23:56 +0300 Subject: [PATCH] [ydbd_slice] fix Namespace exception(args.confirm) on update (#13171) --- ydb/tools/ydbd_slice/__init__.py | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/ydb/tools/ydbd_slice/__init__.py b/ydb/tools/ydbd_slice/__init__.py index 1b885c40f8d9..6b42ff284114 100644 --- a/ydb/tools/ydbd_slice/__init__.py +++ b/ydb/tools/ydbd_slice/__init__.py @@ -300,7 +300,11 @@ def deduce_components_from_args(args, cluster_details): if 'dynamic_slots' in result: result['dynamic_slots'] = ['all'] - result['confirm'] = args.confirm + if hasattr(args, "confirm"): + confirm = args.confirm + else: + confirm = True + result['confirm'] = confirm logger.debug("active components is '%s'", result) return result @@ -749,10 +753,17 @@ def _run(args): mode = modes.add_parser( "clear", - parents=[direct_nodes_args(), cluster_description_args(), binaries_args(), component_args(), ssh_args()], + parents=[ + direct_nodes_args(), + cluster_description_args(), + binaries_args(), + component_args(), + ssh_args(), + with_confirmation(), + ], description="Stop all ydbd instances at the nodes, format all ydbd drives, shutdown dynamic slots. " - "And don't start nodes after it. " - "Use --hosts to specify particular hosts." + "And don't start nodes after it. " + "Use --hosts to specify particular hosts.", ) mode.set_defaults(handler=_run)