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

src/ceph-crash.in: various enhancements and fixes #42055

Merged
merged 5 commits into from Jul 8, 2021

Conversation

leseb
Copy link
Member

@leseb leseb commented Jun 28, 2021

See individual commits.

Checklist

  • References tracker ticket
  • Updates documentation if necessary
  • Includes tests for new functionality or reproducer for bug

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 api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox

stdout was never used so let's remove it.

Signed-off-by: Sébastien Han <seb@redhat.com>
@leseb leseb requested review from dmick and liewegas June 28, 2021 16:57
Copy link
Member

@dmick dmick left a comment

Choose a reason for hiding this comment

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

Other than nits, lgtm

@@ -51,7 +51,7 @@ def post_crash(path):
stderr = pr.communicate(input=f.read())
rc = pr.wait()
f.close()
if rc != 0:
if rc != 0 or stderr != "":
Copy link
Member

Choose a reason for hiding this comment

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

just printing to stderr isn't an error, of course, so I don't know that calling this "failed" is really right, but it's a nit

Copy link
Member Author

Choose a reason for hiding this comment

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

Agreed, but as explained in 8a89e01, I feel like it's better than nothing.

leseb added 4 commits July 5, 2021 11:32
frame was unused so let's remove it.

Signed-off-by: Sébastien Han <seb@redhat.com>
Previously when the --name was used, the code will still go through the
initial list. Now if --name is passed, only this user will be used to
upload crashes.

Signed-off-by: Sébastien Han <seb@redhat.com>
Now, the script can run with --log-level DEBUG to enable DEBUG level
logging.

Signed-off-by: Sébastien Han <seb@redhat.com>
This is not perfect, but we have seen cases where the CLI returns 0 even
on failure.
For instance:

```sh
[root@rook-ceph-crashcollector-compute-1-66bdfbd886-d2zcd /]# ceph -n client.crash crash post -i /var/lib/ceph/crash/2021-06-28T07\:47\:37.859766Z_6ffb119c-930e-4047-9cfa-a92af783cdd0/meta
malformed crash metadata: time data '2021-06-28T07:47:37.859766' does not match format '%Y-%m-%d %H:%M:%S.%f'
[root@rook-ceph-crashcollector-compute-1-66bdfbd886-d2zcd /]# echo $?
0
```

So until we find the root cause, let's mitigate and perhaps accomodate
for futur similar issues.

Signed-off-by: Sébastien Han <seb@redhat.com>
@leseb leseb requested a review from dmick July 5, 2021 09:35
@leseb
Copy link
Member Author

leseb commented Jul 5, 2021

jenkins test make check

@leseb leseb merged commit 0509deb into ceph:master Jul 8, 2021
@leseb leseb deleted the crash-various-fixes branch July 8, 2021 10:26
@leseb
Copy link
Member Author

leseb commented Jul 8, 2021

djgalloway pushed a commit that referenced this pull request Jul 8, 2021
src/ceph-crash.in: various enhancements and fixes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants