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

Add exceptions full info to grpc.py code #438

Closed
gbregman opened this issue Feb 13, 2024 · 1 comment · Fixed by #443
Closed

Add exceptions full info to grpc.py code #438

gbregman opened this issue Feb 13, 2024 · 1 comment · Fixed by #443
Assignees

Comments

@gbregman
Copy link
Contributor

In a lot of places in grpc.py we don't log the full exception info, including the stack trace, but just the error message. We need to go over the code and add the full information.

@gbregman gbregman self-assigned this Feb 13, 2024
@baum
Copy link
Collaborator

baum commented Feb 13, 2024

Both exception type at stack trace are lost, when the exception is converted from ex to f"{ex}". Generally, in the code exception should not be converted to string since it looses information. In the current model we see in the log:

2024-02-13 07:57:21 [   ERROR] bdev_rbd_create bdev_f0bec8af-0c1e-4efb-87e6-28f5d672675a failed with:
None (grpc.py:291)

instead of seeing

2024-02-13 10:31:44 [   ERROR] bdev_rbd_create (grpc.py:290)
Traceback (most recent call last):
  File "/src/control/grpc.py", line 277, in create_bdev
    cluster_name=self._get_cluster(anagrp)
  File "/src/control/grpc.py", line 217, in _get_cluster
    cluster_name = self._get_cluster(anagrp)
  File "/src/control/grpc.py", line 215, in _get_cluster
    elif self.clusters[anagrp][self.current_cluster[anagrp]] >= self.bdevs_per_cluster:
KeyError: None

gbregman added a commit to gbregman/ceph-nvmeof that referenced this issue Feb 14, 2024
Fixes ceph#438

Signed-off-by: Gil Bregman <gbregman@il.ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants