Hi Tony, Afaik those container flags just set the defaults and the config options override them. Setting the necessary flags ( https://docs.ceph.com/en/latest/cephadm/operations/#logging-to-files) seemed to work for me. [ceph: root@vm-00 /]# ceph config get osd.0 log_to_file false [ceph: root@vm-00 /]# ceph config show osd.0 log_to_file false [ceph: root@vm-00 /]# ceph config set global log_to_file true [ceph: root@vm-00 /]# ceph config set global mon_cluster_log_to_file true [ceph: root@vm-00 /]# ceph config get osd.0 log_to_file true [ceph: root@vm-00 /]# ceph config show osd.0 log_to_file true [ceph: root@vm-00 /]# ceph version ceph version 16.2.7-601-g179a7bca (179a7bca8a84771b0dde09e26f7a2146a985df90) pacific (stable) [ceph: root@vm-00 /]# exit exit [root@vm-00 ~]# ls /var/log/ceph/413f7ec8-a91e-11ec-9b02-52540092b5a3/ ceph.audit.log ceph.cephadm.log ceph.log ceph-mgr.vm-00.ukcctb.log ceph-mon.vm-00.log ceph-osd.0.log ceph-osd.10.log ceph-osd.2.log ceph-osd.4.log ceph-osd.6.log ceph-osd.8.log ceph-volume.log On Mon, Mar 21, 2022 at 1:06 AM Tony Liu <tonyliu0592@xxxxxxxxxxx> wrote: > Hi, > > After reading through doc, it's still not very clear to me how logging > works with container. > This is with Pacific v16.2 container. > > In OSD container, I see this. > ``` > /usr/bin/ceph-osd -n osd.16 -f --setuser ceph --setgroup ceph > --default-log-to-file=false --default-log-to-stderr=true > --default-log-stderr-prefix=debug > ``` > When check ceph configuration. > ``` > # ceph config get osd.16 log_file > /var/log/ceph/$cluster-$name.log > # ceph config get osd.16 log_to_file > true > # ceph config show osd.16 log_to_file > false > ``` > Q1, what's the intention of those log settings in command line? It's high > priority and overrides > configuration in file and mon. Is there any option not doing that when > deploy the container? > Q2, since log_to_file is set to false by command line, why there is still > loggings in log_file? > > The same for mgr and mon. > > What I want is to have everything in log file and minimize the stdout and > stderr from container. > Because log file is managed by logrotate, it unlikely blow up disk space. > But stdout and stderr > from container is stored in a single file, not managed by logrotate. It > may grow up to huge file. > Also, it's easier to check log file by vi than "podman logs". And log file > is also collected and > stored by ELK for central management. > > Any comments how I can achieve what I want? > Runtime override may not be the best option, cause it's not persistent. > > > Thanks! > Tony > > _______________________________________________ > ceph-users mailing list -- ceph-users@xxxxxxx > To unsubscribe send an email to ceph-users-leave@xxxxxxx > > _______________________________________________ ceph-users mailing list -- ceph-users@xxxxxxx To unsubscribe send an email to ceph-users-leave@xxxxxxx