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

Log when same ip is being used (backport to release branch) #5238

Merged
merged 1 commit into from
Oct 6, 2023

Conversation

faern
Copy link
Member

@faern faern commented Oct 5, 2023

Just backport of #5236. making a PR since the verbatim copy of the same solution on main did not work on this branch.


This change is Reviewable

@faern faern requested a review from raksooo October 5, 2023 09:57
@linear
Copy link

linear bot commented Oct 5, 2023

DES-386 Log when Same IP is being used

According to the latest plans with how we roll out Same IP, the app will not know about it at all. The API will just start handing out Same IP IPs to apps. But since there is substantial risk of bugs and issues with it (tricky kernel changes server side) we need good ways of debugging this.

Currently if the app sends a problem report, it's not possible/easy to figure out if the user has been assigned Same IP or not. The logs do not contain account or device identifiers, nor IPs. It would be much easier for us to debug Same IP issues if app logs could reveal whether or not Same IP was used.

Solution

Hardcode the currently known Same IP IPs. And if the device has those IPs assigned to it, log on each connection attempt that Same IP is being used.

if device.ips.contains(SAME_IP_IP) {
    log::debug!("Same IP is being used");
}

This will likely be removed a while after the Same IP rollout reaches 100% and that should be noted in the code.

@faern faern changed the title Log when same ip is being used Log when same ip is being used (backport to release branch) Oct 5, 2023
Copy link
Member

@raksooo raksooo left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 3 of 3 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@faern faern force-pushed the log-when-same-ip-is-being-used-des-386 branch from 4f8f070 to 4a00d0b Compare October 6, 2023 08:06
@faern faern merged commit 08be20d into prepare-2023.5 Oct 6, 2023
11 of 18 checks passed
@faern faern deleted the log-when-same-ip-is-being-used-des-386 branch October 6, 2023 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants