Skip to content

Commit 8af60d7

Browse files
authored
Merge pull request ceph#61017 from ShwetaBhosale1/fix_issue_69174_ceph_orch_apply_command_accepts_both_positional_and_keyword_argument
mgr/cephadm: Ceph orch apply command does not give error if 'placement' is passed as both positional and keyword argument Reviewed-by: Adam King <[email protected]>
2 parents a76fd61 + 83d89ac commit 8af60d7

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)