Improve error logging
- Dominant language
- Python
- Stars
- 36
- Forks
- 20
- PR merge metrics
- No merged PRs in 30d
Description
We can see error messages like that?
```
2020-07-13T13:07:14.353 INFO:teuthology.orchestra.run.target-ses-060.stdout:Failure in minion: target-ses-060.ecp.suse.de
2020-07-13T13:07:14.359 INFO:teuthology.orchestra.run.target-ses-060.stdout:__id__: download ceph container image
2020-07-13T13:07:14.360 INFO:teuthology.orchestra.run.target-ses-060.stdout:__run_num__: 60
2020-07-13T13:07:14.361 INFO:teuthology.orchestra.run.target-ses-060.stdout:__sls__: ceph-salt.cephtools
2020-07-13T13:07:14.362 INFO:teuthology.orchestra.run.target-ses-060.stdout:changes:
2020-07-13T13:07:14.363 INFO:teuthology.orchestra.run.target-ses-060.stdout: pid: 12811
2020-07-13T13:07:14.364 INFO:teuthology.orchestra.run.target-ses-060.stdout: retcode: 1
2020-07-13T13:07:14.365 INFO:teuthology.orchestra.run.target-ses-060.stdout: stderr: "INFO:cephadm:Pulling latest registry.suse.de/suse/sle-15-sp2/update/products/ses7/milestones/containers/ses/7/ceph/ceph...\n\
2020-07-13T13:07:14.366 INFO:teuthology.orchestra.run.target-ses-060.stdout: INFO:cephadm:Non-zero exit code 125 from /usr/bin/podman pull registry.suse.de/suse/sle-15-sp2/update/products/ses7/milestones/containers/ses/7/ceph/ceph\n\
2020-07-13T13:07:14.367 INFO:teuthology.orchestra.run.target-ses-060.stdout: INFO:cephadm:/usr/bin/podman:stderr Trying to pull registry.suse.de/suse/sle-15-sp2/update/products/ses7/milestones/containers/ses/7/ceph/ceph...\n\
2020-07-13T13:07:14.368 INFO:teuthology.orchestra.run.target-ses-060.stdout: INFO:cephadm:/usr/bin/podman:stderr Get https://registry.suse.de/v2/: x509:\
2020-07-13T13:07:14.370 INFO:teuthology.orchestra.run.target-ses-060.stdout: \ certificate signed by unknown authority\nINFO:cephadm:/usr/bin/podman:stderr\
2020-07-13T13:07:14.371 INFO:teuthology.orchestra.run.target-ses-060.stdout: \ Error: error pulling image \"registry.suse.de/suse/sle-15-sp2/update/products/ses7/milestones/containers/ses/7/ceph/ceph\"\
2020-07-13T13:07:14.373 INFO:teuthology.orchestra.run.target-ses-060.stdout: : unable to pull registry.suse.de/suse/sle-15-sp2/update/products/ses7/milestones/containers/ses/7/ceph/ceph:\
2020-07-13T13:07:14.374 INFO:teuthology.orchestra.run.target-ses-060.stdout: \ unable to pull image: Error initializing source docker://registry.suse.de/suse/sle-15-sp2/update/products/ses7/milestones/containers/ses/7/ceph/ceph:latest:\
2020-07-13T13:07:14.375 INFO:teuthology.orchestra.run.target-ses-060.stdout: \ error pinging docker registry registry.suse.de: Get https://registry.suse.de/v2/:\
2020-07-13T13:07:14.375 INFO:teuthology.orchestra.run.target-ses-060.stdout: \ x509: certificate signed by unknown authority\nTraceback (most recent call last):\n\
2020-07-13T13:07:14.377 INFO:teuthology.orchestra.run.target-ses-060.stdout: \ File \"/usr/sbin/cephadm\", line 4761, in \n r = args.func()\n \
2020-07-13T13:07:14.378 INFO:teuthology.orchestra.run.target-ses-060.stdout: \ File \"/usr/sbin/cephadm\", line 1145, in _infer_image\n return func()\n\
2020-07-13T13:07:14.379 INFO:teuthology.orchestra.run.target-ses-060.stdout: \ File \"/usr/sbin/cephadm\", line 2234, in command_pull\n call_throws([container_path,\
2020-07-13T13:07:14.380 INFO:teuthology.orchestra.run.target-ses-060.stdout: \ 'pull', args.image])\n File \"/usr/sbin/cephadm\", line 846, in call_throws\n\
2020-07-13T13:07:14.382 INFO:teuthology.orchestra.run.target-ses-060.stdout: \ raise RuntimeError('Failed command: %s' % ' '.join(command))\nRuntimeError:\
2020-07-13T13:07:14.383 INFO:teuthology.orchestra.run.target-ses-060.stdout: \ Failed command: /usr/bin/podman pull registry.suse.de/suse/sle-15-sp2/update/products/ses7/milestones/containers/ses/7/ceph/ceph"
2020-07-13T13:07:14.384 INFO:teuthology.orchestra.run.target-ses-060.stdout: stdout: ''
2020-07-13T13:07:14.385 INFO:teuthology.orchestra.run.target-ses-060.stdout:comment: 'Command "cephadm --image registry.suse.de/suse/sle-15-sp2/update/products/ses7/milestones/containers/ses/7/ceph/ceph
2020-07-13T13:07:14.386 INFO:teuthology.orchestra.run.target-ses-060.stdout: pull
2020-07-13T13:07:14.387 INFO:teuthology.orchestra.run.target-ses-060.stdout:
2020-07-13T13:07:14.388 INFO:teuthology.orchestra.run.target-ses-060.stdout: " run'
2020-07-13T13:07:14.389 INFO:teuthology.orchestra.run.target-ses-060.stdout:duration: 1477.83
2020-07-13T13:07:14.390 INFO:teuthology.orchestra.run.target-ses-060.stdout:name: 'cephadm --image registry.suse.de/suse/sle-15-sp2/update/products/ses7/milestones/containers/ses/7/ceph/ceph
2020-07-13T13:07:14.391 INFO:teuthology.orchestra.run.target-ses-060.stdout: pull
2020-07-13T13:07:14.392 INFO:teuthology.orchestra.run.target-ses-060.stdout:
2020-07-13T13:07:14.393 INFO:teuthology.orchestra.run.target-ses-060.stdout: '
2020-07-13T13:07:14.394 INFO:teuthology.orchestra.run.target-ses-060.stdout:result: false
2020-07-13T13:07:14.395 INFO:teuthology.orchestra.run.target-ses-060.stdout:start_time: '13:07:12.824698'
2020-07-13T13:07:14.396 INFO:teuthology.orchestra.run.target-ses-060.stdout:state: 'cmd_|-download ceph container image_|-cephadm --image registry.suse.de/suse/sle-15-sp2/update/products/ses7/milestones/containers/ses/7/ceph/ceph
2020-07-13T13:07:14.397 INFO:teuthology.orchestra.run.target-ses-060.stdout: pull
2020-07-13T13:07:14.398 INFO:teuthology.orchestra.run.target-ses-060.stdout:
2020-07-13T13:07:14.399 INFO:teuthology.orchestra.run.target-ses-060.stdout: _|-run'
2020-07-13T13:07:14.400 INFO:teuthology.orchestra.run.target-ses-060.stdout:
2020-07-13T13:07:14.401 INFO:teuthology.orchestra.run.target-ses-060.stdout:
2020-07-13T13:07:14.429 INFO:teuthology.orchestra.run.target-ses-060.stdout:
2020-07-13T13:07:14.430 INFO:teuthology.orchestra.run.target-ses-060.stdout:Finished execution of ceph-salt formula
2020-07-13T13:07:14.430 INFO:teuthology.orchestra.run.target-ses-060.stdout:
2020-07-13T13:07:14.431 INFO:teuthology.orchestra.run.target-ses-060.stdout:Summary: Total=1 Succeeded=0 Failed=1
2020-07-13T13:07:14.944 DEBUG:teuthology.orchestra.run:got remote process result: 2
```
Can the logger be improved so "stderr" and "stdout" represent human readable multi-line text instead of escaped text, yaml supports `|` for its records.
Contributor guide
No contributing guide indexed for this repository
Research direction
The issue does not name a file or test; start by locating the Python logger or serialization code that formats Salt command stderr and stdout. Check how multiline values are emitted, then verify that the resulting logs use readable YAML block text while preserving the error content.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- devops, observability-sre
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100