-
Notifications
You must be signed in to change notification settings - Fork 49
RSDK-12499: better error log when host is offline #505
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
base: main
Are you sure you want to change the base?
Changes from all commits
cec05c7
13c87f2
a189af2
4cd064c
e1acc46
6410152
a91b8a2
ff27d9d
3e9cabe
054142e
def83ea
b916a0c
8f57c4a
359b70b
ec32962
8ed9569
6db000f
c3f42ec
07734dd
53de733
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1132,7 +1132,8 @@ func (queue *mongoDBWebRTCCallQueue) checkHostQueueSize(ctx context.Context, for | |
| return errTooManyConns | ||
| } | ||
|
|
||
| var errOffline = status.Error(codes.Unavailable, "host appears to be offline; ensure machine is online and try again") | ||
| // ErrOffline is returned when a host appears to be offline. | ||
| var ErrOffline = errors.New("host appears to be offline; ensure machine is online and try again") | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why remove the "unavailable" status?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah I see the comment from your other PR.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
pasting it here so its easier for others to see^!
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what does the error become with this change? you can test this by pointing goutils on app to this change and running the cli/sdk against it. I ask because I would like to keep the Unavailable code if possible, so if we lose that we should think of ways to keep it in
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm reverting this change because the new error status has the error as "unknown" vs "unavailable". So something else is re-wrapping this error status but without the "unavailable" status wanted. I think you can get the error message from the status by converting it later on anyways
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if we're exporting this, we should name this var something something more specific |
||
|
|
||
| // checkHostOnline will check if there is some operator for all the managed hosts that | ||
| // claims to have an answerer online for that host. It does this by running an aggregation | ||
|
|
@@ -1167,7 +1168,7 @@ func (queue *mongoDBWebRTCCallQueue) checkHostOnline(ctx context.Context, hosts | |
| return err | ||
| } | ||
| if len(ret) == 0 { | ||
| return errOffline | ||
| return status.Error(codes.Unavailable, ErrOffline.Error()) | ||
| } | ||
| return nil | ||
| } | ||
|
|
@@ -1188,7 +1189,7 @@ func (queue *mongoDBWebRTCCallQueue) incrementConnectionEstablishmentExpectedFai | |
| // error (internal error from MDB query, e.g.). We can tell from the passed in error. | ||
|
|
||
| reason := "other" | ||
| if errors.Is(err, errOffline) { | ||
| if errors.Is(err, ErrOffline) { | ||
| reason = "answerers_offline" | ||
| } else if errors.Is(err, errTooManyConns) { | ||
| reason = "too_many_callers" | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not a very descriptive name - can we name this
ErrMDNSNoCandidatesFoundor something in that vein?