Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cephadm: reduce spam to cephadm.log #47088

Merged
merged 2 commits into from Jul 27, 2022
Merged

Conversation

adk3798
Copy link
Contributor

@adk3798 adk3798 commented Jul 13, 2022

Fixes: https://tracker.ceph.com/issues/56552

Signed-off-by: Adam King adking@redhat.com

By introducing a new QUIET log level that only prints to the console or log file when --verbose is passed, we can reduce how much our regular metadata gathering commands spam the log while still allowing us to see the full output when running the command manually for debugging purposes.

Example output in cephadm.log after running

cephadm ls
cephadm --verbose ls
cephadm shell -- ceph orch ps
cephadm --verbose shell -- ceph orch ps

Note that before this change everything being logged at QUIET level in this output would have been printed to the log every time these commands were run (but at DEBUG level)

2022-07-13 22:07:54,863 7f332c5ffb80 DEBUG --------------------------------------------------------------------------------
cephadm ['ls']
2022-07-13 22:08:01,081 7f8516cc9b80 DEBUG --------------------------------------------------------------------------------
cephadm ['--verbose', 'ls']
2022-07-13 22:08:01,242 7f8516cc9b80 QUIET /usr/bin/podman: stdout 4.0.2
2022-07-13 22:08:01,432 7f8516cc9b80 QUIET /usr/bin/podman: stdout 06f4c7d03a9c,55.04MB / 41.96GB
2022-07-13 22:08:01,433 7f8516cc9b80 QUIET /usr/bin/podman: stdout 16b28ebd9b29,467.1MB / 41.96GB
2022-07-13 22:08:01,434 7f8516cc9b80 QUIET /usr/bin/podman: stdout 5d5302ddbf13,50.5MB / 41.96GB
2022-07-13 22:08:01,434 7f8516cc9b80 QUIET /usr/bin/podman: stdout 796918b51ecd,19.78MB / 41.96GB
2022-07-13 22:08:01,434 7f8516cc9b80 QUIET /usr/bin/podman: stdout 7b38712c8e47,23.6MB / 41.96GB
2022-07-13 22:08:01,435 7f8516cc9b80 QUIET /usr/bin/podman: stdout 8278e4f2802f,6.816MB / 41.96GB
2022-07-13 22:08:01,616 7f8516cc9b80 QUIET /usr/bin/podman: stdout 06f4c7d03a9c,3.86%
2022-07-13 22:08:01,617 7f8516cc9b80 QUIET /usr/bin/podman: stdout 16b28ebd9b29,5.29%
2022-07-13 22:08:01,617 7f8516cc9b80 QUIET /usr/bin/podman: stdout 5d5302ddbf13,9.35%
2022-07-13 22:08:01,618 7f8516cc9b80 QUIET /usr/bin/podman: stdout 796918b51ecd,2.68%
2022-07-13 22:08:01,618 7f8516cc9b80 QUIET /usr/bin/podman: stdout 7b38712c8e47,7.24%
2022-07-13 22:08:01,618 7f8516cc9b80 QUIET /usr/bin/podman: stdout 8278e4f2802f,6.55%
2022-07-13 22:08:01,650 7f8516cc9b80 QUIET systemctl: stdout enabled
2022-07-13 22:08:01,663 7f8516cc9b80 QUIET systemctl: stdout active
2022-07-13 22:08:01,836 7f8516cc9b80 QUIET /usr/bin/podman: stdout 5d5302ddbf13757d7908bedf73af4d77bcecfaea3066afefe29bb4f8534642c5,quay.io/adk3798/ceph:testing,0114a0cdcf9dbb2b593c53f9acc05ba8d543c96ade970cd71777bff2f03473fa,2022-07-13 21:55:06.529026914 +0000 UTC,
2022-07-13 22:08:02,015 7f8516cc9b80 QUIET /usr/bin/podman: stdout [quay.io/adk3798/ceph@sha256:dba7ffeb0f6239c6ef7155ac4e102141e5e83f3acb24337accd794ff2b0d572b]
2022-07-13 22:08:02,373 7f8516cc9b80 QUIET /usr/bin/podman: stdout ceph version 17.0.0-12762-g63f84c50 (63f84c50e0851d456fc38b3330945c54162dd544) quincy (dev)
2022-07-13 22:08:02,388 7f8516cc9b80 QUIET systemctl: stdout enabled
2022-07-13 22:08:02,401 7f8516cc9b80 QUIET systemctl: stdout active
2022-07-13 22:08:02,568 7f8516cc9b80 QUIET /usr/bin/podman: stdout 16b28ebd9b29eaf50c70b750137dc7587e807f85409dd072fc4462307a364cad,quay.io/adk3798/ceph:testing,0114a0cdcf9dbb2b593c53f9acc05ba8d543c96ade970cd71777bff2f03473fa,2022-07-13 21:55:08.215025028 +0000 UTC,
2022-07-13 22:08:02,605 7f8516cc9b80 QUIET systemctl: stdout enabled
2022-07-13 22:08:02,616 7f8516cc9b80 QUIET systemctl: stdout active
2022-07-13 22:08:02,782 7f8516cc9b80 QUIET /usr/bin/podman: stdout 7b38712c8e473697a2afb7b62caa15ddbf0c80a01696238e11f06b607ff6bbcc,quay.io/prometheus/alertmanager:v0.23.0,ba2b418f427c0636d654de8757e830c80168e76482bcc46bb2138e569d6c91d4,2022-07-13 21:58:28.0207151 +0000 UTC,
2022-07-13 22:08:02,992 7f8516cc9b80 QUIET /usr/bin/podman: stdout [quay.io/prometheus/alertmanager@sha256:3915fd90525daa23260082194e3ca8a75c51af5d436b64eeff16f0c7e54ef829 quay.io/prometheus/alertmanager@sha256:9ab73a421b65b80be072f96a88df756fc5b52a1bc8d983537b8ec5be8b624c5a]
2022-07-13 22:08:03,284 7f8516cc9b80 QUIET /usr/bin/podman: stdout alertmanager, version 0.23.0 (branch: HEAD, revision: 61046b17771a57cfd4c4a51be370ab930a4d7d54)
2022-07-13 22:08:03,285 7f8516cc9b80 QUIET /usr/bin/podman: stdout   build user:       root@e21a959be8d2
2022-07-13 22:08:03,285 7f8516cc9b80 QUIET /usr/bin/podman: stdout   build date:       20210825-10:48:55
2022-07-13 22:08:03,285 7f8516cc9b80 QUIET /usr/bin/podman: stdout   go version:       go1.16.7
2022-07-13 22:08:03,285 7f8516cc9b80 QUIET /usr/bin/podman: stdout   platform:         linux/amd64
2022-07-13 22:08:03,302 7f8516cc9b80 QUIET systemctl: stdout enabled
2022-07-13 22:08:03,315 7f8516cc9b80 QUIET systemctl: stdout active
2022-07-13 22:08:03,497 7f8516cc9b80 QUIET /usr/bin/podman: stdout 8278e4f2802fe36564f3da5fc9cb519fb0a6e760b10c687b60e32bf6ddb0d304,quay.io/adk3798/ceph@sha256:dba7ffeb0f6239c6ef7155ac4e102141e5e83f3acb24337accd794ff2b0d572b,0114a0cdcf9dbb2b593c53f9acc05ba8d543c96ade970cd71777bff2f03473fa,2022-07-13 21:56:20.914716287 +0000 UTC,
2022-07-13 22:08:03,512 7f8516cc9b80 QUIET systemctl: stdout enabled
2022-07-13 22:08:03,522 7f8516cc9b80 QUIET systemctl: stdout active
2022-07-13 22:08:03,706 7f8516cc9b80 QUIET /usr/bin/podman: stdout 06f4c7d03a9cba5056ffb039abeb34c0d73ffb621d96df4d7f7586f0f9ec9af3,quay.io/ceph/ceph-grafana:8.3.5,dad864ee21e98e69f4029d1e417aa085001566be0d322fbc75bc6f29b0050c01,2022-07-13 21:58:31.545394351 +0000 UTC,
2022-07-13 22:08:03,954 7f8516cc9b80 QUIET /usr/bin/podman: stdout [quay.io/ceph/ceph-grafana@sha256:09d5d36bc52314dc0f86e616d959d147bb61d4120dcce1f9be244b324c4b0f36 quay.io/ceph/ceph-grafana@sha256:f5273853535cbeb49c24ab539ad6e21ca41c9e894753f33b992f232ce40d6c00]
2022-07-13 22:08:04,396 7f8516cc9b80 QUIET /usr/bin/podman: stdout Version 8.3.5 (commit: a53fcac7b1, branch: HEAD)
2022-07-13 22:08:04,431 7f8516cc9b80 QUIET systemctl: stdout enabled
2022-07-13 22:08:04,444 7f8516cc9b80 QUIET systemctl: stdout active
2022-07-13 22:08:04,610 7f8516cc9b80 QUIET /usr/bin/podman: stdout 796918b51ecda59578b27590d8dc20f2b92fe6e1c464807d497d28668020e6f4,quay.io/prometheus/node-exporter:v1.3.1,1dbe0e931976487e20e5cfb272087e08a9779c88fd5e9617ed7042dd9751ec26,2022-07-13 21:56:41.162162502 +0000 UTC,
2022-07-13 22:08:04,806 7f8516cc9b80 QUIET /usr/bin/podman: stdout [quay.io/prometheus/node-exporter@sha256:d5b2a2e2bb07a4a5a7c4bd9e54641cab63e1d2627622dbde17efc04849d3d30d quay.io/prometheus/node-exporter@sha256:f2269e73124dd0f60a7d19a2ce1264d33d08a985aed0ee6b0b89d0be470592cd]
2022-07-13 22:08:05,092 7f8516cc9b80 QUIET /usr/bin/podman: stdout node_exporter, version 1.3.1 (branch: HEAD, revision: a2321e7b940ddcff26873612bccdf7cd4c42b6b6)
2022-07-13 22:08:05,092 7f8516cc9b80 QUIET /usr/bin/podman: stdout   build user:       root@243aafa5525c
2022-07-13 22:08:05,093 7f8516cc9b80 QUIET /usr/bin/podman: stdout   build date:       20211205-11:09:49
2022-07-13 22:08:05,093 7f8516cc9b80 QUIET /usr/bin/podman: stdout   go version:       go1.17.3
2022-07-13 22:08:05,093 7f8516cc9b80 QUIET /usr/bin/podman: stdout   platform:         linux/amd64
2022-07-13 22:08:11,686 7f5aaf777b80 DEBUG --------------------------------------------------------------------------------
cephadm ['gather-facts']
2022-07-13 22:08:26,417 7fd5c0a96b80 DEBUG --------------------------------------------------------------------------------
cephadm ['shell', '--', 'ceph', 'orch', 'ps']
2022-07-13 22:08:26,574 7fd5c0a96b80 DEBUG Using default config /etc/ceph/ceph.conf
2022-07-13 22:08:26,939 7fd5c0a96b80 INFO Inferring fsid 5e370bfe-02f6-11ed-abab-525400271ee5
2022-07-13 22:08:27,308 7fd5c0a96b80 INFO Inferring config /var/lib/ceph/5e370bfe-02f6-11ed-abab-525400271ee5/mon.vm-00/config
2022-07-13 22:08:27,481 7fd5c0a96b80 DEBUG /usr/bin/podman: stdout quay.io/adk3798/ceph@sha256:dba7ffeb0f6239c6ef7155ac4e102141e5e83f3acb24337accd794ff2b0d572b|0114a0cdcf9d|testing|2022-07-13 21:52:44 +0000 UTC
2022-07-13 22:08:28,048 7fd5c0a96b80 DEBUG Using container info for daemon 'mon'
2022-07-13 22:08:28,049 7fd5c0a96b80 INFO Using ceph image with id '0114a0cdcf9d' and tag 'testing' created on 2022-07-13 21:52:44 +0000 UTC
quay.io/adk3798/ceph@sha256:dba7ffeb0f6239c6ef7155ac4e102141e5e83f3acb24337accd794ff2b0d572b
2022-07-13 22:08:28,469 7fd5c0a96b80 DEBUG Running command (timeout=None): /usr/bin/podman run --rm --ipc=host --net=host --privileged --group-add=disk --init -i -e CONTAINER_IMAGE=quay.io/adk3798/ceph@sha256:dba7ffeb0f6239c6ef7155ac4e102141e5e83f3acb24337accd794ff2b0d572b -e NODE_NAME=vm-00 -e CEPH_USE_RANDOM_NONCE=1 -v /var/run/ceph/5e370bfe-02f6-11ed-abab-525400271ee5:/var/run/ceph:z -v /var/log/ceph/5e370bfe-02f6-11ed-abab-525400271ee5:/var/log/ceph:z -v /var/lib/ceph/5e370bfe-02f6-11ed-abab-525400271ee5/crash:/var/lib/ceph/crash:z -v /run/systemd/journal:/run/systemd/journal -v /dev:/dev -v /run/udev:/run/udev -v /sys:/sys -v /run/lvm:/run/lvm -v /run/lock/lvm:/run/lock/lvm -v /var/lib/ceph/5e370bfe-02f6-11ed-abab-525400271ee5/selinux:/sys/fs/selinux:ro -v /:/rootfs -v /var/lib/ceph/5e370bfe-02f6-11ed-abab-525400271ee5/mon.vm-00/config:/etc/ceph/ceph.conf:z -v /var/lib/ceph/5e370bfe-02f6-11ed-abab-525400271ee5/config/ceph.client.admin.keyring:/etc/ceph/ceph.keyring:z --entrypoint ceph quay.io/adk3798/ceph@sha256:dba7ffeb0f6239c6ef7155ac4e102141e5e83f3acb24337accd794ff2b0d572b orch ps
2022-07-13 22:08:35,523 7f039b296b80 DEBUG --------------------------------------------------------------------------------
cephadm ['--verbose', 'shell', '--', 'ceph', 'orch', 'ps']
2022-07-13 22:08:35,574 7f039b296b80 QUIET /usr/bin/podman: stdout 4.0.2
2022-07-13 22:08:35,574 7f039b296b80 DEBUG Using default config /etc/ceph/ceph.conf
2022-07-13 22:08:35,736 7f039b296b80 QUIET /usr/bin/podman: stdout 06f4c7d03a9c,56.09MB / 41.96GB
2022-07-13 22:08:35,738 7f039b296b80 QUIET /usr/bin/podman: stdout 16b28ebd9b29,467.3MB / 41.96GB
2022-07-13 22:08:35,738 7f039b296b80 QUIET /usr/bin/podman: stdout 5d5302ddbf13,50.45MB / 41.96GB
2022-07-13 22:08:35,739 7f039b296b80 QUIET /usr/bin/podman: stdout 796918b51ecd,21.39MB / 41.96GB
2022-07-13 22:08:35,739 7f039b296b80 QUIET /usr/bin/podman: stdout 7b38712c8e47,23.6MB / 41.96GB
2022-07-13 22:08:35,739 7f039b296b80 QUIET /usr/bin/podman: stdout 8278e4f2802f,6.816MB / 41.96GB
2022-07-13 22:08:35,933 7f039b296b80 QUIET /usr/bin/podman: stdout 06f4c7d03a9c,4.07%
2022-07-13 22:08:35,934 7f039b296b80 QUIET /usr/bin/podman: stdout 16b28ebd9b29,5.41%
2022-07-13 22:08:35,935 7f039b296b80 QUIET /usr/bin/podman: stdout 5d5302ddbf13,9.81%
2022-07-13 22:08:35,935 7f039b296b80 QUIET /usr/bin/podman: stdout 796918b51ecd,2.84%
2022-07-13 22:08:35,935 7f039b296b80 QUIET /usr/bin/podman: stdout 7b38712c8e47,7.73%
2022-07-13 22:08:35,936 7f039b296b80 QUIET /usr/bin/podman: stdout 8278e4f2802f,6.55%
2022-07-13 22:08:35,938 7f039b296b80 INFO Inferring fsid 5e370bfe-02f6-11ed-abab-525400271ee5
2022-07-13 22:08:36,119 7f039b296b80 QUIET /usr/bin/podman: stdout 06f4c7d03a9c,56.09MB / 41.96GB
2022-07-13 22:08:36,120 7f039b296b80 QUIET /usr/bin/podman: stdout 16b28ebd9b29,467.3MB / 41.96GB
2022-07-13 22:08:36,120 7f039b296b80 QUIET /usr/bin/podman: stdout 5d5302ddbf13,50.45MB / 41.96GB
2022-07-13 22:08:36,121 7f039b296b80 QUIET /usr/bin/podman: stdout 796918b51ecd,21.39MB / 41.96GB
2022-07-13 22:08:36,121 7f039b296b80 QUIET /usr/bin/podman: stdout 7b38712c8e47,23.6MB / 41.96GB
2022-07-13 22:08:36,121 7f039b296b80 QUIET /usr/bin/podman: stdout 8278e4f2802f,6.816MB / 41.96GB
2022-07-13 22:08:36,302 7f039b296b80 QUIET /usr/bin/podman: stdout 06f4c7d03a9c,4.07%
2022-07-13 22:08:36,303 7f039b296b80 QUIET /usr/bin/podman: stdout 16b28ebd9b29,5.41%
2022-07-13 22:08:36,304 7f039b296b80 QUIET /usr/bin/podman: stdout 5d5302ddbf13,9.82%
2022-07-13 22:08:36,304 7f039b296b80 QUIET /usr/bin/podman: stdout 796918b51ecd,2.84%
2022-07-13 22:08:36,304 7f039b296b80 QUIET /usr/bin/podman: stdout 7b38712c8e47,7.73%
2022-07-13 22:08:36,305 7f039b296b80 QUIET /usr/bin/podman: stdout 8278e4f2802f,6.55%
2022-07-13 22:08:36,306 7f039b296b80 INFO Inferring config /var/lib/ceph/5e370bfe-02f6-11ed-abab-525400271ee5/mon.vm-00/config
2022-07-13 22:08:36,482 7f039b296b80 DEBUG /usr/bin/podman: stdout quay.io/adk3798/ceph@sha256:dba7ffeb0f6239c6ef7155ac4e102141e5e83f3acb24337accd794ff2b0d572b|0114a0cdcf9d|testing|2022-07-13 21:52:44 +0000 UTC
2022-07-13 22:08:36,568 7f039b296b80 QUIET /usr/bin/podman: stdout 06f4c7d03a9c,56.09MB / 41.96GB
2022-07-13 22:08:36,568 7f039b296b80 QUIET /usr/bin/podman: stdout 16b28ebd9b29,467.3MB / 41.96GB
2022-07-13 22:08:36,568 7f039b296b80 QUIET /usr/bin/podman: stdout 5d5302ddbf13,50.45MB / 41.96GB
2022-07-13 22:08:36,568 7f039b296b80 QUIET /usr/bin/podman: stdout 796918b51ecd,21.39MB / 41.96GB
2022-07-13 22:08:36,568 7f039b296b80 QUIET /usr/bin/podman: stdout 7b38712c8e47,23.6MB / 41.96GB
2022-07-13 22:08:36,568 7f039b296b80 QUIET /usr/bin/podman: stdout 8278e4f2802f,6.816MB / 41.96GB
2022-07-13 22:08:36,728 7f039b296b80 QUIET /usr/bin/podman: stdout 06f4c7d03a9c,4.07%
2022-07-13 22:08:36,729 7f039b296b80 QUIET /usr/bin/podman: stdout 16b28ebd9b29,5.41%
2022-07-13 22:08:36,729 7f039b296b80 QUIET /usr/bin/podman: stdout 5d5302ddbf13,9.82%
2022-07-13 22:08:36,729 7f039b296b80 QUIET /usr/bin/podman: stdout 796918b51ecd,2.84%
2022-07-13 22:08:36,729 7f039b296b80 QUIET /usr/bin/podman: stdout 7b38712c8e47,7.73%
2022-07-13 22:08:36,730 7f039b296b80 QUIET /usr/bin/podman: stdout 8278e4f2802f,6.55%
2022-07-13 22:08:36,935 7f039b296b80 QUIET /usr/bin/podman: stdout 5d5302ddbf13757d7908bedf73af4d77bcecfaea3066afefe29bb4f8534642c5,quay.io/adk3798/ceph:testing,0114a0cdcf9dbb2b593c53f9acc05ba8d543c96ade970cd71777bff2f03473fa,2022-07-13 21:55:06.529026914 +0000 UTC,
2022-07-13 22:08:36,937 7f039b296b80 DEBUG Using container info for daemon 'mon'
2022-07-13 22:08:36,937 7f039b296b80 INFO Using ceph image with id '0114a0cdcf9d' and tag 'testing' created on 2022-07-13 21:52:44 +0000 UTC
quay.io/adk3798/ceph@sha256:dba7ffeb0f6239c6ef7155ac4e102141e5e83f3acb24337accd794ff2b0d572b
2022-07-13 22:08:37,417 7f039b296b80 QUIET stat: stdout 167 167
2022-07-13 22:08:37,436 7f039b296b80 QUIET sestatus: stdout SELinux status:                 enabled
2022-07-13 22:08:37,437 7f039b296b80 QUIET sestatus: stdout SELinuxfs mount:                /sys/fs/selinux
2022-07-13 22:08:37,437 7f039b296b80 QUIET sestatus: stdout SELinux root directory:         /etc/selinux
2022-07-13 22:08:37,437 7f039b296b80 QUIET sestatus: stdout Loaded policy name:             targeted
2022-07-13 22:08:37,437 7f039b296b80 QUIET sestatus: stdout Current mode:                   permissive
2022-07-13 22:08:37,437 7f039b296b80 QUIET sestatus: stdout Mode from config file:          permissive
2022-07-13 22:08:37,437 7f039b296b80 QUIET sestatus: stdout Policy MLS status:              enabled
2022-07-13 22:08:37,437 7f039b296b80 QUIET sestatus: stdout Policy deny_unknown status:     allowed
2022-07-13 22:08:37,437 7f039b296b80 QUIET sestatus: stdout Memory protection checking:     actual (secure)
2022-07-13 22:08:37,437 7f039b296b80 QUIET sestatus: stdout Max kernel policy version:      33
2022-07-13 22:08:37,442 7f039b296b80 QUIET sestatus: stdout SELinux status:                 enabled
2022-07-13 22:08:37,443 7f039b296b80 QUIET sestatus: stdout SELinuxfs mount:                /sys/fs/selinux
2022-07-13 22:08:37,443 7f039b296b80 QUIET sestatus: stdout SELinux root directory:         /etc/selinux
2022-07-13 22:08:37,443 7f039b296b80 QUIET sestatus: stdout Loaded policy name:             targeted
2022-07-13 22:08:37,443 7f039b296b80 QUIET sestatus: stdout Current mode:                   permissive
2022-07-13 22:08:37,443 7f039b296b80 QUIET sestatus: stdout Mode from config file:          permissive
2022-07-13 22:08:37,443 7f039b296b80 QUIET sestatus: stdout Policy MLS status:              enabled
2022-07-13 22:08:37,443 7f039b296b80 QUIET sestatus: stdout Policy deny_unknown status:     allowed
2022-07-13 22:08:37,443 7f039b296b80 QUIET sestatus: stdout Memory protection checking:     actual (secure)
2022-07-13 22:08:37,443 7f039b296b80 QUIET sestatus: stdout Max kernel policy version:      33
2022-07-13 22:08:37,444 7f039b296b80 DEBUG Running command (timeout=None): /usr/bin/podman run --rm --ipc=host --net=host --privileged --group-add=disk --init -i -e CONTAINER_IMAGE=quay.io/adk3798/ceph@sha256:dba7ffeb0f6239c6ef7155ac4e102141e5e83f3acb24337accd794ff2b0d572b -e NODE_NAME=vm-00 -e CEPH_USE_RANDOM_NONCE=1 -v /var/run/ceph/5e370bfe-02f6-11ed-abab-525400271ee5:/var/run/ceph:z -v /var/log/ceph/5e370bfe-02f6-11ed-abab-525400271ee5:/var/log/ceph:z -v /var/lib/ceph/5e370bfe-02f6-11ed-abab-525400271ee5/crash:/var/lib/ceph/crash:z -v /run/systemd/journal:/run/systemd/journal -v /dev:/dev -v /run/udev:/run/udev -v /sys:/sys -v /run/lvm:/run/lvm -v /run/lock/lvm:/run/lock/lvm -v /var/lib/ceph/5e370bfe-02f6-11ed-abab-525400271ee5/selinux:/sys/fs/selinux:ro -v /:/rootfs -v /var/lib/ceph/5e370bfe-02f6-11ed-abab-525400271ee5/mon.vm-00/config:/etc/ceph/ceph.conf:z -v /var/lib/ceph/5e370bfe-02f6-11ed-abab-525400271ee5/config/ceph.client.admin.keyring:/etc/ceph/ceph.keyring:z --entrypoint ceph quay.io/adk3798/ceph@sha256:dba7ffeb0f6239c6ef7155ac4e102141e5e83f3acb24337accd794ff2b0d572b orch ps

Contribution Guidelines

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows

@adk3798 adk3798 requested a review from a team as a code owner July 13, 2022 22:29
@adk3798
Copy link
Contributor Author

adk3798 commented Jul 14, 2022

jenkins test api

Comment on lines 1735 to 1736
elif verbosity == CallVerbosity.DEBUG or verbosity == CallVerbosity.VERBOSE_ON_FAILURE:
logger.debug(message)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand why in case of CallVerbosity.VERBOSE_ON_FAILURE: we use debug even if no error. Shouldn't we use info in this case?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was mostly just maintaining the old behavior for this log setting with this one, but I think the idea is that, since by default only info level and above are logged to the console, we only log errors on that level and then non-errors go to debug level where they won't pop up in the console. Hence, it is only "verbose" (logging to the console) when there's an error.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, got it 👍

Comment on lines -1733 to -1736
if verbosity == CallVerbosity.VERBOSE:
logger.info(prefix + message.rstrip())
elif verbosity != CallVerbosity.SILENT:
logger.debug(prefix + message.rstrip())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like we are removing logging on these cases. Just to make sure we are doing it on purpose.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should all still get logged. In the old code, it was directly making log calls from this internal function tee with the stdout/stderr and then we were only doing additional logging afterwards if there was an error. Now it calls _log_from_call function with the stdout and stderr after the fact always instead of doing it within tee

@adk3798
Copy link
Contributor Author

adk3798 commented Jul 18, 2022

https://pulpito.ceph.com/adking-2022-07-17_04:25:04-orch:cephadm-wip-adk-testing-2022-07-16-1847-distro-default-smithi/

2 failures:

Neither failure is new or related to PRs in the run

Copy link
Contributor

@phlogistonjohn phlogistonjohn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Various suggestions. I feel it improves the "mental locality" for me. Feel free to take them or leave them.

src/cephadm/cephadm Outdated Show resolved Hide resolved
src/cephadm/cephadm Outdated Show resolved Hide resolved
src/cephadm/cephadm Outdated Show resolved Hide resolved
Signed-off-by: Adam King <adking@redhat.com>
The QUIET log level only gets sent to the console or log file
if --verbose is passed to cephadm. This means our regulat metadata
gathering operations won't spam the log file as we don't pass --verbose
when running them, but users can still pass --verbose when running
the commands manually for debugging purposes

Fixes: https://tracker.ceph.com/issues/56552

Signed-off-by: Adam King <adking@redhat.com>
@adk3798
Copy link
Contributor Author

adk3798 commented Jul 19, 2022

jenkins test api

Copy link
Contributor

@phlogistonjohn phlogistonjohn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@adk3798
Copy link
Contributor Author

adk3798 commented Jul 27, 2022

@adk3798 adk3798 merged commit 257d259 into ceph:main Jul 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants