Project

General

Profile

Feature #5419

cephtool: sanitize extra args before configuring cluster handle

Added by Noah Watkins almost 11 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
% Done:

0%

Source:
other
Tags:
Backport:
Reviewed:
Affected Versions:
Pull request ID:

Description

The '--admin-socket' argument is not a valid ceph tool argument. The option one would actually want is '--admin-daemon', despite the path specifying an admin socket, leading to an easy typo of using '--admin-socket'.

Ceph correctly reports that it is an invalid command:

ceph --admin-socket /path/to/osd.0.asok perf dump
no valid command found; 10 closest matches:
...
Error EINVAL: invalid command

But, ceph tool doesn't bail out on an invalid command before it does

retargs = cluster_handle.conf_parse_argv(childargs)

where childargs will hold the non-ceph-tool arguments. So, here childargs will be

['--admin-socket', '/path/to/osd.0.asok', 'perf', 'dump']

Well, it turns out that '--admin-socket' is a valid configuration option in Ceph.

So, the typo will blast away the osd admin socket, and the socket will then disappear once the client exits. That led to a lot of head scratching for a while because my admin socket kept disappearing :/

Also available in: Atom PDF