]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
cephadm: add --dry-run option to cephadm {enter,logs,unit} commands
authorJohn Mulligan <jmulligan@redhat.com>
Mon, 12 May 2025 20:09:05 +0000 (16:09 -0400)
committerAdam King <adking@redhat.com>
Sat, 21 Jun 2025 18:08:13 +0000 (14:08 -0400)
commit4d7e0d3a38406d01b9838f63b178108b2dcc909f
tree74ef69e8361539c71de80106d8540b259e2a2c9f
parent818b4436a1df93ad74aa6d8000e493f29d0ded88
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>
(cherry picked from commit eb0519b6f88eee2ad07adccbdca6415aded5f4b1)
src/cephadm/cephadm.py