]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
cephadm: add --dry-run option to cephadm {enter,logs,unit} commands 63247/head
authorJohn Mulligan <jmulligan@redhat.com>
Mon, 12 May 2025 20:09:05 +0000 (16:09 -0400)
committerJohn Mulligan <jmulligan@redhat.com>
Wed, 11 Jun 2025 14:50:05 +0000 (10:50 -0400)
commiteb0519b6f88eee2ad07adccbdca6415aded5f4b1
tree32ec0fd35b15c54ebcc56afb9998285963864f50
parent9149a1eefda36ed3480859c40e4a466923fa4946
cephadm: add --dry-run option to cephadm {enter,logs,unit} commands

Add a --dry-run option to the cephadm enter, cephadm logs, and
cephadm unit commands. Like cephadm shell --dry-run, this causes cephadm
to print the command it would have run rather than running said command.
This allows the user to copy and edit or otherwise hack on the output
to make variations on these comands without having to teach cephadm all
the possible options and switches those commands make take.
For instance I can follow recent mgr logging like so:
```
$(/tmp/cephadm logs -i mgr --dry-run | sed 's/ / --since=-1s -f /')
```

Signed-off-by: John Mulligan <jmulligan@redhat.com>
src/cephadm/cephadm.py