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

Plugin: Migrate to @grpc/grpc-js to resolve problems when IPv6 is disabled #135

Merged
merged 9 commits into from
May 13, 2020

Conversation

aknuds1
Copy link
Contributor

@aknuds1 aknuds1 commented May 6, 2020

Migrate to @grpc/grpc-js, in order to solve #48, since the IPv6 issue is presumably not present in the pure-JS version of gRPC.

I had to make a lot of changes because of TypeScript compilation errors that appeared, I can only guess that grpc-js has stricter type definitions. In particular, I had to move gRPC methods out of classes, because the class types didn't have the right interface.

In retrospect, I think I might understand how to give the class types the right interface (basically make them indexable by string), so I could probably re-introduce classes for containing the methods.

Fixes #48

NB:
How should I best test this? I tested it manually, by rendering a panel in Grafana and it does work.

@aknuds1 aknuds1 added help wanted Extra attention is needed type/chore labels May 6, 2020
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
@aknuds1 aknuds1 changed the title WIP: Chore: Migrate to @grpc/grpc-js Chore: Migrate to @grpc/grpc-js May 6, 2020
@aknuds1 aknuds1 requested a review from marefr May 6, 2020 14:28
@marefr
Copy link
Contributor

marefr commented May 11, 2020

Works with Ubuntu 16.04 with both Grafana 6.7.x and 7.0.x. Still need to figure out how to disable IPv6 and test again.

@marefr
Copy link
Contributor

marefr commented May 11, 2020

Tried disable IPv6 using these instructions:

# create the long-life config file
echo "net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1" | sudo tee /etc/sysctl.d/99-my-disable-ipv6.conf

# ask the system to use it
sudo service procps reload

# check the result
cat /proc/sys/net/ipv6/conf/all/disable_ipv6

Can still run the v1.0.12 version of image renderer plugin. Not sure what else to do?

@marefr
Copy link
Contributor

marefr commented May 11, 2020

Was able to turn off IPv6 completely using a boot option (instructions)

  • Couldn't start v1.0.12 on v6.7.x (should be due to IPv6 disabled).
  • Can run this branch on v6.7.x and 7.0.x 👍

@aknuds1
Copy link
Contributor Author

aknuds1 commented May 11, 2020

Was able to turn off IPv6 completely using a boot option (instructions)

  • Couldn't start v1.0.12 on v6.7.x (should be due to IPv6 disabled).
  • Can run this branch on v6.7.x and 7.0.x +1

@marefr Yayyy

@marefr
Copy link
Contributor

marefr commented May 11, 2020

Since we're upgrading zeit/pkg need to verify these changes works on Windows and Darwin as well - had issues with that earlier.

@marefr
Copy link
Contributor

marefr commented May 12, 2020

Verified works on Windows. Who can help out testing this on Darwin?

@aknuds1
Copy link
Contributor Author

aknuds1 commented May 12, 2020

@marefr I can do that.

@aknuds1
Copy link
Contributor Author

aknuds1 commented May 12, 2020

I tested it on OS X @marefr, works.

Copy link
Contributor

@marefr marefr left a comment

Choose a reason for hiding this comment

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

LGTM

Added a minor change that would be nice before merging

scripts/package_target.sh Outdated Show resolved Hide resolved
@marefr marefr changed the title Chore: Migrate to @grpc/grpc-js Plugin: Migrate to @grpc/grpc-js to resolve problems when IPv6 is disabled May 13, 2020
@aknuds1 aknuds1 merged commit 3ad1228 into master May 13, 2020
@aknuds1 aknuds1 deleted the chore/grpc-js branch May 13, 2020 11:54
@towolf
Copy link

towolf commented May 15, 2020

Thanks @aknuds1! Great work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Does not work when IPv6 is disabled
3 participants