Skip to content

Commit 83d89ac

Browse files
mgr/cephadm: Ceph orch apply command does not give error if 'placement' is passed as both positional and keyword argument
Fixes: https://tracker.ceph.com/issues/69174 Signed-off-by: Shweta Bhosale <[email protected]>
1 parent e2ee420 commit 83d89ac

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/pybind/ceph_argparse.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1122,6 +1122,9 @@ def store_arg(desc: argdesc, args: Sequence[ValidatedArg], d: ValidatedArgs):
11221122
# prefixes' values should be a space-joined concatenation
11231123
d[desc.name] += ' ' + desc.instance.val
11241124
else:
1125+
# did we already get this argument
1126+
if desc.name in d:
1127+
raise ArgumentError(f"Duplicate argument '{desc.name}' found.")
11251128
# if first CephPrefix or any other type, just set it
11261129
d[desc.name] = desc.instance.val
11271130

0 commit comments

Comments
 (0)