microceph icon indicating copy to clipboard operation
microceph copied to clipboard

Log level resets to "0" after microceppd restarts

Open tregubovav-dev opened this issue 10 months ago • 0 comments

Log level resets to "0" after microcephd restarts or host reboots

This issue is related to https://github.com/canonical/microceph/issues/239.

What version of MicroCeph are you using ?

$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 23.10 Release: 23.10 Codename: mantic

$ sudo microceph --version ceph-version: 18.2.0-0ubuntu3~cloud0; microceph-git: 450240f5dd

What are the steps to reproduce this issue ?

  1. verify log level using command sudo microceph log get-level. In my case it always 0 (zero) after host reboots.
  2. change log level to any other than 0 (zero), for example using next command: sudo microceph log set-level 3
  3. verify that log level change is accepted using command sudo microceph log get-level. (actually microcephd continues producing debug level logs due to bug https://github.com/canonical/microceph/issues/239).
  4. restart microcephd using command sudo snap restart microceph.daemon and wait for several seconds until the microcephd restarts and initializes. You can also restart host instead of restarting microcephd service via snap.
  5. verify log level using command sudo microceph log get-level.

What happens (observed behaviour) ?

log level resets to "0" (zero) after microcephd restarts

What were you expecting to happen ?

log level should remain the same as set in step 3 of "steps to reproduce" section above.

Relevant logs, error output, etc.

test shell script:

#!/bin/sh
echo ">>>" && \
echo "Current log level: $(sudo microceph log get-level)" && \
echo "Changing log level to 3" && sudo microceph log set-level 3 && \
echo "Log level has been updated to: $(sudo microceph log get-level)" && \
echo "Restarting microcephd" && sudo snap restart microceph.daemon && \
echo "Waiting for 10s" && sleep 10s && \
echo "Log level after restart: $(sudo microceph log get-level)" && \
echo "<<<"

script output

Current log level: 0 Changing log level to 3 Log level has been updated to: 3 Restarting microcephd Restarted. Waiting for 10s Log level after restart: 0 <<<

If it’s considerably long, please paste to https://gist.github.com/ and insert the link here.

Additional comments.

tregubovav-dev avatar Apr 13 '24 04:04 tregubovav-dev