Skip to content

Commit e9955b8

Browse files
authored
[ydbd_slice] fix Namespace exception(args.confirm) on update (#13171)
1 parent 1d8fe0a commit e9955b8

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

ydb/tools/ydbd_slice/__init__.py

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,11 @@ def deduce_components_from_args(args, cluster_details):
300300
if 'dynamic_slots' in result:
301301
result['dynamic_slots'] = ['all']
302302

303-
result['confirm'] = args.confirm
303+
if hasattr(args, "confirm"):
304+
confirm = args.confirm
305+
else:
306+
confirm = True
307+
result['confirm'] = confirm
304308

305309
logger.debug("active components is '%s'", result)
306310
return result
@@ -749,10 +753,17 @@ def _run(args):
749753

750754
mode = modes.add_parser(
751755
"clear",
752-
parents=[direct_nodes_args(), cluster_description_args(), binaries_args(), component_args(), ssh_args()],
756+
parents=[
757+
direct_nodes_args(),
758+
cluster_description_args(),
759+
binaries_args(),
760+
component_args(),
761+
ssh_args(),
762+
with_confirmation(),
763+
],
753764
description="Stop all ydbd instances at the nodes, format all ydbd drives, shutdown dynamic slots. "
754-
"And don't start nodes after it. "
755-
"Use --hosts to specify particular hosts."
765+
"And don't start nodes after it. "
766+
"Use --hosts to specify particular hosts.",
756767
)
757768
mode.set_defaults(handler=_run)
758769

0 commit comments

Comments
 (0)