Skip to content

Commit

Permalink
Disable rbd debug logs by default
Browse files Browse the repository at this point in the history
Signed-off-by: Sheetal Pamecha <[email protected]>
  • Loading branch information
Sheetalpamecha committed Jul 22, 2024
1 parent f01709a commit fb95535
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
16 changes: 16 additions & 0 deletions test/addons/rbd-mirror/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# rbd-mirror addon

## Enabling debug logs

If Ceph developers require debug logs you can enable them by starting
the environment with RBD_MIRROR_DEBUG=1:

```
RBD_MIRROR_DEBUG=1 drenv start envs/regional-dr.yaml
```

If the environment is already running you can enable the logs using:

```
RBD_MIRROR_DEBUG=1 addons/rbd-mirror/start dr1 dr2
```
8 changes: 4 additions & 4 deletions test/addons/rbd-mirror/start
Original file line number Diff line number Diff line change
Expand Up @@ -240,12 +240,12 @@ cluster1 = sys.argv[1]
cluster2 = sys.argv[2]

# Run with RBD_MIRROR_DEBUG=0 to disable debug logs.
if os.environ.get("RBD_MIRROR_DEBUG") == "0":
disable_rbd_mirror_debug_logs(cluster1)
disable_rbd_mirror_debug_logs(cluster2)
else:
if os.environ.get("RBD_MIRROR_DEBUG") == "1":
enable_rbd_mirror_debug_logs(cluster1)
enable_rbd_mirror_debug_logs(cluster2)
else:
disable_rbd_mirror_debug_logs(cluster1)
disable_rbd_mirror_debug_logs(cluster2)

cluster1_info = fetch_secret_info(cluster1)
cluster2_info = fetch_secret_info(cluster2)
Expand Down

0 comments on commit fb95535

Please sign in to comment.